Replace Whoops with Tracy

This commit is contained in:
Timothy Warren 2021-02-23 17:08:36 -05:00
parent 4524885a79
commit f0eacc2f93
2 changed files with 4 additions and 16 deletions

View File

@ -47,7 +47,6 @@
"ext-json": "*",
"ext-gd": "*",
"ext-pdo": "*",
"filp/whoops": "^2.1",
"laminas/laminas-diactoros": "^2.5.0",
"laminas/laminas-httphandlerrunner": "^1.1.0",
"maximebf/consolekit": "^1.0.3",
@ -59,7 +58,7 @@
"robmorgan/phinx": "^0.12.4",
"symfony/polyfill-mbstring": "^1.0.0",
"symfony/polyfill-util": "^1.0.0",
"symfony/var-dumper": "^5.0.7",
"tracy/tracy": "^2.8.0",
"yosymfony/toml": "^1.0.4"
},
"require-dev": {

View File

@ -17,9 +17,7 @@
namespace Aviat\AnimeClient;
use Aviat\AnimeClient\Types\Config as ConfigType;
use Whoops\Handler;
use Whoops\Run;
use Whoops\Util;
use Tracy\Debugger;
use function Aviat\Ion\_dir;
setlocale(LC_CTYPE, 'en_US');
@ -27,17 +25,8 @@ setlocale(LC_CTYPE, 'en_US');
// Load composer autoloader
require_once __DIR__ . '/vendor/autoload.php';
if (file_exists('.is-dev'))
{
$whoops = new Run;
$whoops->pushHandler(new Handler\PrettyPageHandler);
if (Util\Misc::isAjaxRequest()) {
$whoops->pushHandler(new Handler\JsonResponseHandler);
}
$whoops->register();
}
Debugger::$strictMode = true;
Debugger::enable(Debugger::DEVELOPMENT, __DIR__ . '/app/logs');
// Define base directories
$APP_DIR = _dir(__DIR__, 'app');