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

Skip to content

Commit cf7f2fc

Browse files
committed
8000
[2.8] Prevent double registrations related to tag priorities
1 parent 6edd08d commit cf7f2fc

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/PropertyInfoPass.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,9 @@ private function findAndSortTaggedServices($tagName, ContainerBuilder $container
5757
$services = $container->findTaggedServiceIds($tagName);
5858

5959
$sortedServices = array();
60-
foreach ($services as $serviceId => $tags) {
61-
foreach ($tags as $attributes) {
62-
$priority = isset($attributes['priority']) ? $attributes['priority'] : 0;
63-
$sortedServices[$priority][] = new Reference($serviceId);
64-
}
60+
foreach ($services as $serviceId => $attributes) {
61+
$priority = isset($attributes[0]['priority']) ? $attributes[0]['priority'] : 0;
62+
$sortedServices[$priority][] = new Reference($serviceId);
6563
}
6664

6765
if (empty($sortedServices)) {

0 commit comments

Comments
 (0)
0