From d1de99bf8d31199aaf93881561622489ab91ba58 Mon Sep 17 00:00:00 2001 From: Tim MacDonald Date: Wed, 20 Mar 2024 07:09:38 +1100 Subject: [PATCH] [4.x] Make commands lazy (#502) * Make commands lazy * Fix soft dependency --- composer.json | 3 ++- src/Console/Commands/PruneExpired.php | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 1eb68777..97509bbf 100644 --- a/composer.json +++ b/composer.json @@ -19,7 +19,8 @@ "illuminate/console": "^11.0", "illuminate/contracts": "^11.0", "illuminate/database": "^11.0", - "illuminate/support": "^11.0" + "illuminate/support": "^11.0", + "symfony/console": "^7.0" }, "require-dev": { "mockery/mockery": "^1.6", diff --git a/src/Console/Commands/PruneExpired.php b/src/Console/Commands/PruneExpired.php index 82df3b28..e0832992 100644 --- a/src/Console/Commands/PruneExpired.php +++ b/src/Console/Commands/PruneExpired.php @@ -4,7 +4,9 @@ use Illuminate\Console\Command; use Laravel\Sanctum\Sanctum; +use Symfony\Component\Console\Attribute\AsCommand; +#[AsCommand(name: 'sanctum:prune-expired')] class PruneExpired extends Command { /**