symfony/symfony-standard — pull request #598 by gnugat (2013-10-17 20:33:43+00:00)
Title: Put enabled bundles in a configuration file

# Enabled bundles in a configuration file

Currently, the easiest way to enable a bundle is to manually edit the AppKernel (vs programmatically).

Enabling a bundle programmatically involves [Reflection and Zend engine's lexical scanner](https://github.com/sensiolabs/SensioGeneratorBundle/blob/9e29c8e898b98da6a3b63de80ad7679305262308/Manipulator/KernelManipulator.php#L46), how ridiculously complex!

So here's my proposal: use a configuration file to register bundles.

We have a configuration file which allows to register unrestricted bundles (bundles available in every environment) and restricted bundles (bundles available in the given set of environments).

## Possible BC breaks

Here are the possible BC breaks that comes to my mind:

1. bundles installation documentation should be changed
2. KernelManipulators implementation should also be changed

IMHO, we could improve bundle installation to make the first one unimportant (documentation will still be obsolete, but installation would be finished just after the first step `compose require `).

The second one would be trivial to fix (manipulating a YAML file instead of actually modifying the source code).
It all depends on how many people would be affected.
Except the SensioGeneratorBundle, do you know any library that would be affected?

## What do you think?

This is just a draft, so if you have any improvements, be sure to propose them!
If the idea of putting enabled bundles in a configuration file is terribly silly, go on and say it: I'd like to know your arguments.