1
0
Fork 0

Fix help command not working with plugin commands, fixes #10147 (#10150)

- Add 'help' in the list of commands that need plugin command ($mayNeedPluginCommand)
- Remove `'global' !== $commandName` because $mayNeedPluginCommand encure that $commandName is one of `false`, `empty`, `list` or `help` (so never 'global')

Co-authored-by: Duret Joel <joel.duret@neo-soft.fr>
pull/10158/head
JDev4U 2021-10-13 22:03:31 +02:00 committed by GitHub
parent aa4de3b13d
commit 11810e3c2d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -196,10 +196,10 @@ class Application extends BaseApplication
// not a composer command, so try loading plugin ones
false === $commandName
// list command requires plugin commands to show them
|| in_array($commandName, array('', 'list'), true)
|| in_array($commandName, array('', 'list', 'help'), true)
);
if ($mayNeedPluginCommand && !$this->disablePluginsByDefault && !$this->hasPluginCommands && 'global' !== $commandName) {
if ($mayNeedPluginCommand && !$this->disablePluginsByDefault && !$this->hasPluginCommands) {
try {
foreach ($this->getPluginCommands() as $command) {
if ($this->has($command->getName())) {