chore: rename WatchList to Watchlist

This commit is contained in:
Maël Gangloff
2025-10-25 17:26:56 +02:00
parent ff90477695
commit 5243b3c2dd
32 changed files with 278 additions and 199 deletions

View File

@@ -0,0 +1,42 @@
<?php
namespace App\Command;
use App\Message\ProcessWatchlistTrigger;
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 Symfony\Component\Console\Style\SymfonyStyle;
use Symfony\Component\Messenger\Exception\ExceptionInterface;
use Symfony\Component\Messenger\MessageBusInterface;
#[AsCommand(
name: 'app:process-watchlist',
description: 'Process watchlist and send emails if necessary',
)]
class ProcessWatchlistCommand extends Command
{
public function __construct(private readonly MessageBusInterface $bus)
{
parent::__construct();
}
protected function configure(): void
{
}
/**
* @throws ExceptionInterface
*/
protected function execute(InputInterface $input, OutputInterface $output): int
{
$io = new SymfonyStyle($input, $output);
$this->bus->dispatch(new ProcessWatchlistTrigger());
$io->success('Watchlist processing triggered!');
return Command::SUCCESS;
}
}