Skip to content

Commit 108abf8

Browse files
committed
Add a failsafe on option retrieval for invokable
1 parent 9d6985b commit 108abf8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Maker/MakeCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ public function generate(InputInterface $input, ConsoleStyle $io, Generator $gen
8181
\sprintf('The "%s" command name is not valid because it would be implemented by "%s" class, which is not valid as a PHP class name (it must start with a letter or underscore, followed by any number of letters, numbers, or underscores).', $commandName, Str::asClassName($commandName, 'Command'))
8282
);
8383

84-
$input->getOption('invokable') ?
84+
$this->supportsInvokableCommand() && $input->getOption('invokable') ?
8585
$this->generateInvokableCommand($commandName, $commandClassNameDetails, $io, $generator) :
8686
$this->generateInheritanceCommand($commandName, $commandClassNameDetails, $io, $generator);
8787
}

0 commit comments

Comments
 (0)