Merge remote-tracking branch 'origin/support/3.2' into develop

This commit is contained in:
lenaick.moreira
2026-03-02 10:56:31 +01:00
123 changed files with 2898 additions and 2149 deletions

View File

@@ -761,6 +761,21 @@ class Application implements ResetInterface
}));
}
// check whether all commands left are aliases to the same one
if (\count($commands) > 1) {
$uniqueCommands = array_unique(array_map(function ($nameOrAlias) use (&$commandList) {
if (!$commandList[$nameOrAlias] instanceof Command) {
$commandList[$nameOrAlias] = $this->commandLoader->get($nameOrAlias);
}
return $commandList[$nameOrAlias]->getName();
}, $commands));
if (1 === \count($uniqueCommands)) {
$commands = [reset($uniqueCommands)];
}
}
if (\count($commands) > 1) {
$usableWidth = $this->terminal->getWidth() - 10;
$abbrevs = array_values($commands);