woody / middleware-whoops
Middleware PSR-15 compliant which handle Whoops library
Installs: 27
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/woody/middleware-whoops
Requires
- php: ^7.1
- woody/http-server-middleware: dev-master
Requires (Dev)
- filp/whoops: ^2.3
Suggests
- filp/whoops: Whoops core library
This package is auto-updated.
Last update: 2025-09-12 11:36:15 UTC
README
Whoops is a nice little library that helps you develop and maintain your projects better, by helping you deal with errors and exceptions in a less painful way.
https://filp.github.io/whoops/
Installation
To make this middleware work, you need to include the filp/whoops
in your project.
composer require --dev filp/whoops
Implementation
Any exception thrown in deeper middleware will be caught by Whoops to generate a dedicated page.
// @todo: generate request $debug = true; // Dispatch request into middleware stack. $dispatcher = new Dispatcher($debug); $dispatcher->pipe(new WhoopsMiddleware(true)); $dispatcher->pipe(new MyAppMiddleware()); // @todo: add other middleware $response = $dispatcher->handle($request);