Description
Description
With all the recent changes towrds configuring things using PHP I wonder why not providing the possibility to provide bundle configuration directly inside the bundle class. Currently developers need to create an extension class and then a Resources/services.php file to return the configuration definition.
I think it could be a great improvement to provide an empty method in Symfony\Component\HttpKernel\Bundle\Bundle that can be overridden to just return that same configuration you would return in the Resources/services.php file.
Example
From developer perspective it could look like this in a bundle class:
class ByAwesomeBundle extends Bundle
{
protected function configureContainer(ContainerConfigurator $container)
{
// Do whatever you like to configure the container for the bundle.
}
}
Or I'm not 100% sure how the system works maybe the method needs to return Closure to work with the container building system.
I just wanted to report this idea. :o)