Skip to content

Commit a675d80

Browse files
author
Robin Chalas
committed
feature symfony#23862 [SecurityBundle] resolve class name parameter inside AddSecurityVotersPass (pjarmalavicius)
This PR was squashed before being merged into the 3.4 branch (closes symfony#23862). Discussion ---------- [SecurityBundle] resolve class name parameter inside AddSecurityVotersPass | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | symfony#23733 | License | MIT Commits ------- a86bf52 [SecurityBundle] resolve class name parameter inside AddSecurityVotersPass
2 parents 2325680 + a86bf52 commit a675d80

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)