Symfony Console for Mezzio

1.4.0 2021-12-09 19:05 UTC

This package is auto-updated.

Last update: 2022-05-16 09:15:08 UTC


Symfony Console for Mezzio

Continuous Integration

This packages brings Symfony Console to your Mezzio project. It uses the FactoryCommandLoader for lazy loading dependencies. The FactoryCommandLoader does almost a good job: It only loads the one command that is required. But if no command is requested, it still initializes all commands to get the descriptions for each command. This is fixed by using a LazyLoadingCommand. With a bit of reflection and magic it grabs the configuration from the original command while preventing the command from executing. This way you end with a list of all commands and their descriptions.


$ composer require xtreamwayz/mezzio-console




namespace App;

return [
    'dependencies' => [
        'factories' => [
            Console\MyCommand::class      => Console\MyCommandFactory::class,
            Console\AnotherCommand::class => Console\AnotherCommandFactory::class,

    'console' => [
        'commands' => [
            'my:command'      => Console\MyCommand::class,
            'another:command' => Console\AnotherCommand::class,


All project documentation is located in the ./docs folder. If you would like to contribute to the documentation, please submit a pull request. You can read the docs online: https://xtreamwayz.github.io/mezzio-console/


BEFORE you start work on a feature or fix, please read & follow the contributing guidelines to help avoid any wasted or duplicate effort.

Copyright and license

Code released under the MIT License. Documentation distributed under CC BY 4.0.