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 766ae29

Browse filesBrowse files
committed
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 ------- ec6a2f9 [3.2] Prevent double registrations related to tag priorities
2 parents 79d2c0e + ec6a2f9 commit 766ae29
Copy full SHA for 766ae29

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.