Skip to content

Commit a86bf52

Browse files
pjarmalaviciusRobin Chalas
authored andcommitted
[SecurityBundle] resolve class name parameter inside AddSecurityVotersPass
1 parent eeaea83 commit a86bf52

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Symfony/Bundle/SecurityBundle/DependencyInjection/Compiler/AddSecurityVotersPass.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ public function process(ContainerBuilder $container)
4242
}
4343

4444
foreach ($voters as $voter) {
45-
$class = $container->getDefinition((string) $voter)->getClass();
45+
$definition = $container->getDefinition((string) $voter);
46+
$class = $container->getParameterBag()->resolveValue($definition->getClass());
4647

4748
if (!is_a($class, VoterInterface::class, true)) {
4849
@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);

0 commit comments

Comments
 (0)