Closed qqux closed 6 years ago
Using the "better DI" way. Keep in mind that in Slim, middlewares are executed the reverse order they're added. Therefore,
In this case, You can place this line anywhere no position required
is not really true in the current state, as the middlewares added before Whoops are not executed. This may result in unintended consequences.
<?php require('vendor/autoload.php'); $app = new \Slim\App(); $app->add(function ($req, $res, $next) { die('Should display this'); }); $app->add(new \Zeuxisoo\Whoops\Provider\Slim\WhoopsMiddleware($app)); $app->get('/', function ($req, $res) { die('Should not display this'); }); $app->run();
Thank you for your report. You may be right. I will find time to fix this problem
Using the "better DI" way. Keep in mind that in Slim, middlewares are executed the reverse order they're added. Therefore,
is not really true in the current state, as the middlewares added before Whoops are not executed. This may result in unintended consequences.