BaseCommand : fix default name when using CliCommand

master 3.8.2
Julien Rosset 9 months ago
parent 438e256ca3
commit ab5cab163e

@ -21,8 +21,10 @@ class BaseCommand extends Command {
if ($attribute = $reflectionClass->getAttributes(CliCommand::class)) {
/** @var CliCommand $cliCommandAttribute */
$cliCommandAttribute = $attribute[0]->newInstance();
if ($cliCommandAttribute->name !== null) {
return $cliCommandAttribute->name;
}
}
if (($name = parent::getDefaultName()) !== null) {
return $name;
}

Loading…
Cancel
Save