Skip to content

Commit

Permalink
check subclass for cli commands to be \Symfony\Component\Console\Comm…
Browse files Browse the repository at this point in the history
…and\Command as the installcommand does not use \Froxlor\Cli\CliCommand

Signed-off-by: Michael Kaufmann <[email protected]>
  • Loading branch information
d00p committed Dec 7, 2023
1 parent 46391c0 commit 3a8f48d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bin/froxlor-cli
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ foreach ($cmd_files as $cmdFile) {
// create class-name including namespace
$cmdClass = "\\Froxlor\\Cli\\" . substr(basename($cmdFile), 0, -4);
// check whether it exists
if (class_exists($cmdClass) && is_subclass_of($cmdClass, '\Froxlor\Cli\CliCommand')) {
if (class_exists($cmdClass) && is_subclass_of($cmdClass, '\Symfony\Component\Console\Command\Command')) {
// add to cli application
$application->add(new $cmdClass());
}
Expand Down

0 comments on commit 3a8f48d

Please sign in to comment.