2017 © Pedro Peláez
 

library console

Improved symfony console

image

funivan/console

Improved symfony console

  • Sunday, October 23, 2016
  • by funivan
  • Repository
  • 1 Watchers
  • 0 Stars
  • 7,893 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 2 Open issues
  • 5 Versions
  • 10 % Grown

The README.md

Console

Packagist Software License Build Status Coverage Status Quality Score Total Downloads, (*1)

Improved symfony console, (*2)

Install

Via Composer, (*3)

``` bash composer require funivan/console, (*4)


## Usage ``` php use Funivan\Console\CommandsLoader\FileSystemCommandsLoader; use Funivan\Console\NameResolver\StandardNameResolver; use Funivan\Console\SingleState\SingleStateConfigurator; $configurator = new \Funivan\Console\ConsoleApplicationConfigurator(); $dispatcher = new \Symfony\Component\EventDispatcher\EventDispatcher(); $configurator->setEventDispatcher($dispatcher); $finder = new \Symfony\Component\Finder\Finder(); $finder->files()->in(__DIR__ . '/commands/')->name('*.php'); # load commands from commands dir # Base namespace is 'Commands' $commandsLoader = (new FileSystemCommandsLoader($finder, new StandardNameResolver('Commands'))); $configurator->setCommandsLoader($commandsLoader); $singleStateConfigurator = new SingleStateConfigurator(); $configurator->setSingleStateConfigurator($singleStateConfigurator); # configure your app $consoleApp = new \Funivan\Console\ConsoleApplication(); $configurator->configure($consoleApp); $consoleApp->run();

Testing

bash ./vendor/bin/phpunit, (*5)

Contributing

Please see CONTRIBUTING for details., (*6)

Credits

License

The MIT License (MIT). Please see License File for more information., (*7)

The Versions