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>
main
JDev4U 3 years ago committed by GitHub
parent aa4de3b13d
commit 11810e3c2d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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())) {

Loading…
Cancel
Save