Are you happy with your logging solution? Would you help us out by taking a 30-second survey? Click here

whoops

PHP errors for cool kids

Subscribe to updates I use whoops


Statistics on whoops

Number of watchers on Github 6514
Number of open issues 22
Average time to close an issue 24 days
Main language PHP
Average time to merge a PR 6 days
Open pull requests 23+
Closed pull requests 34+
Last commit over 1 year ago
Repo Created over 6 years ago
Repo Last Updated over 1 year ago
Size 1.41 MB
Homepage http://filp.githu...
Organization / Authorfilp
Contributors65
Page Updated
Do you use whoops? Leave a review!
View open issues (22)
View whoops activity
View on github
Fresh, new opensource launches 🚀🚀🚀
Trendy new open source projects in your inbox! View examples

Subscribe to our mailing list

Evaluating whoops for your project? Score Explanation
Commits Score (?)
Issues & PR Score (?)

whoops

PHP errors for cool kids

Total Downloads Latest Version Reference Status Dependency Status Build Status Scrutinizer Quality Score Code Coverage


Whoops!

whoops is an error handler framework for PHP. Out-of-the-box, it provides a pretty error interface that helps you debug your web projects, but at heart it's a simple yet powerful stacked error handling system.

Features

  • Flexible, stack-based error handling
  • Stand-alone library with (currently) no required dependencies
  • Simple API for dealing with exceptions, trace frames & their data
  • Includes a pretty rad error page for your webapp projects
  • Includes the ability to open referenced files directly in your editor and IDE
  • Includes handlers for different response formats (JSON, XML, SOAP)
  • Easy to extend and integrate with existing libraries
  • Clean, well-structured & tested code-base

Installing

If you use Laravel 4 or Laravel 5.5+, you already have Whoops. There are also community-provided instructions on how to integrate Whoops into Silex 1, Silex 2, Phalcon, Laravel 3, Laravel 5, CakePHP 2, CakePHP 3, Zend 2, Zend 3, Yii 1, FuelPHP, Slim, Pimple, or any framework consuming StackPHP middlewares or PSR-7 middlewares.

If you are not using any of these frameworks, here's a very simple way to install:

  1. Use Composer to install Whoops into your project:

    composer require filp/whoops
    
  2. Register the pretty handler in your code:

    $whoops = new \Whoops\Run;
    $whoops->pushHandler(new \Whoops\Handler\PrettyPageHandler);
    $whoops->register();
    

For more options, have a look at the example files in examples/ to get a feel for how things work. Also take a look at the API Documentation and the list of available handers below.

You may also want to override some system calls Whoops does. To do that, extend Whoops\Util\SystemFacade, override functions that you want and pass it as the argument to the Run constructor.

Available Handlers

whoops currently ships with the following built-in handlers, available in the Whoops\Handler namespace:

  • PrettyPageHandler - Shows a pretty error page when something goes pants-up
  • PlainTextHandler - Outputs plain text message for use in CLI applications
  • CallbackHandler - Wraps a closure or other callable as a handler. You do not need to use this handler explicitly, whoops will automatically wrap any closure or callable you pass to Whoops\Run::pushHandler
  • JsonResponseHandler - Captures exceptions and returns information on them as a JSON string. Can be used to, for example, play nice with AJAX requests.
  • XmlResponseHandler - Captures exceptions and returns information on them as a XML string. Can be used to, for example, play nice with AJAX requests.

You can also use pluggable handlers, such as SOAP handler.

Authors

This library was primarily developed by Filipe Dobreira, and is currently maintained by Denis Sokolov. A lot of awesome fixes and enhancements were also sent in by various contributors. Special thanks to Graham Campbell and Markus Staab for continuous participation.

This software includes Prettify, licensed under Apache License 2.0. It is bundled only as a performance optimization.

whoops open issues Ask a question     (View All Issues)
  • almost 3 years Support xdebug-link-clicking
  • about 3 years Does not work in MAMP with vendor outside of public
whoops open pull requests (View All Pulls)
  • Dump frame arguments below the source code
  • Added dumping of variables under code
  • Added support for printing frame args in the framestack.
  • Pass Inspector into data table callbacks
  • Filter frames belonging to the application.
  • Prettify updates
  • Small ui improvements
  • Break filenames and namespaces on the delimiter
  • Remove all internals for objects not in the application namespaces
  • Overwrite globals and canSendheaders
  • Custom inspector
  • Add transition style to hover effect
  • Fixes 419
  • Fix issues with frameworks like Laravel on PHP7
  • bug fixes, adds prettyprint optimization
  • Fixes from PHPStan
  • Support PHPUnit 6
  • Bugfix/stacktrace is missing for haltable exceptions
  • normalize plain text exception extraction on PrettyPageHandler
  • Changed 404-ing repo to a new handler
  • Feature: add discovering public properties from Exception
  • Switch from div to span to allow copy and paste
  • CSS z-index fix
whoops questions on Stackoverflow (View All Questions)
  • Laravel 5.2 + Whoops
  • Laravel 5. Whoops error page not displaying. Shows blank page
  • Whoops, looks like something went wrong. Laravel
  • 502 Whoops, GitLab is taking too much time to respond
  • Whoops, looks like something went wrong. error in Laravel 5 when trying to run on built in server
  • Lumen - Whoops, looks like something went wrong
  • Whoops, looks like something went wrong. Laravel 5.1
  • Whoops, looks like something went wrong. Laravel 5.0
  • Laravel Whoops, looks like something went wrong appears twice
  • Laravel 'Whoops' error in Public after fresh Install
  • routes.php and whoops, looks like something went wrong
  • PHP Whoops Error Handler email
  • Whoops! Lost connection to undefined - Connection Lost Just After The Connection Established
  • Enable Whoops error console within Laravel
  • Whoops! There was an error. NotFoundHttpException
  • Laravel 4.2, Whoops and blank error pages with right <title> and app/storage writable
  • Homestead 502 Bad Gateway instead of Whoops for PHP errors
  • Whoops! There was a ...previewing this pdf document android
  • Laravel Form Submit Redirect to "Whoops, looks like something went wrong."
  • Laravel show Whoops debugger in dev environment
  • Change "Whoops, looks like something went wrong." message
  • Using Selenium to navigate to a url after sign-up causes a "whoops" html page to appear
  • Problems trying to running Symfony 2.0.14: "Whoops, looks like something went wrong"
  • "Whoops, looks like something went wrong." Laravel 4.1
  • Laravel capture whoops app-level exception and post to log with unique ID#
  • Whoops & Laravel 4.1.26
  • Add arguments to Whoops stack frames
  • Whoops error in laravel 4
  • Starting error with laravel 4 : Whoops! There was an error
  • Laravel 4: Whoops library and set_cookie function
whoops list of languages used
Other projects in PHP