validateAuthentication(); $json = $this->get(SerializerInterface::class)->serialize( $this->getUser()->getConfig(), 'json', SerializationContext::create()->setGroups(['config_api']) ); return (new JsonResponse()) ->setJson($json) ->setStatusCode(JsonResponse::HTTP_OK); } }