getSerializer() ->deserialize($request->getContent(), MembersEditor::class, $_format, ['groups' => [ "read" ]]); } catch (Exception\InvalidArgumentException | Exception\UnexpectedValueException $e) { throw new BadRequestException("Deserialization error: {$e->getMessage()}", 45896, $e); } // TODO ACL // // TODO validation // $em = $this->getDoctrine()->getManager(); foreach ($editor->getPersistable() as $el) { $em->persist($el); } $em->flush(); return $this->json($editor->getHousehold(), Response::HTTP_OK, [], [ "groups" => ["read"], ]); } }