/laminas-cli

Console command runner, exposing commands written in Laminas MVC and Mezzio components and applications

Primary LanguagePHPBSD 3-Clause "New" or "Revised" LicenseBSD-3-Clause

laminas-cli

Build Status Coverage Status

Command-line interface for Laminas projects

Installation

Via Composer

Install the library using Composer:

$ composer require laminas/laminas-cli

Usage

$ vendor/bin/laminas [command-name]

Custom command

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,
        ],
    ],
];