Skip to content

Commit

Permalink
[3.2] Prevent double registrations related to tag priorities
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolas-grekas committed Apr 12, 2017
1 parent 0834f13 commit ec6a2f9
Showing 1 changed file with 3 additions and 5 deletions.
Expand Up @@ -40,11 +40,9 @@ private function findAndSortTaggedServices($tagName, ContainerBuilder $container
{
$services = array();

foreach ($container->findTaggedServiceIds($tagName) as $serviceId => $tags) {
foreach ($tags as $attributes) {
$priority = isset($attributes['priority']) ? $attributes['priority'] : 0;
$services[$priority][] = new Reference($serviceId);
}
foreach ($container->findTaggedServiceIds($tagName) as $serviceId => $attributes) {
$priority = isset($attributes[0]['priority']) ? $attributes[0]['priority'] : 0;
$services[$priority][] = new Reference($serviceId);
}

if ($services) {
Expand Down

0 comments on commit ec6a2f9

Please sign in to comment.