jalismrs / symfony.common.command
Adds Symfony command abstract classes
This package's canonical repository appears to be gone and the package has been frozen as a result.
1.1.2
2021-03-04 10:49 UTC
Requires
- php: ^7.4 || ^8.0
- jalismrs/common.exception: ^1.0.0
- psr/log: ^1.1.3
- symfony/console: ^5.0
- symfony/dependency-injection: ^5.0
Requires (Dev)
- composer/package-versions-deprecated: dev-master
- phpunit/phpunit: 9.4.2
- roave/security-advisories: dev-master
Suggests
- symfony/monolog-bundle: Adds monolog integration
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, ); } }