middlewares/whoops

Name: whoops

Owner: Middlewares

Description: PSR-15 middleware to use Whoops as error handler

Created: 2016-10-02 10:25:40.0

Updated: 2018-05-23 20:22:26.0

Pushed: 2018-05-23 20:25:59.0

Homepage:

Size: 36

Language: PHP

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

middlewares/whoops

Latest Version on Packagist Software License Build Status Quality Score Total Downloads SensioLabs Insight

Middleware to use Whoops as error handler.

Requirements
Installation

This package is installable and autoloadable via Composer as middlewares/whoops.

oser require middlewares/whoops
Example
patcher = new Dispatcher([
new Middlewares\Whoops()


ponse = $dispatcher->dispatch(new ServerRequest());
Options
__construct(Whoops\Run $whoops = null, Whoops\Util\SystemFacade $system = null)

Allows to provide a custom Whoops\Run instance. If it's not defined, creates an instance automatically. You can provide also the SystemFacade used by the Run instance, in order to implement a special behaviour with fatal errors.

catchErrors(true)

To catch not only throwable exceptions, but also php errors. This makes whoops to be registered temporary in order to capture the errors using set_error_handler. It's enabled by default so, to disable it you have to use ->catchErrors(false);

handlerContainer(Psr\Container\ContainerInterface $container)

To define a custom PSR-11 container used to create the intance of Whoops\Handler\HandlerInterface based in the Accept header in the request.


Please see CHANGELOG for more information about recent changes and CONTRIBUTING for contributing details.

The MIT License (MIT). Please see LICENSE for more information.


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.