Skip to content
This repository has been archived by the owner on Feb 14, 2023. It is now read-only.

Generate Symfony service based on definition in services.yml

License

Notifications You must be signed in to change notification settings

tweedegolf/service-generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tweede Golf Symfony Service Generator

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;
}

About

Generate Symfony service based on definition in services.yml

Resources

License

Stars

Watchers

Forks

Packages

No packages published