From 85fa09e3078944f06d507dc78cb4ca553b576029 Mon Sep 17 00:00:00 2001 From: Awilum Date: Fri, 7 Jun 2019 20:46:42 +0300 Subject: [PATCH] Flextype Core: Whoops Error Handler Integration! #117 --- flextype/bootstrap.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/flextype/bootstrap.php b/flextype/bootstrap.php index 39625f31..189b4d21 100755 --- a/flextype/bootstrap.php +++ b/flextype/bootstrap.php @@ -13,7 +13,6 @@ namespace Flextype; use Flextype\Component\Session\Session; -use Flextype\Component\ErrorHandler\ErrorHandler; use Flextype\Component\Registry\Registry; use Flextype\Component\Filesystem\Filesystem; use Thunder\Shortcode\ShortcodeFacade; @@ -37,6 +36,9 @@ Session::start(); // Configure application $config = [ 'settings' => [ + 'debug' => true, + 'whoops.editor' => 'atom', + 'whoops.page_title' => 'Error!', 'displayErrorDetails' => true, 'addContentLengthHeader' => true, 'addContentLengthHeader' => false, @@ -45,11 +47,9 @@ $config = [ 'outputBuffering' => 'append', 'responseChunkSize' => 4096, 'httpVersion' => '1.1', - 'twig' => [ 'cache' => PATH['site'] . '/cache/twig', ], - 'images' => [ 'driver' => 'gd', ], @@ -78,6 +78,11 @@ $flextype['csrf'] = function ($container) { */ $app->add($flextype->get('csrf')); +/** + * as + */ +$app->add(new \Zeuxisoo\Whoops\Provider\Slim\WhoopsMiddleware($app)); + /** * Add emitter service to Flextype container */