rquadling / abstract-console
There is no license information available for the latest version (v2.0.0) of this package.
Abstract Application and Command with Input and Output helpers used by RQuadling's projects
v2.0.0
2020-06-29 18:42 UTC
Requires
- php: ^7.4
- rquadling/class-file-conversion: ^2.0
- rquadling/dependency-injection: ^2.0
- rquadling/environment: ^2.0
- rquadling/reflection: ^2.0
- symfony/console: ^5.1
Requires (Dev)
- friendsofphp/php-cs-fixer: ^2.16
- phpstan/extension-installer: ^1.0
- phpstan/phpstan: ^0.12
- phpstan/phpstan-phpunit: ^0.12
- phpunit/phpunit: ^9.2
This package is auto-updated.
Last update: 2024-12-06 18:34:32 UTC
README
Abstract Application and Command with Input and Output helpers used by RQuadling's projects
Installation
Using Composer:
composer require rquadling/abstract-console
Dependency Injection
Add the following entries to your di.php
// Symfony Console Input wrapper to allow potential operation via a web based controller \Symfony\Component\Console\Input\InputInterface::class => function () { return new \RQuadling\Console\Input\Input(array_get($_SERVER, 'argv', [])); }, // Symfony Console Output wrapper to allow potential operation via a web based controller \Symfony\Component\Console\Output\OutputInterface::class => function (\Psr\Container\ContainerInterface $c) { return PHP_SAPI == 'cli' ? $c->get(\Symfony\Component\Console\Output\ConsoleOutput::class) : $c->get(\Symfony\Component\Console\Output\BufferedOutput::class); },
Environment variables
COMMAND_DIRECTORY
- Define the location of the Commands.COMMAND_NAMESPACE
- Define the namespace for the Commands.