Answer the question
In order to leave comments, you need to log in
How to properly filter and map data when implementing an API in Symfony?
Good day!
A question arose, or rather a couple of questions:
- how to properly validate (filter) data from a request without a Form component - how to map data to entities without
using
JMSSerializerBundle
no one for some reason offered alternative solutions.
I would be grateful for any ideas, links. Thank you!
Answer the question
In order to leave comments, you need to log in
1. symfony/validator
2.symfony /serializer
$dto = $this->get('serializer')->deserialize(
$request->getContent(),
DTO::class
);
public function editAction(DTO $dto)
{
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question