Skip to content

Commit 5fe9ba0

Browse files
committed
minor symfony#57494 [FrameworkBundle] fix tests (xabbuh)
This PR was merged into the 6.4 branch. Discussion ---------- [FrameworkBundle] fix tests | Q | A | ------------- | --- | Branch? | 6.4 | Bug fix? | no | New feature? | no | Deprecations? | no | Issues | | License | MIT Commits ------- 2a46a7d fix tests
2 parents d0bb382 + 2a46a7d commit 5fe9ba0

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/Symfony/Bundle/FrameworkBundle/Tests/Functional/SerializerTest.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff 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'),

0 commit comments

Comments
 (0)