alextartan / mezzio-symfony-console
This project adds a executable file to the composer bin folder to run symfony commands under a mezzio application environment.
3.1.0
2023-05-12 11:57 UTC
Requires
- php: ^8.0 || ^8.1 || ^8.2
- psr/container: ^1.1.2 || ^2.0.2
- symfony/console: ^v6.2.5
Requires (Dev)
- infection/infection: ^0.25.5
- jangregor/phpstan-prophecy: 1.0.0
- php-coveralls/php-coveralls: 2.5.2
- phpspec/prophecy: 1.*
- phpstan/phpstan: 1.9.17
- phpstan/phpstan-phpunit: ^1.3.4
- phpstan/phpstan-strict-rules: ^1.4.5
- phpunit/phpunit: ^9.6.3
- squizlabs/php_codesniffer: ^3.6.2
This package is auto-updated.
Last update: 2024-11-12 15:07:05 UTC
README
mezzio symfony console
This project adds a executable file to the composer bin folder to run symfony commands under a zend-expressive application environment.
Installation
Requirements
- PHP 8.2
- a config/container.php file (returns a ContainerInterface instance)
Composer installation
$ composer require alextartan/mezzio-symfony-console
Configuration
zend-expressive configuration
Add the \AlexTartan\Mezzio\SymfonyConsole\ConfigProvider to the config/config.php file.
Configuration of the symfony console application
- Add this configuration to your application config (ex.: config/autoload/mezzio-sf-console.global.php).
- It is recommended to define the command name.
[ 'mezzio-symfony-console' => [ 'name' => 'Console Name', 'version' => '1.0.0', // optional 'commands' => [ // add the command service names here // ex.: 'foo:bar' => Command::class, // recommended, lazy // ex.: Command::class, // not lazy ], ], 'dependencies' => [ 'factories' => [ // add commands as a service to the container // ex.: Command::class => CommandFactory::class, ], ], ],
Run commands
This module adds a executable file under the composer bin directory to execute symfony commands.
$ vendor/bin/mezzio-sf-console list