From fb436c2f43a39787a5d8857adcbf3b1219274166 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Viktor=20Sz=C3=A9pe?= Date: Tue, 16 Apr 2024 06:34:29 +0200 Subject: [PATCH] Use AsCommand --- src/Commands/FooCommand.php | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/Commands/FooCommand.php b/src/Commands/FooCommand.php index 2bc04d8..24b4614 100644 --- a/src/Commands/FooCommand.php +++ b/src/Commands/FooCommand.php @@ -4,20 +4,15 @@ namespace WickedByte\App\Commands; +use Symfony\Component\Console\Attribute\AsCommand; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; use WickedByte\App\Foo; +#[AsCommand('foo', 'Placeholder Command')] class FooCommand extends Command { - #[\Override] - protected function configure(): void - { - $this->setName('foo') - ->setDescription('Placeholder Command'); - } - #[\Override] protected function execute(InputInterface $input, OutputInterface $output): int {