Skip to content

Commit c026f4b

Browse files
committed
feature #42532 [DependencyInjection] Sort services in service locator according to priority (BoShurik)
This PR was merged into the 5.4 branch. Discussion ---------- [DependencyInjection] Sort services in service locator according to priority | Q | A | ------------- | --- | Branch? | 5.4 | Bug fix? | no | New feature? | yes | Deprecations? | no | Tickets | Fix #42506 | License | MIT | Doc PR | - Commits ------- c67c2df236 Sort services in service locator according to priority
2 parents 43e1b82 + 8c5267e commit c026f4b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Tests/DependencyInjection/RegisterControllerArgumentLocatorsPassTest.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,10 @@ public function testAlias()
397397
$pass->process($container);
398398

399399
$locator = $container->getDefinition((string) $resolver->getArgument(0))->getArgument(0);
400-
$this->assertSame([RegisterTestController::class.'::fooAction', 'foo::fooAction'], array_keys($locator));
400+
401+
$services = array_keys($locator);
402+
sort($services);
403+
$this->assertSame([RegisterTestController::class.'::fooAction', 'foo::fooAction'], $services);
401404
}
402405

403406
/**

0 commit comments

Comments
 (0)