symfony/symfony — pull request #4540 by jalliot (2012-06-09 17:13:27+00:00)
Title: [HttpKernel] Automatically give the kernel to bundles

Bug fix: no
Feature addition: yes
Backwards compatibility break: yes (only for people reimplementing `BundleInterface` themselves)
Symfony2 tests pass: yes
Fixes the following tickets: -
Todo: -

This PR makes the bundles Kernel-aware. That should allow to simplify some bundles' constructors (I'm thinking [JMSDiExtraBundle](https://github.com/schmittjoh/JMSDiExtraBundle/blob/master/JMSDiExtraBundle.php#L35) and [JMSSerializerBundle](https://github.com/schmittjoh/JMSSerializerBundle/blob/master/JMSSerializerBundle.php#L37) for instance).
This might also allow to create a composer installer for Symfony bundles (which would have it difficult with the 2 mentioned bundles...).

I think the BC break is not a big one (does someone reimplement `BundleInterface` instead of using the `Bundle` class as a parent?) but we can always create a new interface in order to keep BC if you want so.