From 19462bfcfd33a5dd6e6efcb9385efd3b6944aac3 Mon Sep 17 00:00:00 2001 From: Rachman Chavik <39490+rchavik@users.noreply.github.com> Date: Sun, 25 Jun 2023 19:24:18 +0700 Subject: [PATCH] chore: update core deps for dev --- composer.json | 4 ++-- config/app.php | 2 +- config/bootstrap.php | 12 +++++------- 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/composer.json b/composer.json index 300dc11..daf6e1b 100644 --- a/composer.json +++ b/composer.json @@ -23,10 +23,10 @@ ], "require": { "php": ">=7.2", - "cakephp/cakephp": "~4.1.0", + "cakephp/cakephp": "^4.4", "cakephp/migrations": "^3.0", "cakephp/plugin-installer": "~1.2.0", - "croogo/croogo": "5.0.x-dev", + "croogo/croogo": "dev-rchavik/5.0", "mobiledetect/mobiledetectlib": "^2.8" }, "require-dev": { diff --git a/config/app.php b/config/app.php index 40aefd0..02a4d30 100644 --- a/config/app.php +++ b/config/app.php @@ -7,7 +7,7 @@ use Croogo\Core\Error\ExceptionRenderer; $appName = 'myapp'; -$cachePrefix = "${appName}_"; +$cachePrefix = "{$appName}_"; return [ /* diff --git a/config/bootstrap.php b/config/bootstrap.php index 615df3d..f614636 100644 --- a/config/bootstrap.php +++ b/config/bootstrap.php @@ -36,7 +36,8 @@ use Cake\Core\Configure\Engine\PhpConfig; use Cake\Datasource\ConnectionManager; use Cake\Error\ConsoleErrorHandler; -use Cake\Error\ErrorHandler; +use Cake\Error\ErrorTrap; +use Cake\Error\ExceptionTrap; use Cake\Http\ServerRequest; use Cake\Log\Log; use Cake\Mailer\Mailer; @@ -120,16 +121,13 @@ /* * Register application error and exception handlers. */ -$isCli = PHP_SAPI === 'cli'; -if ($isCli) { - (new ConsoleErrorHandler(Configure::read('Error')))->register(); -} else { - (new ErrorHandler(Configure::read('Error')))->register(); -} +(new ErrorTrap(Configure::read('Error')))->register(); +(new ExceptionTrap(Configure::read('Error')))->register(); /* * Include the CLI bootstrap overrides. */ +$isCli = PHP_SAPI === 'cli'; if ($isCli) { require __DIR__ . '/bootstrap_cli.php'; }