Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Symfony Console deprecation in QueuedIndexDataCommand #63

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions UPGRADE.md
@@ -1,5 +1,8 @@
# Upgrade Notes

## 3.0.3
- Fix Symfony Console deprecation in QueuedIndexDataCommand [@NiklasBr](https://github.com/dachcom-digital/pimcore-seo/pull/63)

## 3.0.2
- Fix og:image URL for CoreShop third party og tag [@breakone ](https://github.com/dachcom-digital/pimcore-seo/pull/61)
- FAdd ext-dom to composer.json [@NiklasBr](https://github.com/dachcom-digital/pimcore-seo/pull/51)
Expand Down
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;
}
}