diff --git a/src/Controller/Privacy/PrivacyController.php b/src/Controller/Privacy/PrivacyController.php index 8bff571c2..898788bc1 100644 --- a/src/Controller/Privacy/PrivacyController.php +++ b/src/Controller/Privacy/PrivacyController.php @@ -7,7 +7,7 @@ use Doctrine\DBAL\Exception\ForeignKeyConstraintViolationException; use Sensio\Bundle\FrameworkExtraBundle\Configuration\Security; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; -use Symfony\Component\HttpFoundation\JsonResponse; +use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpFoundation\RedirectResponse; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\Routing\Annotation\Route; @@ -138,7 +138,7 @@ private function export(Personne $personne, SerializerInterface $serializer) { $data = $serializer->serialize($personne, 'json', ['groups' => ['gdpr']]); - $response = new JsonResponse($data); + $response = new Response($data); $response->headers->set('Cache-Control', 'private'); $response->headers->set('Content-type', 'application/json'); $response->headers->set('Content-Disposition', 'attachment; filename="Export-RGPD-' . date('Y-m-d') . '-' . $personne->getNom() . '.json";');