8000 minor #47299 [Console] fix expected command name order with mixed int… · symfony/symfony@a8573b0 · GitHub
[go: up one dir, main page]

Skip to content

Commit a8573b0

Browse files
minor #47299 [Console] fix expected command name order with mixed integer and string namespaces (xabbuh)
This PR was merged into the 5.4 branch. Discussion ---------- [Console] fix expected command name order with mixed integer and string namespaces | Q | A | ------------- | --- | Branch? | 5.4 | Bug fix? | no | New feature? | no | Deprecations? | no | Tickets | | License | MIT | Doc PR | Commits ------- 5cd0eae fix expected command name order with mixed integer and string namespaces
2 parents 3a90e4c + 5cd0eae commit a8573b0

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Symfony/Component/Console/Descriptor/ApplicationDescription.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ private function sortCommands(array $commands): array
131131
}
132132

133133
if ($namespacedCommands) {
134-
ksort($namespacedCommands);
134+
ksort($namespacedCommands, \SORT_STRING);
135135
foreach ($namespacedCommands as $key => $commandsSet) {
136136
ksort($commandsSet);
137137
$sortedCommands[$key] = $commandsSet;

src/Symfony/Component/Console/Tests/Descriptor/ApplicationDescriptionTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public function getNamespacesProvider()
3636
return [
3737
[['_global'], ['foobar']],
3838
[['a', 'b'], ['b:foo', 'a:foo', 'b:bar']],
39-
[['_global', 'b', 'z', 22, 33], ['z:foo', '1', '33:foo', 'b:foo', '22:foo:bar']],
39+
[['_global', 22, 33, 'b', 'z'], ['z:foo', '1', '33:foo', 'b:foo', '22:foo:bar']],
4040
];
4141
}
4242
}

0 commit comments

Comments
 (0)
0