jalismrs/symfony.common.command

Adds Symfony command abstract classes

1.1.2 2021-03-04 10:49 UTC

This package is auto-updated.

Last update: 2024-04-04 17:52:22 UTC


README

Adds Symfony command abstract classes

Test

phpunit or vendor/bin/phpunit

coverage reports will be available in var/coverage

Use

CommandAbstract

use Jalismrs\Symfony\Common\CommandAbstract;

class SomeCommand extends CommandAbstract {

}

MetaCommandAbstract

use Jalismrs\Symfony\Common\MetaCommandAbstract;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;

class SomeCommand extends MetaCommandAbstract {
    protected function execute(
        InputInterface $input,
        OutputInterface $output
    ): int {
        return $this->runCommand(
            'app:command',
            [
                'parameter' => 'value',
            ],
            $input,
            $output,
        );
    }
}