-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[TwigBundle] properly set request attributes in controller test #12539
Conversation
xabbuh
commented
Nov 21, 2014
Q | A |
---|---|
Bug fix? | yes |
New feature? | no |
BC breaks? | no |
Deprecations? | no |
Tests pass? | yes |
Fixed tickets | |
License | MIT |
Doc PR |
@@ -122,7 +122,7 @@ protected function findTemplate(Request $request, $format, $code, $showException | |||
// default to a generic HTML exception | |||
$request->setRequestFormat('html'); | |||
|
|||
return new TemplateReference('TwigBundle', 'Exception', $this->debug ? 'exception_full' : $name, 'html', 'twig'); | |||
return new TemplateReference('TwigBundle', 'Exception', $name, 'html', 'twig'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this change is wrong. It won't display the full exception template in debug mode when the original format was not HTML.
However, it should use $showException
, not $this->debug
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm, this check is actually performed in line 103 before, isn't it? That's the reason I removed it here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, you're right about the format.
8facb9b
to
b3db574
Compare
👍 |
Thank you @xabbuh. |
… test (xabbuh) This PR was merged into the 2.6 branch. Discussion ---------- [TwigBundle] properly set request attributes in controller test | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | | License | MIT | Doc PR | Commits ------- b3db574 properly set request attributes in controller test