Run symfonysetlist symfony_62

This commit is contained in:
2025-05-28 15:16:09 +02:00
parent 8ec18a6fb8
commit abb786495a
14 changed files with 61 additions and 80 deletions

View File

@@ -29,10 +29,10 @@ use Symfony\Component\Messenger\Handler\MessageHandlerInterface;
*
* @AsMessageHandler
*/
class CalendarRangeRemoveToRemoteHandler implements MessageHandlerInterface
#[\Symfony\Component\Messenger\Attribute\AsMessageHandler]
class CalendarRangeRemoveToRemoteHandler
{
public function __construct(private readonly RemoteCalendarConnectorInterface $remoteCalendarConnector, private readonly UserRepository $userRepository) {}
public function __invoke(CalendarRangeRemovedMessage $calendarRangeRemovedMessage): void
{
$this->remoteCalendarConnector->removeCalendarRange(

View File

@@ -30,10 +30,10 @@ use Symfony\Component\Messenger\Handler\MessageHandlerInterface;
*
* @AsMessageHandler
*/
class CalendarRangeToRemoteHandler implements MessageHandlerInterface
#[\Symfony\Component\Messenger\Attribute\AsMessageHandler]
class CalendarRangeToRemoteHandler
{
public function __construct(private readonly CalendarRangeRepository $calendarRangeRepository, private readonly RemoteCalendarConnectorInterface $remoteCalendarConnector, private readonly EntityManagerInterface $entityManager) {}
public function __invoke(CalendarRangeMessage $calendarRangeMessage): void
{
$range = $this->calendarRangeRepository->find($calendarRangeMessage->getCalendarRangeId());

View File

@@ -29,10 +29,10 @@ use Symfony\Component\Messenger\Handler\MessageHandlerInterface;
*
* @AsMessageHandler
*/
class CalendarRemoveHandler implements MessageHandlerInterface
#[\Symfony\Component\Messenger\Attribute\AsMessageHandler]
class CalendarRemoveHandler
{
public function __construct(private readonly RemoteCalendarConnectorInterface $remoteCalendarConnector, private readonly CalendarRangeRepository $calendarRangeRepository, private readonly UserRepositoryInterface $userRepository) {}
public function __invoke(CalendarRemovedMessage $message): void
{
if (null !== $message->getAssociatedCalendarRangeId()) {

View File

@@ -35,10 +35,10 @@ use Symfony\Component\Messenger\Handler\MessageHandlerInterface;
*
* @AsMessageHandler
*/
class CalendarToRemoteHandler implements MessageHandlerInterface
#[\Symfony\Component\Messenger\Attribute\AsMessageHandler]
class CalendarToRemoteHandler
{
public function __construct(private readonly CalendarRangeRepository $calendarRangeRepository, private readonly CalendarRepository $calendarRepository, private readonly EntityManagerInterface $entityManager, private readonly InviteRepository $inviteRepository, private readonly RemoteCalendarConnectorInterface $calendarConnector, private readonly UserRepository $userRepository) {}
public function __invoke(CalendarMessage $calendarMessage): void
{
$calendar = $this->calendarRepository->find($calendarMessage->getCalendarId());

View File

@@ -29,10 +29,10 @@ use Symfony\Component\Messenger\Handler\MessageHandlerInterface;
*
* @AsMessageHandler
*/
class InviteUpdateHandler implements MessageHandlerInterface
#[\Symfony\Component\Messenger\Attribute\AsMessageHandler]
class InviteUpdateHandler
{
public function __construct(private readonly EntityManagerInterface $em, private readonly InviteRepository $inviteRepository, private readonly RemoteCalendarConnectorInterface $remoteCalendarConnector) {}
public function __invoke(InviteUpdateMessage $inviteUpdateMessage): void
{
if (null === $invite = $this->inviteRepository->find($inviteUpdateMessage->getInviteId())) {

View File

@@ -34,10 +34,10 @@ use Symfony\Component\Messenger\Handler\MessageHandlerInterface;
*
* @AsMessageHandler
*/
class MSGraphChangeNotificationHandler implements MessageHandlerInterface
#[\Symfony\Component\Messenger\Attribute\AsMessageHandler]
class MSGraphChangeNotificationHandler
{
public function __construct(private readonly CalendarRangeRepository $calendarRangeRepository, private readonly CalendarRangeSyncer $calendarRangeSyncer, private readonly CalendarRepository $calendarRepository, private readonly CalendarSyncer $calendarSyncer, private readonly EntityManagerInterface $em, private readonly LoggerInterface $logger, private readonly MapCalendarToUser $mapCalendarToUser, private readonly UserRepository $userRepository) {}
public function __invoke(MSGraphChangeNotificationMessage $changeNotificationMessage): void
{
$user = $this->userRepository->find($changeNotificationMessage->getUserId());