From 3503ed5e723da20822d5ee7758ef6da96bd017bc Mon Sep 17 00:00:00 2001 From: alexmerlin Date: Thu, 29 Feb 2024 11:48:03 +0200 Subject: [PATCH] Issue #223: Added missing AsCommand attribute to existing commands. Signed-off-by: alexmerlin --- src/App/src/Command/RouteListCommand.php | 5 +++++ src/App/src/Command/TokenGenerateCommand.php | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/src/App/src/Command/RouteListCommand.php b/src/App/src/Command/RouteListCommand.php index 499d876..9d4158b 100644 --- a/src/App/src/Command/RouteListCommand.php +++ b/src/App/src/Command/RouteListCommand.php @@ -6,6 +6,7 @@ use Api\App\RoutesDelegator; use Mezzio\Application; +use Symfony\Component\Console\Attribute\AsCommand; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Helper\Table; use Symfony\Component\Console\Input\InputInterface; @@ -18,6 +19,10 @@ use function str_contains; use function str_replace; +#[AsCommand( + name: 'route:list', + description: 'List API routes', +)] class RouteListCommand extends Command { /** @var string $defaultName */ diff --git a/src/App/src/Command/TokenGenerateCommand.php b/src/App/src/Command/TokenGenerateCommand.php index 2e19a9e..bb9e4bd 100644 --- a/src/App/src/Command/TokenGenerateCommand.php +++ b/src/App/src/Command/TokenGenerateCommand.php @@ -6,6 +6,7 @@ use Api\App\Service\ErrorReportServiceInterface; use Exception; +use Symfony\Component\Console\Attribute\AsCommand; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; @@ -13,6 +14,10 @@ use function sprintf; +#[AsCommand( + name: 'token:generate', + description: 'Generic token generator.', +)] class TokenGenerateCommand extends Command { /** @var string $defaultName */