Download the PHP package articus/container-interop-symfony-console without Composer
On this page you can find all versions of the php package articus/container-interop-symfony-console. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download articus/container-interop-symfony-console
More information about articus/container-interop-symfony-console
Files in articus/container-interop-symfony-console
Package container-interop-symfony-console
Short Description Symfony Console Application factory for PSR-11 containers
License MIT
Informations about the package container-interop-symfony-console
Container Interop for Symfony Console
This package provides a small factory that allows creating Symfony Console Application via PSR-11 compatible container. The code is dead simple, I just tired of copying it between projects :)
Quick start for application using Laminas Service Manager (fka Zend Service Manager)
Let's imagine that you have an existing application using Laminas Service Manager and it requires some console utility.
First of all you need to add articus/container-interop-symfony-console
package to your composer.json.
Next step is configuring your console application. Here is a small example (it is in YAML just for readability):
Configuration should be available via config
service of your container. Check src/ContainerInteropSymfonyConsole/Options.php
for full list of available options.
Finally, you need to create PHP-script that will be your console application entrypoint. For example bin/console.php
file with the following content:
Now if you execute php bin/console.php list
your console command should be listed and it should be possible to launch it.
All versions of container-interop-symfony-console with dependencies
psr/container Version ^1.0|^2.0
symfony/console Version ^4.0|^5.0|^6.0