From acec12b96dfbf8e7802eaf3256643932ba6e8824 Mon Sep 17 00:00:00 2001 From: Roman Kelesidis Date: Sat, 21 Jun 2025 10:13:31 +0300 Subject: [PATCH] refactor: Changed `local` environment name to `development` --- common.php | 2 +- src/Dev.php | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/common.php b/common.php index 7874fd589..de0a8cab4 100644 --- a/common.php +++ b/common.php @@ -158,7 +158,7 @@ function _e(string $key, mixed $default = null): void * Initialize debug */ define('APP_ENV', env('APP_ENV', 'production')); -if (APP_ENV === 'local') { +if (APP_ENV === 'development') { define('DBG_USER', true); // forced debug } else { define('DBG_USER', isset($_COOKIE[COOKIE_DBG])); diff --git a/src/Dev.php b/src/Dev.php index 40b96cbca..8348c52f6 100644 --- a/src/Dev.php +++ b/src/Dev.php @@ -49,14 +49,14 @@ class Dev { $this->whoops = new Run; - if (DBG_USER) { + if ($this->isDebugEnabled()) { $this->getWhoopsOnPage(); } else { $this->getWhoopsPlaceholder(); } $this->getWhoopsLogger(); - if (APP_ENV !== 'local') { + if (!$this->isDevelopmentEnvironment()) { $this->getTelegramSender(); $this->getBugsnag(); } @@ -416,13 +416,13 @@ class Dev } /** - * Check if application is in local environment + * Check if application is in development environment * * @return bool */ - public function isLocalEnvironment(): bool + public function isDevelopmentEnvironment(): bool { - return APP_ENV === 'local'; + return APP_ENV === 'development'; } /**