From a86bf52068f242b7d81587763161e145a13b54c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Paulius=20Jarmalavi=C4=8Dius?= Date: Fri, 11 Aug 2017 10:01:09 +0300 Subject: [PATCH] [SecurityBundle] resolve class name parameter inside AddSecurityVotersPass --- .../DependencyInjection/Compiler/AddSecurityVotersPass.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Compiler/AddSecurityVotersPass.php b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Compiler/AddSecurityVotersPass.php index 67d0785b47..f75d4be192 100644 --- a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Compiler/AddSecurityVotersPass.php +++ b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Compiler/AddSecurityVotersPass.php @@ -42,7 +42,8 @@ class AddSecurityVotersPass implements CompilerPassInterface } foreach ($voters as $voter) { - $class = $container->getDefinition((string) $voter)->getClass(); + $definition = $container->getDefinition((string) $voter); + $class = $container->getParameterBag()->resolveValue($definition->getClass()); if (!is_a($class, VoterInterface::class, true)) { @trigger_error(sprintf('Using a security.voter tag on a class without implementing the %1$s is deprecated as of 3.4 and will be removed in 4.0. Implement the %1$s instead.', VoterInterface::class), E_USER_DEPRECATED);