Skip to content

Autodiscovery for existing commands in project #36

@alexmerlin

Description

@alexmerlin

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions