We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8785b50 commit 4a3dc89Copy full SHA for 4a3dc89
src/Container.php
@@ -110,8 +110,14 @@ protected function initializeService(string $serviceId): void
110
111
$decorators = $this->decorators[$serviceId];
112
113
- usort($decorators, function(array $left, array $right): bool {
114
- return $left[1] > $right[1];
+ usort($decorators, function(array $left, array $right): int {
+ $l = $left[1];
115
+ $r = $right[1];
116
+ if($l === $r) {
117
+ return 0;
118
+ }
119
+
120
+ return $left[1] > $right[1] ? 1 : -1;
121
});
122
123
/** @var array<Closure, int> $decorator */
0 commit comments