From 8bd6fa6d1b9675aba1bf576d7d6789fd7b9b2f1a Mon Sep 17 00:00:00 2001 From: Tim MacDonald Date: Wed, 20 Mar 2024 07:07:46 +1100 Subject: [PATCH] [1.x] Make commands lazy (#97) * Make commands lazy * Fix soft dependency --- composer.json | 1 + src/Console/InstallCommand.php | 2 ++ src/Console/PublishCommand.php | 2 ++ 3 files changed, 5 insertions(+) diff --git a/composer.json b/composer.json index 4f60c8d..7910cb4 100644 --- a/composer.json +++ b/composer.json @@ -21,6 +21,7 @@ "php": "^7.3|^8.0", "aws/aws-sdk-php": "^3.148.3", "laravel/framework": "^8.0|^9.0|^10.0", + "symfony/console": "^5.3|^6.0", "symfony/yaml": "^5.1.4|^6.0" }, "require-dev": { diff --git a/src/Console/InstallCommand.php b/src/Console/InstallCommand.php index 958776e..12ee949 100644 --- a/src/Console/InstallCommand.php +++ b/src/Console/InstallCommand.php @@ -4,7 +4,9 @@ use Illuminate\Console\Command; use Illuminate\Support\Str; +use Symfony\Component\Console\Attribute\AsCommand; +#[AsCommand(name: 'vapor-ui:install')] class InstallCommand extends Command { /** diff --git a/src/Console/PublishCommand.php b/src/Console/PublishCommand.php index 2ec1b9a..abf12f9 100644 --- a/src/Console/PublishCommand.php +++ b/src/Console/PublishCommand.php @@ -3,7 +3,9 @@ namespace Laravel\VaporUi\Console; use Illuminate\Console\Command; +use Symfony\Component\Console\Attribute\AsCommand; +#[AsCommand(name: 'vapor-ui:publish')] class PublishCommand extends Command { /**