Remove no longer used annotation use statements and replace with attribute use statements

This commit is contained in:
2025-10-01 18:38:41 +02:00
parent d8528dceab
commit 32d2bb002b
486 changed files with 495 additions and 1063 deletions

View File

@@ -22,15 +22,14 @@ use Doctrine\ORM\EntityManagerInterface;
use Symfony\Bridge\Doctrine\Attribute\MapEntity;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\Security\Core\Exception\AccessDeniedException;
use Symfony\Bundle\SecurityBundle\Security;
use Symfony\Component\Serializer\SerializerInterface;
#[\Symfony\Component\Routing\Attribute\Route(path: '/api/1.0/main/notification')]
class NotificationApiController
readonly 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) {}
public function __construct(private EntityManagerInterface $entityManager, private NotificationRepository $notificationRepository, private PaginatorFactory $paginatorFactory, private Security $security, private SerializerInterface $serializer) {}
#[\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