Issue:
Every time a new command is created, it needs to be added manually to the project's config/autoload/cli.global.php file.
Goal:
make dot-cli automatically identify commands in project so it's no longer needed adding them manually in a config file
make feature toggleable so that when disabled, dot-cli does not try to find commands but reads them from the config file
Solution:
Run through each module's dependencies and look for any class that is an instance of Symfony\Component\Console\Command\Command.
After identifying commands, we can register them automatically in the application.
Feature should be enabled by default, but it needs a configuration in the config file
'autodiscovery' => [
'enabled' => true,
],
where it can be disabled making dot-cli see only the pre-configured commands.
Issue: Every time a new command is created, it needs to be added manually to the project's config/autoload/cli.global.php file.
Goal:
dot-cli
automatically identify commands in project so it's no longer needed adding them manually in a config filedot-cli
does not try to find commands but reads them from the config fileSolution: Run through each module's dependencies and look for any class that is an instance of
Symfony\Component\Console\Command\Command
. After identifying commands, we can register them automatically in the application. Feature should be enabled by default, but it needs a configuration in the config filewhere it can be disabled making
dot-cli
see only the pre-configured commands.