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

@@ -2,7 +2,7 @@
namespace App\Command;
use App\Message\ProcessWatchListsTrigger;
use App\Message\ProcessWatchlistTrigger;
use Symfony\Component\Console\Attribute\AsCommand;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
@@ -12,10 +12,10 @@ use Symfony\Component\Messenger\Exception\ExceptionInterface;
use Symfony\Component\Messenger\MessageBusInterface;
#[AsCommand(
name: 'app:process-watchlists',
description: 'Process watchlists and send emails if necessary',
name: 'app:process-watchlist',
description: 'Process watchlist and send emails if necessary',
)]
class ProcessWatchlistsCommand extends Command
class ProcessWatchlistCommand extends Command
{
public function __construct(private readonly MessageBusInterface $bus)
{
@@ -33,7 +33,7 @@ class ProcessWatchlistsCommand extends Command
{
$io = new SymfonyStyle($input, $output);
$this->bus->dispatch(new ProcessWatchListsTrigger());
$this->bus->dispatch(new ProcessWatchlistTrigger());
$io->success('Watchlist processing triggered!');

View File

@@ -2,7 +2,7 @@
namespace App\Command;
use App\Entity\WatchList;
use App\Entity\Watchlist;
use App\Message\SendDomainEventNotif;
use App\Repository\DomainRepository;
use App\Service\RDAPService;
@@ -60,11 +60,11 @@ class RegisterDomainCommand extends Command
if ($notif) {
$randomizer = new Randomizer();
$watchLists = $randomizer->shuffleArray($domain->getWatchLists()->toArray());
$watchlists = $randomizer->shuffleArray($domain->getWatchlists()->toArray());
/** @var WatchList $watchList */
foreach ($watchLists as $watchList) {
$this->bus->dispatch(new SendDomainEventNotif($watchList->getToken(), $domain->getLdhName(), $updatedAt));
/** @var Watchlist $watchlist */
foreach ($watchlists as $watchlist) {
$this->bus->dispatch(new SendDomainEventNotif($watchlist->getToken(), $domain->getLdhName(), $updatedAt));
}
}
} catch (\Throwable $e) {