mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-07-18 14:56:13 +00:00
Phpstan fix import Serializer instead of SerializerInterface
This commit is contained in:
parent
fcb9fdd24c
commit
471e17bbf9
@ -42,7 +42,7 @@ use Symfony\Component\HttpFoundation\StreamedResponse;
|
|||||||
use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException;
|
use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException;
|
||||||
use Symfony\Component\Security\Core\Security;
|
use Symfony\Component\Security\Core\Security;
|
||||||
use Symfony\Component\Serializer\Exception\ExceptionInterface;
|
use Symfony\Component\Serializer\Exception\ExceptionInterface;
|
||||||
use Symfony\Component\Serializer\SerializerInterface;
|
use Symfony\Component\Serializer\Normalizer\NormalizerInterface;
|
||||||
use Symfony\Contracts\Translation\TranslatorInterface;
|
use Symfony\Contracts\Translation\TranslatorInterface;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -61,7 +61,7 @@ final class EventController extends AbstractController
|
|||||||
private readonly PaginatorFactory $paginator,
|
private readonly PaginatorFactory $paginator,
|
||||||
private readonly Security $security,
|
private readonly Security $security,
|
||||||
private readonly ManagerRegistry $managerRegistry,
|
private readonly ManagerRegistry $managerRegistry,
|
||||||
private readonly SerializerInterface $serializer,
|
private readonly NormalizerInterface $normalizer,
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/event/event/{event_id}/delete', name: 'chill_event__event_delete', requirements: ['event_id' => '\d+'], methods: ['GET', 'POST', 'DELETE'])]
|
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/event/event/{event_id}/delete', name: 'chill_event__event_delete', requirements: ['event_id' => '\d+'], methods: ['GET', 'POST', 'DELETE'])]
|
||||||
@ -106,7 +106,7 @@ final class EventController extends AbstractController
|
|||||||
}
|
}
|
||||||
|
|
||||||
return $this->render('@ChillEvent/Event/confirm_delete.html.twig', [
|
return $this->render('@ChillEvent/Event/confirm_delete.html.twig', [
|
||||||
'event_id' => $event->getId(),
|
'id' => $event->getId(),
|
||||||
'delete_form' => $form->createView(),
|
'delete_form' => $form->createView(),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
@ -207,7 +207,7 @@ final class EventController extends AbstractController
|
|||||||
return $this->redirectToRoute('chill_event__event_show', ['id' => $entity->getId()]);
|
return $this->redirectToRoute('chill_event__event_show', ['id' => $entity->getId()]);
|
||||||
}
|
}
|
||||||
|
|
||||||
$entity_array = $this->serializer->normalize($entity, 'json', ['groups' => 'read']);
|
$entity_array = $this->normalizer->normalize($entity, 'json', ['groups' => 'read']);
|
||||||
|
|
||||||
return $this->render('@ChillEvent/Event/new.html.twig', [
|
return $this->render('@ChillEvent/Event/new.html.twig', [
|
||||||
'entity' => $entity,
|
'entity' => $entity,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user