Skip to content

php-middleware/phpdebugbar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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

PSR-15 middleware for PHP Debug bar

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages