diff --git a/src/Bundle/ChillMainBundle/Notification/Email/NotificationEmailHandlers/SendImmediateNotificationEmailHandler.php b/src/Bundle/ChillMainBundle/Notification/Email/NotificationEmailHandlers/SendImmediateNotificationEmailHandler.php index c81653639..9861cda0c 100644 --- a/src/Bundle/ChillMainBundle/Notification/Email/NotificationEmailHandlers/SendImmediateNotificationEmailHandler.php +++ b/src/Bundle/ChillMainBundle/Notification/Email/NotificationEmailHandlers/SendImmediateNotificationEmailHandler.php @@ -20,13 +20,13 @@ use Symfony\Component\Mailer\Exception\TransportExceptionInterface; use Symfony\Component\Messenger\Attribute\AsMessageHandler; #[AsMessageHandler] -class SendImmediateNotificationEmailHandler +readonly class SendImmediateNotificationEmailHandler { public function __construct( - private readonly NotificationRepository $notificationRepository, - private readonly UserRepository $userRepository, - private readonly NotificationMailer $notificationMailer, - private readonly LoggerInterface $logger, + private NotificationRepository $notificationRepository, + private UserRepository $userRepository, + private NotificationMailer $notificationMailer, + private LoggerInterface $logger, ) {} /** diff --git a/src/Bundle/ChillMainBundle/Notification/Email/NotificationMailer.php b/src/Bundle/ChillMainBundle/Notification/Email/NotificationMailer.php index 5cda29b0d..6df12f4fd 100644 --- a/src/Bundle/ChillMainBundle/Notification/Email/NotificationMailer.php +++ b/src/Bundle/ChillMainBundle/Notification/Email/NotificationMailer.php @@ -73,7 +73,6 @@ readonly class NotificationMailer public function postPersistNotification(Notification $notification, PostPersistEventArgs $eventArgs): void { $this->sendNotificationEmailsToAddressees($notification); -// $this->sendNotificationEmailsToAddressesEmails($notification); } public function postUpdateNotification(Notification $notification, PostUpdateEventArgs $eventArgs): void @@ -109,7 +108,7 @@ readonly class NotificationMailer match ($emailPreference) { 'immediate-email' => $this->scheduleImmediateEmail($notification, $addressee), - 'daily-email' => $this->scheduleDailyEmail($notification, $addressee), + 'daily-email' => $this->scheduleDailyEmail($notification, $addressee), // don't do this (the cronjob will handle them later) default => $this->logger->debug('[NotificationMailer] No email preference set for notification type', [ 'notification_id' => $notification->getId(), 'addressee_email' => $addressee->getEmail(),