2017 © Pedro Peláez
 

library middleware-whoops

Whoops Middleware

image

phpsdk/middleware-whoops

Whoops Middleware

  • Tuesday, January 17, 2017
  • by slavcodev
  • Repository
  • 1 Watchers
  • 0 Stars
  • 39 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Whoops middleware

This package contains a middleware that catches all exceptions and redirects those to the Whoops error handling library., (*1)

Install

Via Composer, (*2)

composer require phpsdk/middleware-whoops

Usage

Just use the ClientMiddleware or ServerMiddleware class in your middleware stack:, (*3)

use PhpSDK\Http\Middleware\Whoops\ServerMiddleWare as WhoopsServerMiddleWare;
use Whoops;

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

$middleware = new WhoopsServerMiddleWare($whoops, new Response('Default error', 500));

$stack = $stack->withMiddleware($middleware);

If an exception is thrown, or an error is raised, Whoops will display a nice error message:, (*4)

Whoops!, (*5)

Testing

# install required files
composer self-update
composer install

# run the test (from project root)
phpunit

Credits

License

The BSD 2-Clause License. Please see [LICENSE][link-license] for more information., (*6)

The Versions

17/01 2017

dev-master

9999999-dev

Whoops Middleware

  Sources   Download

BSD-2-Clause

The Requires

 

by Veaceslav Medvedev

middleware whoops psr-15

17/01 2017

0.1.1

0.1.1.0

Whoops Middleware

  Sources   Download

BSD-2-Clause

The Requires

 

by Veaceslav Medvedev

middleware whoops psr-15