Skip to content
 
 

Latest commit

 

History

26 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

phpdebugbar middleware Build Status

PHP Debug bar middleware with PSR-7

This middleware provide framework-agnostic possibility to attach PHP Debug bar to your response (html on non-html!).

Installation

{
    "require": {
        "php-middleware/php-debug-bar": "^1.1.0"
    }
}

To build this middleware you need to injecting inside PhpDebugBarMiddleware instance DebugBar\JavascriptRenderer (you can get it from DebugBar\StandardDebugBar) and add middleware to your middleware runner. Or use default factory.

$debugbar = new DebugBar\StandardDebugBar();
$debugbarRenderer = $debugbar->getJavascriptRenderer('/phpdebugbar');
$middleware = new PhpMiddleware\PhpDebugBar\PhpDebugBarMiddleware($debugbarRenderer);

// OR

$factory = PhpMiddleware\PhpDebugBar\PhpDebugBarMiddlewareFactory();
$middleware = $factory();

$app = new MiddlewareRunner();
$app->add($middleware);
$app->run($request, $response);

You don't need to copy any static assets from phpdebugbar vendor!

It's just works with any modern php framework!

Middleware tested on:

Middleware should works with:

And any other modern framework supported middlewares and PSR-7.

About

PHP Debug bar middleware with PSR-7

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages