From 0600f77da78b69f74069a80f297e092fafa03b9f Mon Sep 17 00:00:00 2001 From: Albert Casademont Date: Wed, 6 Dec 2017 12:48:27 +0100 Subject: [PATCH] fix public alias setter for compatibility with symfony 2.x --- DependencyInjection/Compiler/SetRouterPass.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/DependencyInjection/Compiler/SetRouterPass.php b/DependencyInjection/Compiler/SetRouterPass.php index 7cfa9ef..c85db51 100644 --- a/DependencyInjection/Compiler/SetRouterPass.php +++ b/DependencyInjection/Compiler/SetRouterPass.php @@ -30,7 +30,8 @@ class SetRouterPass implements CompilerPassInterface { public function process(ContainerBuilder $container) { - $container->setAlias('router', 'jms_i18n_routing.router')->setPublic(true); + $container->setAlias('router', 'jms_i18n_routing.router'); + $container->getAlias('router')->setPublic(true); $translatorDef = $container->findDefinition('translator'); if ('%translator.identity.class%' === $translatorDef->getClass()) {