Download the PHP package metglobal/composer-service-handler without Composer
On this page you can find all versions of the php package metglobal/composer-service-handler. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download metglobal/composer-service-handler
More information about metglobal/composer-service-handler
Files in metglobal/composer-service-handler
Package composer-service-handler
Short Description Composer script handling for generating service definitions from class annotation
License MIT
Informations about the package composer-service-handler
Symfony annotation-based services.yml generator
Use Case
Minimizing conflict issues occurred by single-file based services.yml dependency injections
Installation
-
Install with composer
-
Add
command of "symfony-scripts" list in composer.json. It should look like following:"scripts": { ... "post-install-cmd": [ "Metglobal\\ServiceHandler\\ScriptHandler::buildServices", "@auto-scripts" ], "post-update-cmd": [ "Metglobal\\ServiceHandler\\ScriptHandler::buildServices", "@auto-scripts" ], "post-autoload-dump": [ "Metglobal\\ServiceHandler\\ScriptHandler::buildServices" ], }
-
Define which bundles will have automatic generated services.yml in app folder
service.yml
`` "extra": { ... "metglobal-services": { "file": "config/services.yaml" } } - Add
services.yml
to .gitignore
Usage
services.yml will be auto-generated after each each execution
composer install
or composer update
command
Usage of @Service
annotation at repository class
``
Usage of @Service
annotation at event listener class
``
@Service
annotation does not have any different usage than a
services.yml based definition.
All versions of composer-service-handler with dependencies
doctrine/annotations Version ^1.4
symfony/yaml Version ^3.4|^4.4|^5.2
symfony/finder Version ^3.4|^4.4|^5.2