Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
xabbuh committed Jun 22, 2024
1 parent d0bb382 commit 2a46a7d
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ public function testNormalizersAndEncodersUseDefaultContextConfigOption()
$kernel = static::bootKernel(['test_case' => 'Serializer', 'root_config' => 'default_context.yaml']);

foreach ($kernel->normalizersAndEncoders as $normalizerOrEncoderId) {
if (!static::getContainer()->has($normalizerOrEncoderId)) {
continue;
}

$normalizerOrEncoder = static::getContainer()->get($normalizerOrEncoderId);

$reflectionObject = new \ReflectionObject($normalizerOrEncoder);
Expand All @@ -68,7 +72,7 @@ class SerializerKernel extends AppKernel implements CompilerPassInterface
'serializer.normalizer.property.alias', // Special case as this normalizer isn't tagged
];

public function process(ContainerBuilder $container)
public function process(ContainerBuilder $container): void
{
$services = array_merge(
$container->findTaggedServiceIds('serializer.normalizer'),
Expand Down

0 comments on commit 2a46a7d

Please sign in to comment.