From df22f3c8ac908f9414256c4ef27e8628ea713daa Mon Sep 17 00:00:00 2001 From: Xu Chunyang Date: Wed, 6 Dec 2023 11:19:09 +0800 Subject: [PATCH 1/5] Show pulse version from artisan about command --- src/PulseServiceProvider.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/PulseServiceProvider.php b/src/PulseServiceProvider.php index 172d365d..070ffeaa 100644 --- a/src/PulseServiceProvider.php +++ b/src/PulseServiceProvider.php @@ -2,12 +2,14 @@ namespace Laravel\Pulse; +use Composer\InstalledVersions; use Illuminate\Auth\Events\Logout; use Illuminate\Contracts\Auth\Access\Gate; use Illuminate\Contracts\Console\Kernel as ConsoleKernel; use Illuminate\Contracts\Events\Dispatcher; use Illuminate\Contracts\Foundation\Application; use Illuminate\Contracts\Http\Kernel as HttpKernel; +use Illuminate\Foundation\Console\AboutCommand; use Illuminate\Queue\Events\Looping; use Illuminate\Queue\Events\WorkerStopping; use Illuminate\Routing\Router; @@ -76,6 +78,10 @@ public function boot(): void $this->registerResources(); $this->registerPublishing(); $this->registerCommands(); + + AboutCommand::add('Pulse', fn () => [ + 'Version' => InstalledVersions::getPrettyVersion('laravel/pulse'), + ]); } /** From 5eb4fa83f7e3a1fe21bcf7dbe0efc3d587c4add4 Mon Sep 17 00:00:00 2001 From: Tim MacDonald Date: Wed, 6 Dec 2023 15:13:29 +1100 Subject: [PATCH 2/5] Ensure is only run in the console --- src/PulseServiceProvider.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/PulseServiceProvider.php b/src/PulseServiceProvider.php index 070ffeaa..7f60efe8 100644 --- a/src/PulseServiceProvider.php +++ b/src/PulseServiceProvider.php @@ -78,10 +78,6 @@ public function boot(): void $this->registerResources(); $this->registerPublishing(); $this->registerCommands(); - - AboutCommand::add('Pulse', fn () => [ - 'Version' => InstalledVersions::getPrettyVersion('laravel/pulse'), - ]); } /** @@ -226,6 +222,10 @@ protected function registerCommands(): void Commands\RestartCommand::class, Commands\PurgeCommand::class, ]); + + AboutCommand::add('Pulse', fn () => [ + 'Version' => InstalledVersions::getPrettyVersion('laravel/pulse'), + ]); } } } From df99409104075387c0b5a8b326cd1cdca0fa557d Mon Sep 17 00:00:00 2001 From: Xu Chunyang Date: Thu, 7 Dec 2023 15:03:20 +0800 Subject: [PATCH 3/5] Display whether Pulse is enabled --- src/PulseServiceProvider.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/PulseServiceProvider.php b/src/PulseServiceProvider.php index 7f60efe8..35529846 100644 --- a/src/PulseServiceProvider.php +++ b/src/PulseServiceProvider.php @@ -225,6 +225,7 @@ protected function registerCommands(): void AboutCommand::add('Pulse', fn () => [ 'Version' => InstalledVersions::getPrettyVersion('laravel/pulse'), + 'Enabled' => json_encode(config('pulse.enabled')), ]); } } From b5396d34700a982f604a0261973f5ec79da86473 Mon Sep 17 00:00:00 2001 From: James Brooks Date: Thu, 7 Dec 2023 08:49:19 +0000 Subject: [PATCH 4/5] Format enabled output --- src/PulseServiceProvider.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PulseServiceProvider.php b/src/PulseServiceProvider.php index 35529846..a05d15d7 100644 --- a/src/PulseServiceProvider.php +++ b/src/PulseServiceProvider.php @@ -225,7 +225,7 @@ protected function registerCommands(): void AboutCommand::add('Pulse', fn () => [ 'Version' => InstalledVersions::getPrettyVersion('laravel/pulse'), - 'Enabled' => json_encode(config('pulse.enabled')), + 'Enabled' => AboutCommand::format(config('pulse.enabled'), console: fn ($value) => $value ? 'ENABLED' : 'OFF'), ]); } } From c30500b0d9884ef191d6808373fed25bfcabc294 Mon Sep 17 00:00:00 2001 From: James Brooks Date: Thu, 14 Dec 2023 15:39:45 +0000 Subject: [PATCH 5/5] Bump minimum Laravel dependencies --- composer.json | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/composer.json b/composer.json index 75436910..8f7e96c2 100644 --- a/composer.json +++ b/composer.json @@ -18,19 +18,19 @@ "php": "^8.1", "doctrine/sql-formatter": "^1.1", "guzzlehttp/promises": "^1.0 || ^2.0", - "illuminate/auth": "^10.21", - "illuminate/cache": "^10.21", - "illuminate/config": "^10.21", - "illuminate/console": "^10.21", - "illuminate/contracts": "^10.21", - "illuminate/database": "^10.21", - "illuminate/events": "^10.21", - "illuminate/http": "^10.21", - "illuminate/queue": "^10.21", - "illuminate/redis": "^10.21", - "illuminate/routing": "^10.21", - "illuminate/support": "^10.21", - "illuminate/view": "^10.21", + "illuminate/auth": "^10.34", + "illuminate/cache": "^10.34", + "illuminate/config": "^10.34", + "illuminate/console": "^10.34", + "illuminate/contracts": "^10.34", + "illuminate/database": "^10.34", + "illuminate/events": "^10.34", + "illuminate/http": "^10.34", + "illuminate/queue": "^10.34", + "illuminate/redis": "^10.34", + "illuminate/routing": "^10.34", + "illuminate/support": "^10.34", + "illuminate/view": "^10.34", "livewire/livewire": "^3.2", "nesbot/carbon": "^2.67" },