Skip to content

Commit 2ac8fbb

Browse files
authored
Make stronger assertion before caching commands (#40628)
1 parent 4d0f0f1 commit 2ac8fbb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Illuminate/Console/Application.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ protected function addToParent(SymfonyCommand $command)
267267
*/
268268
public function resolve($command)
269269
{
270-
if (class_exists($command) && ($commandName = $command::getDefaultName())) {
270+
if (is_subclass_of($command, SymfonyCommand::class) && ($commandName = $command::getDefaultName())) {
271271
$this->commandMap[$commandName] = $command;
272272

273273
return null;

0 commit comments

Comments
 (0)