Whoops Middleware Save

PSR-15 compatible middleware for Whoops, the pretty error handler

Project README

PSR-15 middleware for Whoops

A PSR-15 compatible middleware for Whoops, the fantastic pretty error handler for PHP.

Installation

You can install the library using Composer:

composer require franzl/whoops-middleware

Usage

Assuming you are using a PSR-15 compatible middleware dispatcher (such as zend-stratigility, Relay, or broker), all you need to do is add the middleware class to your pipeline / broker / dispatcher ...

This might look as follows:

Stratigility

$pipe->pipe(new \Franzl\Middleware\Whoops\WhoopsMiddleware)

Relay

$queue = [];
// ...
$queue[] = new \Franzl\Middleware\Whoops\WhoopsMiddleware;
$relay = new Relay($queue);

broker

$broker->always(\Franzl\Middleware\Whoops\WhoopsMiddleware::class)
Open Source Agenda is not affiliated with "Whoops Middleware" Project. README Source: franzliedke/whoops-middleware
Stars
28
Open Issues
0
Last Commit
2 years ago
License
MIT

Open Source Agenda Badge

Open Source Agenda Rating