mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
Merge branch 'issue220_fix_notification_event_error' into 'master'
Fix typing of doctrine events on Notification Closes #220 See merge request Chill-Projet/chill-bundles!626
This commit is contained in:
commit
4df0542932
6
.changes/unreleased/Fixed-20231129-113138.yaml
Normal file
6
.changes/unreleased/Fixed-20231129-113138.yaml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
kind: Fixed
|
||||||
|
body: Fix error in logs about wrong typing of eventArgs in onEditNotificationComment
|
||||||
|
method
|
||||||
|
time: 2023-11-29T11:31:38.933538592+01:00
|
||||||
|
custom:
|
||||||
|
Issue: "220"
|
@ -17,6 +17,7 @@ use Chill\MainBundle\Entity\User;
|
|||||||
use Chill\MainBundle\Repository\NotificationRepository;
|
use Chill\MainBundle\Repository\NotificationRepository;
|
||||||
use Chill\MainBundle\Templating\UI\NotificationCounterInterface;
|
use Chill\MainBundle\Templating\UI\NotificationCounterInterface;
|
||||||
use Doctrine\ORM\Event\PostPersistEventArgs;
|
use Doctrine\ORM\Event\PostPersistEventArgs;
|
||||||
|
use Doctrine\ORM\Event\PostUpdateEventArgs;
|
||||||
use Doctrine\ORM\Event\PreFlushEventArgs;
|
use Doctrine\ORM\Event\PreFlushEventArgs;
|
||||||
use Psr\Cache\CacheItemPoolInterface;
|
use Psr\Cache\CacheItemPoolInterface;
|
||||||
use Symfony\Component\Security\Core\User\UserInterface;
|
use Symfony\Component\Security\Core\User\UserInterface;
|
||||||
@ -62,7 +63,12 @@ final readonly class NotificationByUserCounter implements NotificationCounterInt
|
|||||||
return 'chill_main_notif_unread_by_'.$user->getId();
|
return 'chill_main_notif_unread_by_'.$user->getId();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function onEditNotificationComment(NotificationComment $notificationComment, PostPersistEventArgs $eventArgs): void
|
public function onPersistNotificationComment(NotificationComment $notificationComment, PostPersistEventArgs $eventArgs): void
|
||||||
|
{
|
||||||
|
$this->resetCacheForNotification($notificationComment->getNotification());
|
||||||
|
}
|
||||||
|
|
||||||
|
public function onEditNotificationComment(NotificationComment $notificationComment, PostUpdateEventArgs $eventArgs): void
|
||||||
{
|
{
|
||||||
$this->resetCacheForNotification($notificationComment->getNotification());
|
$this->resetCacheForNotification($notificationComment->getNotification());
|
||||||
}
|
}
|
||||||
|
@ -41,7 +41,7 @@ services:
|
|||||||
entity: 'Chill\MainBundle\Entity\NotificationComment'
|
entity: 'Chill\MainBundle\Entity\NotificationComment'
|
||||||
# set the 'lazy' option to TRUE to only instantiate listeners when they are used
|
# set the 'lazy' option to TRUE to only instantiate listeners when they are used
|
||||||
lazy: true
|
lazy: true
|
||||||
method: 'onEditNotificationComment'
|
method: 'onPersistNotificationComment'
|
||||||
|
|
||||||
Chill\MainBundle\Notification\Email\NotificationMailer:
|
Chill\MainBundle\Notification\Email\NotificationMailer:
|
||||||
autowire: true
|
autowire: true
|
||||||
|
Loading…
x
Reference in New Issue
Block a user