From 2cf2472b34ae637384581b2bf36b737bac0a145c Mon Sep 17 00:00:00 2001 From: Douglas Hammond Date: Mon, 1 Jun 2020 10:45:15 -0400 Subject: [PATCH] Apply to router.default Using a `chain_router` usually replaces the `router` and add the `router.default` to it's chain. This would `addExpressionLanguageProvider` to the default router only as the chain router is not expected to have `addExpressionLanguageProvider` as it is not part of the router interface. See https://github.com/symfony/symfony/issues/37042 --- .../Compiler/AddExpressionLanguageProvidersPass.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/AddExpressionLanguageProvidersPass.php b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/AddExpressionLanguageProvidersPass.php index 47195b48300f4..3e2f2768edc1a 100644 --- a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/AddExpressionLanguageProvidersPass.php +++ b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/AddExpressionLanguageProvidersPass.php @@ -28,8 +28,8 @@ class AddExpressionLanguageProvidersPass implements CompilerPassInterface public function process(ContainerBuilder $container) { // routing - if ($container->has('router')) { - $definition = $container->findDefinition('router'); + if ($container->has('router.default')) { + $definition = $container->findDefinition('router.default'); foreach ($container->findTaggedServiceIds('routing.expression_language_provider', true) as $id => $attributes) { $definition->addMethodCall('addExpressionLanguageProvider', [new Reference($id)]); }