8000 [3.2] Prevent double registrations related to tag priorities · symfony/symfony@ec6a2f9 · GitHub
[go: up one dir, main page]

Skip to content

Commit ec6a2f9

Browse files
[3.2] Prevent double registrations related to tag priorities
1 parent 0834f13 commit ec6a2f9

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/Symfony/Component/DependencyInjection/Compiler/PriorityTaggedServiceTrait.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,9 @@ private function findAndSortTaggedServices($tagName, ContainerBuilder $container
4040
{
4141
$services = array();
4242

43-
foreach ($container->findTaggedServiceIds($tagName) as $serviceId => $tags) {
44-
foreach ($tags as $attributes) {
45-
$priority = isset($attributes['priority']) ? $attributes['priority'] : 0;
46-
$services[$priority][] = new Reference($serviceId);
47-
}
43+
foreach ($container->findTaggedServiceIds($tagName) as $serviceId => $attributes) {
44+
$priority = isset($attributes[0]['priority']) ? $attributes[0]['priority'] : 0;
45+
$services[$priority][] = new Reference($serviceId);
4846
}
4947

5048
if ($services) {

0 commit comments

Comments
 (0)
0