Skip to content

Commit

Permalink
fix expected command name order with mixed integer and string namespaces
Browse files Browse the repository at this point in the history
  • Loading branch information
xabbuh committed Aug 17, 2022
1 parent 8fe5650 commit c072aa8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Descriptor/ApplicationDescription.php
Expand Up @@ -131,7 +131,7 @@ private function sortCommands(array $commands): array
}

if ($namespacedCommands) {
ksort($namespacedCommands);
ksort($namespacedCommands, \SORT_STRING);
foreach ($namespacedCommands as $key => $commandsSet) {
ksort($commandsSet);
$sortedCommands[$key] = $commandsSet;
Expand Down
2 changes: 1 addition & 1 deletion Tests/Descriptor/ApplicationDescriptionTest.php
Expand Up @@ -36,7 +36,7 @@ public function getNamespacesProvider()
return [
[['_global'], ['foobar']],
[['a', 'b'], ['b:foo', 'a:foo', 'b:bar']],
[['_global', 'b', 'z', 22, 33], ['z:foo', '1', '33:foo', 'b:foo', '22:foo:bar']],
[['_global', 22, 33, 'b', 'z'], ['z:foo', '1', '33:foo', 'b:foo', '22:foo:bar']],
];
}
}
Expand Down

0 comments on commit c072aa8

Please sign in to comment.