From 45ec3af6690ec3361328ad89cef941c179bb4fcb Mon Sep 17 00:00:00 2001 From: Eduardo Cruz Date: Wed, 13 Aug 2025 21:20:02 -0300 Subject: [PATCH 1/4] fix: replace APP_DEBUG with environment-based gating MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replace the APP_DEBUG check with environment-based gating to fix issue where boost:install command is unavailable when debug=false. The package now only enables in 'local' and 'testing' environments, which is more appropriate for a dev package and aligns with how other Laravel dev tools handle environment gating. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- src/BoostServiceProvider.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/BoostServiceProvider.php b/src/BoostServiceProvider.php index e59b7f5..dacbeb3 100644 --- a/src/BoostServiceProvider.php +++ b/src/BoostServiceProvider.php @@ -55,7 +55,7 @@ public function register(): void public function boot(Router $router): void { - if (config('app.debug', false) !== true) { + if (! app()->environment(['local', 'testing'])) { return; } From 23bd0f18489fc0309a778e29562a712715bc0611 Mon Sep 17 00:00:00 2001 From: Ashley Hindle Date: Thu, 14 Aug 2025 18:10:24 +0100 Subject: [PATCH 2/4] Combine local environment detection forces --- src/BoostServiceProvider.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/BoostServiceProvider.php b/src/BoostServiceProvider.php index dacbeb3..1eed63d 100644 --- a/src/BoostServiceProvider.php +++ b/src/BoostServiceProvider.php @@ -55,7 +55,8 @@ public function register(): void public function boot(Router $router): void { - if (! app()->environment(['local', 'testing'])) { + // Only enable Boost on local environments + if (! app()->environment(['local', 'testing']) && config('app.debug', false) !== true) { return; } From 006e28f7c5f186a7bf3c4792d58788b19a632367 Mon Sep 17 00:00:00 2001 From: Ashley Hindle Date: Thu, 14 Aug 2025 18:14:04 +0100 Subject: [PATCH 3/4] feat: add warning log so devs know if Boost can't boot --- src/BoostServiceProvider.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/BoostServiceProvider.php b/src/BoostServiceProvider.php index 1eed63d..69a091e 100644 --- a/src/BoostServiceProvider.php +++ b/src/BoostServiceProvider.php @@ -57,6 +57,8 @@ public function boot(Router $router): void { // Only enable Boost on local environments if (! app()->environment(['local', 'testing']) && config('app.debug', false) !== true) { + Log::warning('Boost can\'t boot as it can\'t detect if it\'s in a local environment.'); + return; } From ff7e16905b070e1fe41be51b26148cd5b2765dbf Mon Sep 17 00:00:00 2001 From: Ashley Hindle Date: Thu, 14 Aug 2025 18:31:38 +0100 Subject: [PATCH 4/4] Update BoostServiceProvider.php --- src/BoostServiceProvider.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/BoostServiceProvider.php b/src/BoostServiceProvider.php index 69a091e..1eed63d 100644 --- a/src/BoostServiceProvider.php +++ b/src/BoostServiceProvider.php @@ -57,8 +57,6 @@ public function boot(Router $router): void { // Only enable Boost on local environments if (! app()->environment(['local', 'testing']) && config('app.debug', false) !== true) { - Log::warning('Boost can\'t boot as it can\'t detect if it\'s in a local environment.'); - return; }