From 673511cba0194fdc8a13044ec4e859fa5b2baaec Mon Sep 17 00:00:00 2001 From: Duncan McClean Date: Tue, 19 Mar 2024 19:42:09 +0000 Subject: [PATCH 1/4] Add `--without-reverb` and `--without-node` arguments to `install:broadcasting` command --- .../Foundation/Console/BroadcastingInstallCommand.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/Illuminate/Foundation/Console/BroadcastingInstallCommand.php b/src/Illuminate/Foundation/Console/BroadcastingInstallCommand.php index 775442735bf0..589f3dc929af 100644 --- a/src/Illuminate/Foundation/Console/BroadcastingInstallCommand.php +++ b/src/Illuminate/Foundation/Console/BroadcastingInstallCommand.php @@ -23,7 +23,9 @@ class BroadcastingInstallCommand extends Command */ protected $signature = 'install:broadcasting {--composer=global : Absolute path to the Composer binary which should be used to install packages} - {--force : Overwrite any existing broadcasting routes file}'; + {--force : Overwrite any existing broadcasting routes file} + {--without-reverb : Do not prompt to install Laravel Reverb} + {--without-node : Do not prompt to install Node dependencies}'; /** * The console command description. @@ -127,7 +129,7 @@ protected function enableBroadcastServiceProvider() */ protected function installReverb() { - if (InstalledVersions::isInstalled('laravel/reverb')) { + if ($this->option('without-reverb') || InstalledVersions::isInstalled('laravel/reverb')) { return; } @@ -159,7 +161,7 @@ protected function installReverb() */ protected function installNodeDependencies() { - if (! confirm('Would you like to install and build the Node dependencies required for broadcasting?', default: true)) { + if ($this->option('without-reverb') || ! confirm('Would you like to install and build the Node dependencies required for broadcasting?', default: true)) { return; } @@ -188,7 +190,7 @@ protected function installNodeDependencies() } $command = Process::command(implode(' && ', $commands)) - ->path(base_path()); + ->path(base_path()); if (! windows_os()) { $command->tty(true); From b30b2ef10276f9f891690fa4ce34c1d3be2e7130 Mon Sep 17 00:00:00 2001 From: Duncan McClean Date: Tue, 19 Mar 2024 20:04:24 +0000 Subject: [PATCH 2/4] revert formatting change --- .../Foundation/Console/BroadcastingInstallCommand.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Illuminate/Foundation/Console/BroadcastingInstallCommand.php b/src/Illuminate/Foundation/Console/BroadcastingInstallCommand.php index 589f3dc929af..14feed410110 100644 --- a/src/Illuminate/Foundation/Console/BroadcastingInstallCommand.php +++ b/src/Illuminate/Foundation/Console/BroadcastingInstallCommand.php @@ -190,7 +190,7 @@ protected function installNodeDependencies() } $command = Process::command(implode(' && ', $commands)) - ->path(base_path()); + ->path(base_path()); if (! windows_os()) { $command->tty(true); From add8fded9740d28fdf79b0f3725163a670e869dd Mon Sep 17 00:00:00 2001 From: Duncan McClean Date: Tue, 19 Mar 2024 20:05:04 +0000 Subject: [PATCH 3/4] revert formatting change --- .../Foundation/Console/BroadcastingInstallCommand.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Illuminate/Foundation/Console/BroadcastingInstallCommand.php b/src/Illuminate/Foundation/Console/BroadcastingInstallCommand.php index 14feed410110..1b8dc5ba2ac6 100644 --- a/src/Illuminate/Foundation/Console/BroadcastingInstallCommand.php +++ b/src/Illuminate/Foundation/Console/BroadcastingInstallCommand.php @@ -190,7 +190,7 @@ protected function installNodeDependencies() } $command = Process::command(implode(' && ', $commands)) - ->path(base_path()); + ->path(base_path()); if (! windows_os()) { $command->tty(true); From afbe4e4a51d062a54b703b3a6454b9497f124f3b Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Tue, 19 Mar 2024 14:13:11 -0600 Subject: [PATCH 4/4] Update BroadcastingInstallCommand.php --- .../Foundation/Console/BroadcastingInstallCommand.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Illuminate/Foundation/Console/BroadcastingInstallCommand.php b/src/Illuminate/Foundation/Console/BroadcastingInstallCommand.php index 1b8dc5ba2ac6..0d19370fece2 100644 --- a/src/Illuminate/Foundation/Console/BroadcastingInstallCommand.php +++ b/src/Illuminate/Foundation/Console/BroadcastingInstallCommand.php @@ -161,7 +161,7 @@ protected function installReverb() */ protected function installNodeDependencies() { - if ($this->option('without-reverb') || ! confirm('Would you like to install and build the Node dependencies required for broadcasting?', default: true)) { + if ($this->option('without-node') || ! confirm('Would you like to install and build the Node dependencies required for broadcasting?', default: true)) { return; }