From 314ac321ff8b57baca3d7864cfa413637b38d75f Mon Sep 17 00:00:00 2001 From: Tim MacDonald Date: Tue, 19 Mar 2024 12:02:17 +1100 Subject: [PATCH 1/2] Make commands lazy --- src/Console/AddCommand.php | 2 ++ src/Console/InstallCommand.php | 2 ++ src/Console/PublishCommand.php | 2 ++ 3 files changed, 6 insertions(+) diff --git a/src/Console/AddCommand.php b/src/Console/AddCommand.php index 09a0ab86..9cab9184 100644 --- a/src/Console/AddCommand.php +++ b/src/Console/AddCommand.php @@ -4,7 +4,9 @@ use Illuminate\Console\Command; use Laravel\Sail\Console\Concerns\InteractsWithDockerComposeServices; +use Symfony\Component\Console\Attribute\AsCommand; +#[AsCommand(name: 'sail:add')] class AddCommand extends Command { use InteractsWithDockerComposeServices; diff --git a/src/Console/InstallCommand.php b/src/Console/InstallCommand.php index 5108f5e5..9b197ee7 100644 --- a/src/Console/InstallCommand.php +++ b/src/Console/InstallCommand.php @@ -4,8 +4,10 @@ use Illuminate\Console\Command; use RuntimeException; +use Symfony\Component\Console\Attribute\AsCommand; use Symfony\Component\Process\Process; +#[AsCommand(name: 'sail:install')] class InstallCommand extends Command { use Concerns\InteractsWithDockerComposeServices; diff --git a/src/Console/PublishCommand.php b/src/Console/PublishCommand.php index 13ef0fbc..8ae11d75 100644 --- a/src/Console/PublishCommand.php +++ b/src/Console/PublishCommand.php @@ -3,7 +3,9 @@ namespace Laravel\Sail\Console; use Illuminate\Console\Command; +use Symfony\Component\Console\Attribute\AsCommand; +#[AsCommand(name: 'sail:publish')] class PublishCommand extends Command { /** From f8dfcddf36ce55dce0b626beffe131ac74473f32 Mon Sep 17 00:00:00 2001 From: Tim MacDonald Date: Tue, 19 Mar 2024 12:02:22 +1100 Subject: [PATCH 2/2] Fix soft dependency --- composer.json | 1 + 1 file changed, 1 insertion(+) diff --git a/composer.json b/composer.json index 344806d1..f311822b 100644 --- a/composer.json +++ b/composer.json @@ -18,6 +18,7 @@ "illuminate/console": "^9.52.16|^10.0|^11.0", "illuminate/contracts": "^9.52.16|^10.0|^11.0", "illuminate/support": "^9.52.16|^10.0|^11.0", + "symfony/console": "^6.0|^7.0", "symfony/yaml": "^6.0|^7.0" }, "bin": [