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

api-platform / core / 18338852783

08 Oct 2025 08:37AM UTC coverage: 24.561% (+0.001%) from 24.56%
18338852783

push

github

web-flow
fix(symfony): ensure the kernel is booted before using `KernelBrowser::loginUser()` (#7446)

1 of 1 new or added line in 1 file covered. (100.0%)

329 existing lines in 15 files now uncovered.

14003 of 57012 relevant lines covered (24.56%)

26.03 hits per line

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

100.0
/src/Symfony/Bundle/Resources/config/symfony/events.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
namespace Symfony\Component\DependencyInjection\Loader\Configurator;
15

UNCOV
16
return function (ContainerConfigurator $container) {
2✔
UNCOV
17
    $services = $container->services();
2✔
18

UNCOV
19
    $services->set('api_platform.state_provider.content_negotiation', 'ApiPlatform\State\Provider\ContentNegotiationProvider')
2✔
UNCOV
20
        ->args([
2✔
UNCOV
21
            null,
2✔
UNCOV
22
            service('api_platform.negotiator'),
2✔
UNCOV
23
            '%api_platform.formats%',
2✔
UNCOV
24
            '%api_platform.error_formats%',
2✔
UNCOV
25
        ]);
2✔
26

UNCOV
27
    $services->set('api_platform.listener.request.add_format', 'ApiPlatform\Symfony\EventListener\AddFormatListener')
2✔
UNCOV
28
        ->args([
2✔
UNCOV
29
            service('api_platform.state_provider.content_negotiation'),
2✔
UNCOV
30
            service('api_platform.metadata.resource.metadata_collection_factory'),
2✔
UNCOV
31
        ])
2✔
UNCOV
32
        ->tag('kernel.event_listener', ['event' => 'kernel.request', 'method' => 'onKernelRequest', 'priority' => 28]);
2✔
33

UNCOV
34
    $services->set('api_platform.state_provider.read', 'ApiPlatform\State\Provider\ReadProvider')
2✔
UNCOV
35
        ->arg(0, service('api_platform.state_provider.locator'))
2✔
UNCOV
36
        ->arg(1, service('api_platform.serializer.context_builder'))
2✔
UNCOV
37
        ->arg('$logger', service('logger')->nullOnInvalid());
2✔
38

UNCOV
39
    $services->set('api_platform.state_provider.parameter', 'ApiPlatform\State\Provider\ParameterProvider')
2✔
UNCOV
40
        ->args([
2✔
UNCOV
41
            null,
2✔
UNCOV
42
            tagged_locator('api_platform.parameter_provider', 'key'),
2✔
UNCOV
43
        ]);
2✔
44

UNCOV
45
    $services->set('api_platform.listener.request.read', 'ApiPlatform\Symfony\EventListener\ReadListener')
2✔
UNCOV
46
        ->args([
2✔
UNCOV
47
            service('api_platform.state_provider.read'),
2✔
UNCOV
48
            service('api_platform.metadata.resource.metadata_collection_factory'),
2✔
UNCOV
49
            service('api_platform.uri_variables.converter'),
2✔
UNCOV
50
            service('api_platform.state_provider.parameter')->nullOnInvalid(),
2✔
UNCOV
51
        ])
2✔
UNCOV
52
        ->tag('kernel.event_listener', ['event' => 'kernel.request', 'method' => 'onKernelRequest', 'priority' => 4]);
2✔
53

UNCOV
54
    $services->set('api_platform.state_provider.deserialize', 'ApiPlatform\State\Provider\DeserializeProvider')
2✔
UNCOV
55
        ->args([
2✔
UNCOV
56
            null,
2✔
UNCOV
57
            service('api_platform.serializer'),
2✔
UNCOV
58
            service('api_platform.serializer.context_builder'),
2✔
UNCOV
59
            service('translator')->nullOnInvalid(),
2✔
UNCOV
60
        ]);
2✔
61

UNCOV
62
    $services->set('api_platform.listener.request.deserialize', 'ApiPlatform\Symfony\EventListener\DeserializeListener')
2✔
UNCOV
63
        ->args([
2✔
UNCOV
64
            service('api_platform.state_provider.deserialize'),
2✔
UNCOV
65
            service('api_platform.metadata.resource.metadata_collection_factory'),
2✔
UNCOV
66
        ])
2✔
UNCOV
67
        ->tag('kernel.event_listener', ['event' => 'kernel.request', 'method' => 'onKernelRequest', 'priority' => 2]);
2✔
68

UNCOV
69
    $services->set('api_platform.state_processor.serialize', 'ApiPlatform\State\Processor\SerializeProcessor')
2✔
UNCOV
70
        ->args([
2✔
UNCOV
71
            null,
2✔
UNCOV
72
            service('api_platform.serializer'),
2✔
UNCOV
73
            service('api_platform.serializer.context_builder'),
2✔
UNCOV
74
        ]);
2✔
75

UNCOV
76
    $services->set('api_platform.state_processor.write', 'ApiPlatform\State\Processor\WriteProcessor')
2✔
UNCOV
77
        ->args([
2✔
UNCOV
78
            null,
2✔
UNCOV
79
            service('api_platform.state_processor.locator'),
2✔
UNCOV
80
        ]);
2✔
81

UNCOV
82
    $services->set('api_platform.state_processor.respond', 'ApiPlatform\State\Processor\RespondProcessor')
2✔
UNCOV
83
        ->args([
2✔
UNCOV
84
            service('api_platform.iri_converter'),
2✔
UNCOV
85
            service('api_platform.resource_class_resolver'),
2✔
UNCOV
86
            service('api_platform.metadata.operation.metadata_factory'),
2✔
UNCOV
87
        ]);
2✔
88

UNCOV
89
    $services->set('api_platform.state_processor.add_link_header', 'ApiPlatform\State\Processor\AddLinkHeaderProcessor')
2✔
UNCOV
90
        ->decorate('api_platform.state_processor.respond', null, 0)
2✔
UNCOV
91
        ->args([service('api_platform.state_processor.add_link_header.inner')]);
2✔
92

UNCOV
93
    $services->set('api_platform.listener.view.write', 'ApiPlatform\Symfony\EventListener\WriteListener')
2✔
UNCOV
94
        ->args([
2✔
UNCOV
95
            service('api_platform.state_processor.write'),
2✔
UNCOV
96
            service('api_platform.metadata.resource.metadata_collection_factory'),
2✔
UNCOV
97
        ])
2✔
UNCOV
98
        ->tag('kernel.event_listener', ['event' => 'kernel.view', 'method' => 'onKernelView', 'priority' => 32]);
2✔
99

UNCOV
100
    $services->set('api_platform.listener.view.serialize', 'ApiPlatform\Symfony\EventListener\SerializeListener')
2✔
UNCOV
101
        ->args([
2✔
UNCOV
102
            service('api_platform.state_processor.serialize'),
2✔
UNCOV
103
            service('api_platform.metadata.resource.metadata_collection_factory'),
2✔
UNCOV
104
        ])
2✔
UNCOV
105
        ->tag('kernel.event_listener', ['event' => 'kernel.view', 'method' => 'onKernelView', 'priority' => 16]);
2✔
106

UNCOV
107
    $services->set('api_platform.listener.view.respond', 'ApiPlatform\Symfony\EventListener\RespondListener')
2✔
UNCOV
108
        ->args([
2✔
UNCOV
109
            service('api_platform.state_processor.respond'),
2✔
UNCOV
110
            service('api_platform.metadata.resource.metadata_collection_factory'),
2✔
UNCOV
111
        ])
2✔
UNCOV
112
        ->tag('kernel.event_listener', ['event' => 'kernel.view', 'method' => 'onKernelView', 'priority' => 8]);
2✔
113

UNCOV
114
    $services->set('api_platform.error_listener', 'ApiPlatform\Symfony\EventListener\ErrorListener')
2✔
UNCOV
115
        ->arg('$controller', 'api_platform.action.placeholder')
2✔
UNCOV
116
        ->arg('$logger', service('logger')->nullOnInvalid())
2✔
UNCOV
117
        ->arg('$debug', '%kernel.debug%')
2✔
UNCOV
118
        ->arg('$exceptionsMapping', [])
2✔
UNCOV
119
        ->arg('$resourceMetadataCollectionFactory', service('api_platform.metadata.resource.metadata_collection_factory'))
2✔
UNCOV
120
        ->arg('$errorFormats', '%api_platform.error_formats%')
2✔
UNCOV
121
        ->arg('$exceptionToStatus', '%api_platform.exception_to_status%')
2✔
UNCOV
122
        ->arg('$identifiersExtractor', null)
2✔
UNCOV
123
        ->arg('$resourceClassResolver', service('api_platform.resource_class_resolver'))
2✔
UNCOV
124
        ->arg('$negotiator', service('api_platform.negotiator'));
2✔
125

UNCOV
126
    $services->alias('api_platform.state_processor.documentation', 'api_platform.state_processor.respond');
2✔
127

UNCOV
128
    $services->set('api_platform.state_processor.documentation.serialize', 'ApiPlatform\State\Processor\SerializeProcessor')
2✔
UNCOV
129
        ->decorate('api_platform.state_processor.documentation', null, 200)
2✔
UNCOV
130
        ->args([
2✔
UNCOV
131
            service('api_platform.state_processor.documentation.serialize.inner'),
2✔
UNCOV
132
            service('api_platform.serializer'),
2✔
UNCOV
133
            service('api_platform.serializer.context_builder'),
2✔
UNCOV
134
        ]);
2✔
135

UNCOV
136
    $services->set('api_platform.state_processor.documentation.write', 'ApiPlatform\State\Processor\WriteProcessor')
2✔
UNCOV
137
        ->decorate('api_platform.state_processor.documentation', null, 100)
2✔
UNCOV
138
        ->args([
2✔
UNCOV
139
            service('api_platform.state_processor.documentation.write.inner'),
2✔
UNCOV
140
            service('api_platform.state_processor.locator'),
2✔
UNCOV
141
        ]);
2✔
142

UNCOV
143
    $services->alias('api_platform.state_provider.documentation', 'api_platform.state_provider.locator');
2✔
144

UNCOV
145
    $services->set('api_platform.state_provider.documentation.content_negotiation', 'ApiPlatform\State\Provider\ContentNegotiationProvider')
2✔
UNCOV
146
        ->decorate('api_platform.state_provider.documentation', null, 100)
2✔
UNCOV
147
        ->args([
2✔
UNCOV
148
            service('api_platform.state_provider.documentation.content_negotiation.inner'),
2✔
UNCOV
149
            service('api_platform.negotiator'),
2✔
UNCOV
150
            '%api_platform.formats%',
2✔
UNCOV
151
            '%api_platform.error_formats%',
2✔
UNCOV
152
        ]);
2✔
153

UNCOV
154
    $services->set('api_platform.state_provider.documentation.read', 'ApiPlatform\State\Provider\ReadProvider')
2✔
UNCOV
155
        ->decorate('api_platform.state_provider.documentation', null, 500)
2✔
UNCOV
156
        ->args([
2✔
UNCOV
157
            service('api_platform.state_provider.documentation.read.inner'),
2✔
UNCOV
158
            service('api_platform.serializer.context_builder'),
2✔
UNCOV
159
        ]);
2✔
160

UNCOV
161
    $services->set('api_platform.action.entrypoint', 'ApiPlatform\Symfony\Action\EntrypointAction')
2✔
UNCOV
162
        ->public()
2✔
UNCOV
163
        ->args([
2✔
UNCOV
164
            service('api_platform.metadata.resource.name_collection_factory'),
2✔
UNCOV
165
            service('api_platform.state_provider.documentation'),
2✔
UNCOV
166
            service('api_platform.state_processor.documentation'),
2✔
UNCOV
167
            '%api_platform.docs_formats%',
2✔
UNCOV
168
        ]);
2✔
169

UNCOV
170
    $services->set('api_platform.action.documentation', 'ApiPlatform\Symfony\Action\DocumentationAction')
2✔
UNCOV
171
        ->public()
2✔
UNCOV
172
        ->args([
2✔
UNCOV
173
            service('api_platform.metadata.resource.name_collection_factory'),
2✔
UNCOV
174
            '%api_platform.title%',
2✔
UNCOV
175
            '%api_platform.description%',
2✔
UNCOV
176
            '%api_platform.version%',
2✔
UNCOV
177
            service('api_platform.openapi.factory')->nullOnInvalid(),
2✔
UNCOV
178
            service('api_platform.state_provider.documentation'),
2✔
UNCOV
179
            service('api_platform.state_processor.documentation'),
2✔
UNCOV
180
            service('api_platform.negotiator')->nullOnInvalid(),
2✔
UNCOV
181
            '%api_platform.docs_formats%',
2✔
UNCOV
182
        ]);
2✔
183

UNCOV
184
    $services->set('api_platform.action.placeholder', 'ApiPlatform\Symfony\Action\PlaceholderAction')
2✔
UNCOV
185
        ->public();
2✔
186

UNCOV
187
    $services->alias('ApiPlatform\Symfony\Action\PlaceholderAction', 'api_platform.action.placeholder')
2✔
UNCOV
188
        ->public();
2✔
189

UNCOV
190
    $services->alias('api_platform.action.get_collection', 'api_platform.action.placeholder')
2✔
UNCOV
191
        ->public();
2✔
192

UNCOV
193
    $services->alias('api_platform.action.post_collection', 'api_platform.action.placeholder')
2✔
UNCOV
194
        ->public();
2✔
195

UNCOV
196
    $services->alias('api_platform.action.get_item', 'api_platform.action.placeholder')
2✔
UNCOV
197
        ->public();
2✔
198

UNCOV
199
    $services->alias('api_platform.action.patch_item', 'api_platform.action.placeholder')
2✔
UNCOV
200
        ->public();
2✔
201

UNCOV
202
    $services->alias('api_platform.action.put_item', 'api_platform.action.placeholder')
2✔
UNCOV
203
        ->public();
2✔
204

UNCOV
205
    $services->alias('api_platform.action.delete_item', 'api_platform.action.placeholder')
2✔
UNCOV
206
        ->public();
2✔
UNCOV
207
};
2✔
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

© 2025 Coveralls, Inc