File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -44,6 +44,10 @@ public function testNormalizersAndEncodersUseDefaultContextConfigOption()
4444 $ kernel = static ::bootKernel (['test_case ' => 'Serializer ' , 'root_config ' => 'default_context.yaml ' ]);
4545
4646 foreach ($ kernel ->normalizersAndEncoders as $ normalizerOrEncoderId ) {
47+ if (!static ::getContainer ()->has ($ normalizerOrEncoderId )) {
48+ continue ;
49+ }
50+
4751 $ normalizerOrEncoder = static ::getContainer ()->get ($ normalizerOrEncoderId );
4852
4953 $ reflectionObject = new \ReflectionObject ($ normalizerOrEncoder );
@@ -68,7 +72,7 @@ class SerializerKernel extends AppKernel implements CompilerPassInterface
6872 'serializer.normalizer.property.alias ' , // Special case as this normalizer isn't tagged
6973 ];
7074
71- public function process (ContainerBuilder $ container )
75+ public function process (ContainerBuilder $ container ): void
7276 {
7377 $ services = array_merge (
7478 $ container ->findTaggedServiceIds ('serializer.normalizer ' ),
You can’t perform that action at this time.
0 commit comments