Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit ec6a2f9

Browse filesBrowse files
[3.2] Prevent double registrations related to tag priorities
1 parent 0834f13 commit ec6a2f9
Copy full SHA for ec6a2f9

File tree

1 file changed

+3
-5
lines changed
Filter options

1 file changed

+3
-5
lines changed

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

Copy file name to clipboardExpand all lines: src/Symfony/Component/DependencyInjection/Compiler/PriorityTaggedServiceTrait.php
+3-5Lines 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)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.