bug #22401 [3.2] Prevent double registrations related to tag priorities (nicolas-grekas)
This PR was merged into the 3.2 branch.
Discussion
----------
[3.2] Prevent double registrations related to tag priorities
| Q | A
| ------------- | ---
| Branch? | 3.2
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
#22396 and #22399 on 3.2
Commits
-------
ec6a2f9eba
[3.2] Prevent double registrations related to tag priorities
This commit is contained in:
commit
766ae29f85
@ -40,12 +40,10 @@ trait PriorityTaggedServiceTrait
|
||||
{
|
||||
$services = array();
|
||||
|
||||
foreach ($container->findTaggedServiceIds($tagName) as $serviceId => $tags) {
|
||||
foreach ($tags as $attributes) {
|
||||
$priority = isset($attributes['priority']) ? $attributes['priority'] : 0;
|
||||
foreach ($container->findTaggedServiceIds($tagName) as $serviceId => $attributes) {
|
||||
$priority = isset($attributes[0]['priority']) ? $attributes[0]['priority'] : 0;
|
||||
$services[$priority][] = new Reference($serviceId);
|
||||
}
|
||||
}
|
||||
|
||||
if ($services) {
|
||||
krsort($services);
|
||||
|
Reference in New Issue
Block a user