Command-line interface for Laminas projects
Install the library using Composer:
$ composer require laminas/laminas-cli
$ vendor/bin/laminas [command-name]
if you want to add any command for Laminas MVC or Mezzio application just implement normal Symfony console command and add register the command for the cli:
return [
'laminas-cli' => [
'commands' => [
'package:command-name' => MyCommand::class,
],
],
];
Please remember that if command has some dependencies you should register also factory within the container, for example:
return [
'dependencies' => [
'factories' => [
MyCommand::class => MyCommandFactory::class,
],
],
];