Run symfonysetlist up to symfony_70

This commit is contained in:
2025-05-28 15:46:25 +02:00
parent abb786495a
commit 13a9e14450
128 changed files with 515 additions and 518 deletions

View File

@@ -27,24 +27,24 @@ use Symfony\Component\Security\Core\Exception\AccessDeniedException;
use Symfony\Bundle\SecurityBundle\Security;
use Symfony\Component\Serializer\SerializerInterface;
#[Route(path: '/api/1.0/main/notification')]
#[\Symfony\Component\Routing\Attribute\Route(path: '/api/1.0/main/notification')]
class NotificationApiController
{
public function __construct(private readonly EntityManagerInterface $entityManager, private readonly NotificationRepository $notificationRepository, private readonly PaginatorFactory $paginatorFactory, private readonly Security $security, private readonly SerializerInterface $serializer) {}
#[Route(path: '/{id}/mark/read', name: 'chill_api_main_notification_mark_read', methods: ['POST'])]
#[\Symfony\Component\Routing\Attribute\Route(path: '/{id}/mark/read', name: 'chill_api_main_notification_mark_read', methods: ['POST'])]
public function markAsRead(#[MapEntity(id: 'id')] Notification $notification): JsonResponse
{
return $this->markAs('read', $notification);
}
#[Route(path: '/{id}/mark/unread', name: 'chill_api_main_notification_mark_unread', methods: ['POST'])]
#[\Symfony\Component\Routing\Attribute\Route(path: '/{id}/mark/unread', name: 'chill_api_main_notification_mark_unread', methods: ['POST'])]
public function markAsUnread(#[MapEntity(id: 'id')] Notification $notification): JsonResponse
{
return $this->markAs('unread', $notification);
}
#[Route(path: '/my/unread')]
#[\Symfony\Component\Routing\Attribute\Route(path: '/my/unread')]
public function myUnreadNotifications(Request $request): JsonResponse
{
$total = $this->notificationRepository->countUnreadByUser($this->security->getUser());
@@ -96,7 +96,7 @@ class NotificationApiController
return new JsonResponse(null, JsonResponse::HTTP_ACCEPTED, [], false);
}
#[Route(path: '/mark/allread', name: 'chill_api_main_notification_mark_allread', methods: ['POST'])]
#[\Symfony\Component\Routing\Attribute\Route(path: '/mark/allread', name: 'chill_api_main_notification_mark_allread', methods: ['POST'])]
public function markAllRead(): JsonResponse
{
$user = $this->security->getUser();
@@ -110,7 +110,7 @@ class NotificationApiController
return new JsonResponse($modifiedNotificationIds);
}
#[Route(path: '/mark/undoallread', name: 'chill_api_main_notification_mark_undoallread', methods: ['POST'])]
#[\Symfony\Component\Routing\Attribute\Route(path: '/mark/undoallread', name: 'chill_api_main_notification_mark_undoallread', methods: ['POST'])]
public function undoAllRead(Request $request): JsonResponse
{
$user = $this->security->getUser();