• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

api-platform / core / 17738646910

15 Sep 2025 03:40PM UTC coverage: 22.156% (-0.07%) from 22.227%
17738646910

Pull #7380

github

web-flow
Merge e3d95e940 into 4abec444e
Pull Request #7380: fix(laravel): http cache compatibility

0 of 152 new or added lines in 9 files covered. (0.0%)

4 existing lines in 4 files now uncovered.

11127 of 50221 relevant lines covered (22.16%)

23.41 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/Laravel/config/api-platform.php
1
<?php
2

3
/*
4
 * This file is part of the API Platform project.
5
 *
6
 * (c) Kévin Dunglas <dunglas@gmail.com>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11

12
declare(strict_types=1);
13

14
use ApiPlatform\Metadata\UrlGeneratorInterface;
15
use Illuminate\Auth\Access\AuthorizationException;
16
use Illuminate\Auth\AuthenticationException;
17
use Symfony\Component\Serializer\NameConverter\SnakeCaseToCamelCaseNameConverter;
18

19
return [
×
20
    'title' => 'API Platform',
×
21
    'description' => 'My awesome API',
×
22
    'version' => '1.0.0',
×
23
    'show_webby' => true,
×
24

25
    'routes' => [
×
26
        'domain' => null,
×
27
        // Global middleware applied to every API Platform routes
×
28
        // 'middleware' => []
×
29
    ],
×
30

31
    'resources' => [
×
32
        app_path('Models'),
×
33
    ],
×
34

35
    'formats' => [
×
36
        'jsonld' => ['application/ld+json'],
×
37
        // 'jsonapi' => ['application/vnd.api+json'],
×
38
        // 'csv' => ['text/csv'],
×
39
    ],
×
40

41
    'patch_formats' => [
×
42
        'json' => ['application/merge-patch+json'],
×
43
    ],
×
44

45
    'docs_formats' => [
×
46
        'jsonld' => ['application/ld+json'],
×
47
        // 'jsonapi' => ['application/vnd.api+json'],
48
        'jsonopenapi' => ['application/vnd.openapi+json'],
×
49
        'html' => ['text/html'],
×
50
    ],
×
51

52
    'error_formats' => [
×
53
        'jsonproblem' => ['application/problem+json'],
×
54
    ],
×
55

56
    'defaults' => [
×
57
        'pagination_enabled' => true,
×
58
        'pagination_partial' => false,
×
59
        'pagination_client_enabled' => false,
×
60
        'pagination_client_items_per_page' => false,
×
61
        'pagination_client_partial' => false,
×
62
        'pagination_items_per_page' => 30,
×
63
        'pagination_maximum_items_per_page' => 30,
×
64
        'route_prefix' => '/api',
×
65
        'middleware' => [],
×
66
    ],
×
67

68
    'pagination' => [
×
69
        'page_parameter_name' => 'page',
×
70
        'enabled_parameter_name' => 'pagination',
×
71
        'items_per_page_parameter_name' => 'itemsPerPage',
×
72
        'partial_parameter_name' => 'partial',
×
73
    ],
×
74

75
    'graphql' => [
×
76
        'enabled' => false,
×
77
        'nesting_separator' => '__',
×
78
        'introspection' => ['enabled' => true],
×
79
        'max_query_complexity' => 500,
×
80
        'max_query_depth' => 200,
×
81
        // 'middleware' => null
×
82
    ],
×
83

84
    'graphiql' => [
×
85
        // 'enabled' => true,
×
86
        // 'domain' => null,
×
87
        // 'middleware' => null
×
88
    ],
×
89

90
    // set to null if you want to keep snake_case
91
    'name_converter' => SnakeCaseToCamelCaseNameConverter::class,
×
92

93
    'exception_to_status' => [
×
94
        AuthenticationException::class => 401,
×
95
        AuthorizationException::class => 403,
×
96
    ],
×
97

98
    'swagger_ui' => [
×
99
        'enabled' => true,
×
100
        // 'apiKeys' => [
×
101
        //    'api' => [
×
102
        //        'type' => 'Bearer',
×
103
        //        'name' => 'Authentication Token',
×
104
        //        'in' => 'header'
×
105
        //    ]
×
106
        // ],
×
107
        // 'oauth' => [
×
108
        //    'enabled' => true,
×
109
        //    'type' => 'oauth2',
×
110
        //    'flow' => 'authorizationCode',
×
111
        //    'tokenUrl' => '',
×
112
        //    'authorizationUrl' =>'',
×
113
        //    'refreshUrl' => '',
×
114
        //    'scopes' => ['scope1' => 'Description scope 1'],
×
115
        //    'pkce' => true
×
116
        // ],
×
117
        // 'license' => [
×
118
        //    'name' => 'Apache 2.0',
×
119
        //    'url' => 'https://www.apache.org/licenses/LICENSE-2.0.html',
×
120
        // ],
×
121
        // 'contact' => [
×
122
        //    'name' => 'API Support',
×
123
        //    'url' => 'https://www.example.com/support',
×
124
        //    'email' => 'support@example.com',
×
125
        // ],
×
126
        // 'http_auth' => [
×
127
        //    'Personal Access Token' => [
×
128
        //        'scheme' => 'bearer',
×
129
        //        'bearerFormat' => 'JWT'
×
130
        //    ]
×
131
        // ]
×
132
    ],
×
133

134
    // 'openapi' => [
135
    //     'tags' => []
136
    // ],
137

138
    'url_generation_strategy' => UrlGeneratorInterface::ABS_PATH,
×
139

140
    'serializer' => [
×
141
        'hydra_prefix' => false,
×
142
        // 'datetime_format' => \DateTimeInterface::RFC3339
×
143
    ],
×
144

145
    // we recommend using "file" or "acpu"
146
    'cache' => 'file',
×
147

NEW
148
    // 'http_cache' => [
×
NEW
149
    //     'etag' => false,
×
NEW
150
    //     'max_age' => null,
×
NEW
151
    //     'shared_max_age' => null,
×
NEW
152
    //     'vary' => null,
×
NEW
153
    //     'public' => null,
×
NEW
154
    //     'stale_while_revalidate' => null,
×
NEW
155
    //     'stale_if_error' => null,
×
NEW
156
    //     'invalidation' => [
×
NEW
157
    //         'urls' => [],
×
NEW
158
    //         'scoped_clients' => [],
×
NEW
159
    //         'max_header_length' => 7500,
×
NEW
160
    //         'request_options' => [],
×
NEW
161
    //         'purger' => ApiPlatform\HttpCache\SouinPurger::class,
×
NEW
162
    //     ],
×
NEW
163
    // ]
×
UNCOV
164
];
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc