symfony/symfony — pull request #12147 by mpdude (2014-10-06 08:59:37+00:00)
Title: [TwigBundle] Fix that error page preview does not work for custom twig.exception_controller

The `testErrorPageAction()` always used the `showAction()` of TwigBundle's `ExceptionController`.
You can, however, configure an alternate controller by setting `twig.exception_controller`.

Thus, in order to get a proper preview, we need to forward to this configured controller (which
may be the default one).

This requires us to pass an additional parameter to `ExceptionController::showAction` to be able to
get the *error* page even if configured otherwise in the constructor.

(The other approach would have been to fiddle around with `ExceptionController`'s `debug` flag through a setter when going through the preview action, but that would have been even more messy.)