Skip to content
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

[5.5] Fix Whoops exception rendering #19471

Merged

Conversation

thecrypticace
Copy link
Contributor

@thecrypticace thecrypticace commented Jun 4, 2017

The new Whoops setup is slightly broken. The defaults cause Whoops to output directly to the browser, call exit, and prevent testing when using the command line (because it returns an empty string when configured to not exit)

I've done a few things here:

  1. A slight refactoring around Whoops and Symfony error handlers to simplify things.
  2. Reconfigure whoops to always return a response to the exception handler
  3. Use Symfony's error handler as a backup if configuring or running Whoops fails.
  4. Fix a problem with rendering non-http exceptions that was hidden behind the fact that Whoops was calling exit.

Whoops will, by default, write directly to stdout and call exit. This prevents integration testing of whoops handled exceptions because phpunit will just stop.

The PrettyPageHandler is additionally setup to not return data in the CLI. Fix this by turning on unconditional handling.
This prevents white screens if something goes wrong with Whoops setup.
@thecrypticace thecrypticace changed the title Fix exception handler [5.5] Fix Whoops exception rendering Jun 4, 2017
@taylorotwell taylorotwell merged commit f2cd3c3 into laravel:master Jun 4, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants