From 0822734d3416f91ec3a2c7b541ca10aed05c8955 Mon Sep 17 00:00:00 2001 From: Niklas Date: Thu, 14 Mar 2024 09:06:49 +0100 Subject: [PATCH] Fix Symfony Console deprecation in QueuedIndexDataCommand --- src/Command/QueuedIndexDataCommand.php | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/src/Command/QueuedIndexDataCommand.php b/src/Command/QueuedIndexDataCommand.php index cb84ad7..ca92bed 100644 --- a/src/Command/QueuedIndexDataCommand.php +++ b/src/Command/QueuedIndexDataCommand.php @@ -3,30 +3,27 @@ namespace SeoBundle\Command; use SeoBundle\Queue\QueueDataProcessorInterface; +use Symfony\Component\Console\Attribute\AsCommand; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; +#[AsCommand( + name: 'seo:check-index-queue', + description: 'For internal use only', + hidden: true, +)] class QueuedIndexDataCommand extends Command { - protected static $defaultName = 'seo:check-index-queue'; - protected static $defaultDescription = 'For internal use only'; - public function __construct(protected QueueDataProcessorInterface $dataProcessor) { parent::__construct(); - $this->dataProcessor = $dataProcessor; - } - - protected function configure(): void - { - $this->setHidden(true); } protected function execute(InputInterface $input, OutputInterface $output): int { $this->dataProcessor->process([]); - return 0; + return self::SUCCESS; } }