You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 29, 2020. It is now read-only.
Following the doc about debugbars, the php-middleware/php-debug-bar neither bitExpert/prophiler-psr7-middleware didn't work in a 'programmatic_pipelines' context.
What is the recommended way to pipe middleware only for development ?
For now I've ended up adding them in the config/pipeline.php file:
$app->pipe(ErrorHandler::class);
$debug = $app->getContainer()->get('config')['debug'] ?? false;
if ($debug) {
/* example with phpdebugbar */$debugBarFactory = new \PhpMiddleware\PhpDebugBar\PhpDebugBarMiddlewareFactory();
$middleware = $debugBarFactory();
$app->pipe($middleware);
/* example with prophilermiddleware */$prophiler = new \Fabfuel\Prophiler\Profiler();
$toolbar = new \Fabfuel\Prophiler\Toolbar($prophiler);
$middleware = new \bitExpert\Http\Middleware\Psr7\Prophiler\ProphilerMiddleware($toolbar);
$app->pipe($middleware);
}
$app->pipe(ServerUrlMiddleware::class);
//...
Not sure if it's a good practive. BTW both debugbars looks pretty minimal. Is there any plan to have the ZendDeveloperTools toolbar for expressive ?
belgattitude
changed the title
Doc about debugbar in a programmatic_pipeline context
[Question] Doc about debugbar in a programmatic_pipeline context
May 24, 2017
Following the doc about debugbars, the
php-middleware/php-debug-bar
neitherbitExpert/prophiler-psr7-middleware
didn't work in a 'programmatic_pipelines' context.What is the recommended way to pipe middleware only for development ?
For now I've ended up adding them in the
config/pipeline.php
file:Not sure if it's a good practive. BTW both debugbars looks pretty minimal. Is there any plan to have the ZendDeveloperTools toolbar for expressive ?
The text was updated successfully, but these errors were encountered: