quazardous / silex-console
console service provider for Silex 2
Installs: 27 202
Dependents: 3
Suggesters: 1
Security: 0
Stars: 2
Watchers: 2
Forks: 1
Open Issues: 1
Requires
- silex/silex: ^2.0@dev
- symfony/console: ^3.0
This package is auto-updated.
Last update: 2024-11-20 11:50:51 UTC
README
Yet another one but for Silex 2 !
Intstallation
Add quazardous/silex-console to your composer.json and register the service.
$app->register(new Quazardous\Silex\Provider\ConsoleServiceProvider);
You can customize the provider with parameters :
- console.name
- console.version
- console.class
See tests/console.php for a full working minimum example.
Silex integration
The run() function triggers Silex\Application::boot() and Silex\Application::terminate();
Knp compatibility
https://github.com/KnpLabs/ConsoleServiceProvider
The provider dispatch a 'console.init' event like the Knp Console Provider. You can use it to register the commands.