Download the PHP package middlewares/whoops without Composer
On this page you can find all versions of the php package middlewares/whoops. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download middlewares/whoops
More information about middlewares/whoops
Files in middlewares/whoops
Package whoops
Short Description Middleware to use Whoops as error handler
License MIT
Homepage https://github.com/middlewares/whoops
Informations about the package whoops
middlewares/whoops
Middleware to use Whoops as error handler.
Requirements
- PHP >= 7.2
- A PSR-7 http library
- A PSR-15 middleware dispatcher
Installation
This package is installable and autoloadable via Composer as middlewares/whoops.
Example
Usage
The constructor accepts a Whoops\Run
instance but creates one automatically if it's not provided. Optionally, you can provide a Psr\Http\Message\ResponseFactoryInterface
as the second argument to create the response. If it's not defined, Middleware\Utils\Factory will be used to detect it automatically.
catchErrors
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
This option allows 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 CONTRIBUTING for contributing details.
The MIT License (MIT). Please see LICENSE for more information.
All versions of whoops with dependencies
filp/whoops Version ^2.5
middlewares/utils Version ^3.0 || ^4.0
psr/http-server-middleware Version ^1.0
psr/container Version ^1.0 || ^2.0