tweedegolf / service-generator
Generate Symfony service based on definition in services.yml
Installs: 10
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 4
Forks: 0
Open Issues: 0
Type:symfony-bundle
Requires
- php: >=5.6.0
- symfony/symfony: ~2.6|~3.0
This package is auto-updated.
Last update: 2023-03-01 00:25:56 UTC
README
Generates PHP class files from service definitions found in app/config/services.yml
Usage: bin/symfony generate:service
This command will prompt you to generate all
classes that are defines in services.yml
but do not exist in the current namespace.
Installation
Using Composer add the bundle to your requirements:
composer require --dev tweedegolf/service-generator
Add the bundle to your AppKernel
Finally add the bundle in app/AppKernel.php
:
public function registerBundles() { $bundles = [ // ... ]; if (in_array($this->getEnvironment(), ['dev', 'test'])) { // ... $bundles[] = new TweedeGolf\ServiceGenerator\ServiceGeneratorBundle(); } return $bundles; }