jalismrs / symfony.common.command
添加 Symfony 命令抽象类
这个包的官方仓库似乎已丢失,因此包已被冻结。
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
添加 Symfony 命令抽象类
测试
phpunit
或 vendor/bin/phpunit
覆盖率报告将在 var/coverage
中可用
用法
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, ); } }