Post

🤔 Your #Doctrine entities are lying to you. Or at least... they might be. We've spent years making required properties nullable so entities can double as form models. #Symfony's new ObjectMapper component has me wondering if there's a better way. symfonycasts.com/blog/honest-...

symfonycasts.comKeeping Doctrine Entities Honest with DTOs and ObjectMapperDoctrine entities in Symfony often double as form models, forcing required properties to become nullable and allowing invalid states required by Symfony forms. Let's explore how DTOs (Data Transfer…

0 reposts3 likes

Separating entities and user input data was n extremely valuable lesson to learn back in the day. It was perhaps the inflection point that got me into, in a broad sense, a better coding mindset. Less friction though, is more than welcome 🙃