symfony/TwigBundle — pull request #1 by arodiss (2013-06-24 12:37:00+00:00)
Title: ExceptionController's debug is now twig.options.debug, not a kernel.debug

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

TwigBundle exposes configuration setting `debug` which is by default equal to `%kernel.debug%`.
This value can be overridden, but Twig's built-in ExceptionController always uses `%kernel.debug%` instead of `twig.oprions['debug']` so overriding does not affect it.
See e.g. [this question on StackOverflow](http://stackoverflow.com/questions/16833201/symfony-2-get-error-instead-of-debug-page-on-test-environment-how-to-set-deb)
I faced this problem when tried to write tests for my custom 404 page. I set twig.debug to "false" in config_test.yml, but it still displayed stacktrace info instead of my custom 404 page