symfony/symfony — pull request #3489 by everzet (2012-03-02 15:08:10+00:00)
Title: [HttpKernel] Bundle meta for extensions and compiler passes

```
Bug fix: no
Feature addition: no
Backwards compatibility break: yes (partly, only if you use `BundleInterface` instead of extending base `Bundle` class)
Symfony2 tests pass: yes
```

This PR introduces new method to the `BundleInterface` - `getMeta()`.
This method returns meta information related to bundle, like `resources_path` or `translations_path`,
that could be used inside extension or compiler pass classes as `Kernel::getParameters()` now
returns special `kernel.bundles_meta` array in addition to `kernel.bundles`.

Before this change, there was no ability to get predefined in `getPath()` bundle path in extensions or
compiler passes, so bundle developers finished doing something like this:
https://github.com/symfony/AsseticBundle/blob/master/DependencyInjection/Compiler/TemplateResourcesPass.php#L35-42
https://github.com/symfony/FrameworkBundle/blob/master/DependencyInjection/FrameworkExtension.php#L515-518

We had hardcoded paths to the bundle resources and even worse, restricted bundle class to live
inside bundle folder. But in some cases, it's not an option (RadBundle ?).

Anyway, we think that this change will lead to much cleaner and extensible bundles interface
in future.

If this PR will be accepted, i will adapt 3rd-party bundles to this new `kernel.bundles_meta`
stuff.