From d50f374d292385f8bf49ab114d110352116d93d4 Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Mon, 3 Jun 2024 08:54:18 +0200 Subject: [PATCH] not registered definitions must not be modified --- DependencyInjection/FrameworkExtension.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/DependencyInjection/FrameworkExtension.php b/DependencyInjection/FrameworkExtension.php index f7ab7e3ed..ebaed7c2b 100644 --- a/DependencyInjection/FrameworkExtension.php +++ b/DependencyInjection/FrameworkExtension.php @@ -1854,6 +1854,10 @@ private function registerSerializerConfiguration(array $config, ContainerBuilder $container->setParameter('serializer.default_context', $defaultContext); } + if (!$container->hasDefinition('serializer.normalizer.object')) { + return; + } + $arguments = $container->getDefinition('serializer.normalizer.object')->getArguments(); $context = [];