Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Add an action to show *error* pages in kernel.debug mode #12096

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

Closed
wants to merge 6 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Make createResponse method protected
The docs (http://symfony.com/doc/current/cookbook/controller/error_pages.html) explicitly
mentioned subclassing the controller and overriding the showAction method to pass
additional variables to the template.

The variables are now defined in createResponse(), so I'd like to keep the possibility
to change them. The new testErrorPageAction() method might even work in these cases.
  • Loading branch information
mpdude committed Oct 4, 2014
commit 6b6c678d8319bf3d22aaf070c37baf8830902d8c
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ protected function templateExists($template)
*
* @return Response
*/
private function createResponse(Request $request, FlattenException $exception, $debug, DebugLoggerInterface $logger = null, $currentContent = '')
protected function createResponse(Request $request, FlattenException $exception, $debug, DebugLoggerInterface $logger = null, $currentContent = '')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should be private

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was in the meantime, but I reverted it back to protected.

Reason: The docs mention subclassing this controller in order to pass additional variables to the template. As this part of the code as moved from the showAction to this method, I'd like to keep the possibility to override it.

@stof agree?

{
$code = $exception->getStatusCode();

Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.