thecodingmachine / symfony-console-universal-module
Cross-framework module for symfony/console.
Requires
- php: >=7.0
- container-interop/service-provider: ~0.3.0
- symfony/console: ~3.0
- symfony/event-dispatcher: ~3.0
This package is auto-updated.
Last update: 2024-12-07 01:14:36 UTC
README
Symfony console universal module
This package integrates symfony/console in any container-interop compatible framework/container.
Installation
composer require thecodingmachine/symfony-console-universal-module
Once installed, you need to register the TheCodingMachine\SymfonyConsoleServiceProvider
into your container.
If your container supports thecodingmachine/discovery integration, you have nothing to do. Otherwise, refer to your framework or container's documentation to learn how to register service providers.
Introduction
This service provider is meant to create a Symfony console in your container.
You can access the console using: vendor/bin/app_console
.
For the console to work, you need to have a container.php
file at the root of your project or in the 'config' directory. This file MUST returns your application's container.
This file will be used by the Symfony console to access and start the application.
Sample:
container.php (or config/container.php)
<?php use Simplex\Container; $container = new Container([new \TheCodingMachine\SymfonyConsoleServiceProvider()]); return $container;
Provided services
This service provider provides the following services:
Project template courtesy of thecodingmachine/service-provider-template