radebatz / managed-service
Generic silex multi config service service provider.
Requires
- php: >=5.3.0
- silex/silex: ~2.0@dev
Requires (Dev)
- phpunit/phpunit: ~4.5
- satooshi/php-coveralls: dev-master
This package is auto-updated.
Last update: 2023-12-27 12:33:56 UTC
README
Caution:
The master branch now depends on Silex 2.
For Silex 1.x applications use the 1.x version(s).
Managed services is a Silex service provider that allows to manage a given service for multiple configurations.
If you find yourself writing new service providers just to wrap another service class with multiple different configurations in a single application, then this might be for you.
Features
Managed services works similar to the DoctrineServiceProvider
. It allows to configure
multiple instances of a service with different options.
Instead of writing a new custom service provider for each service (even 3rd party) just
wrap them in an instance of ManagedServiceProvider
.
Installation
The recommended way to install managed-services is through composer.
Install the latest version with:
$ composer require radebatz/managed-service
Alternatively, you can download the managed-service.zip
file and extract it.
Tests
Managed service comes with a (comprehensive) set of unit tests.
To run the test suite, you will need PHPUnit.
License
Managed service is licensed under the MIT license.