denyAccessUnlessGranted('ROLE_USER'); $new = Address::createFromAddress($address); $em = $this->getDoctrine()->getManager(); $em->persist($new); $em->flush(); return $this->json($new, Response::HTTP_OK, [], [ AbstractNormalizer::GROUPS => ['read'], ]); } }