Download the PHP package hkvstore/php-debug-bar without Composer
On this page you can find all versions of the php package hkvstore/php-debug-bar. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package php-debug-bar
phpdebugbar middleware 
PHP Debug Bar as framework-agnostic PSR-15 middleware with PSR-7 messages created by PSR-17 message factories. Also provides PSR-11 container invokable factories.
Framework-agnostic way to attach PHP Debug Bar to your response (html or non-html!).
Installation
To build middleware you need to inject DebugBar\JavascriptRenderer
(you can get it from DebugBar\StandardDebugBar
) inside PhpDebugBarMiddleware
and add it into your middleware runner:
You don't need to copy any static assets from phpdebugbar vendor!
How to force disable or enable PHP Debug Bar?
Sometimes you want to have control when enable or disable PHP Debug Bar:
- custom content negotiation,
- allow debug redirects responses.
We allow you to disable attaching phpdebugbar using X-Enable-Debug-Bar: false
header, cookie or request attribute.
To force enable just send request with X-Enable-Debug-Bar
header, cookie or request attribute with true
value.
PSR-17
This package isn't require any PSR-7 implementation - you need to provide it by own. Middleware require ResponseFactory and StreamFactory interfaces. List of existing interfaces.
... and PSR-11
If you use provided PSR-11 factories, then your container must have services registered as PSR-17 interface's name. Example for laminas-diactoros implementation and Pimple:
How to install on Mezzio?
You need to register PhpMiddleware\PhpDebugBar\ConfigProvider
and pipe provided middleware:
For more - follow Mezzio documentation.
How to install on Slim 3?
Register factories in container:
and add middleware from container to app:
How to configure using existing factories?
Put array with a configuration into PhpMiddleware\PhpDebugBar\ConfigProvider
service in your container:
You can override existing configuration by merge default configuration with your own (example):
It's just works with any modern php framework!
Middleware tested on:
And any other modern framework supported PSR-17 middlewares and PSR-7.
All versions of php-debug-bar with dependencies
php-debugbar/php-debugbar Version ^2.1.6
psr/http-server-handler Version ^1.0
psr/http-server-middleware Version ^1.0
psr/container-implementation Version ^1.0 || ^2.0
psr/http-message-implementation Version ^1.0
psr/http-factory-implementation Version ^1.0