From e7fcf448522a2a943c499e9468b8d5e22386cddf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20Houssard?= Date: Mon, 9 Jan 2023 14:15:40 +0100 Subject: [PATCH] Fix compiler pass broken due to FOSRestBundle upgrade --- .../Compiler/ContentTypeNegotiatorPass.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Akeneo/Tool/Bundle/ApiBundle/DependencyInjection/Compiler/ContentTypeNegotiatorPass.php b/src/Akeneo/Tool/Bundle/ApiBundle/DependencyInjection/Compiler/ContentTypeNegotiatorPass.php index 0ba2f97d9094..60d759258f39 100644 --- a/src/Akeneo/Tool/Bundle/ApiBundle/DependencyInjection/Compiler/ContentTypeNegotiatorPass.php +++ b/src/Akeneo/Tool/Bundle/ApiBundle/DependencyInjection/Compiler/ContentTypeNegotiatorPass.php @@ -5,7 +5,9 @@ use Symfony\Component\DependencyInjection\ChildDefinition; use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Definition; use Symfony\Component\DependencyInjection\Reference; +use Symfony\Component\HttpFoundation\RequestMatcher; /** * Compiler pass to add rules to the content type negotiator. @@ -64,9 +66,7 @@ private function createRequestMatcher(ContainerBuilder $container, $path = null, $id = 'pim_api.content_type_negotiator.request_matcher.'.md5($serialized).sha1($serialized); if (!$container->hasDefinition($id)) { - $container - ->setDefinition($id, new ChildDefinition('fos_rest.format_request_matcher')) - ->setArguments($arguments); + $container->setDefinition($id, new Definition(RequestMatcher::class, $arguments)); } return new Reference($id);