Skip to content

Commit

Permalink
Fix Symfony Console deprecation in QueuedIndexDataCommand
Browse files Browse the repository at this point in the history
  • Loading branch information
NiklasBr committed Mar 14, 2024
1 parent 91b58fd commit 0822734
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions src/Command/QueuedIndexDataCommand.php
Expand Up @@ -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;
}
}

0 comments on commit 0822734

Please sign in to comment.