What is the alternative of DataTransformer
?
#4892
-
DataTransformer has been deprecated since It says
and
I am trying to understand what is the reason behind this decision and can any one help me point out in the right direction of alternative way to do it when using DTO? Reference: |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
I think this choice has been made in order to simplify the usage of DTO and the underlying code in API Platform. |
Beta Was this translation helpful? Give feedback.
-
It's become easier please check the documentation at https://api-platform.com/docs/main/core/dto/ (main branch). Basically all you need to do instead is a State Processor, you'll receive the input and process it as you like. If you still want to persist your data decorate our state process to do it magically. Let me know if something is unclear. |
Beta Was this translation helpful? Give feedback.
It's become easier please check the documentation at https://api-platform.com/docs/main/core/dto/ (main branch). Basically all you need to do instead is a State Processor, you'll receive the input and process it as you like. If you still want to persist your data decorate our state process to do it magically.
Let me know if something is unclear.