symfony/symfony — pull request #12440 by WouterJ (2014-11-09 16:02:53+00:00)
Title: [Important] Don't override dump() when DebugBundle isn't enabled

A lot of people have this problem already: Updating your 2.x (x<6) Symfony app to a 2.6 app results in no output when using `dump()`. The problem is that the native Twig `dump()` function is overriden by the TwigBundle, but if the DebugBundle isn't enabled the function will simply stop the execution of the function and no output is produced.

This PR fixes this by only overriding the `dump()` function if the DebugBundle was registered, otherwise the native twig `dump()` function will be used.

The Symfony 2.6 release notes should explain that people should register this bundle in their AppKernel if they want to have output.

| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -