DEV Community

Discussion on: 9 rules for writing (better?) code

Collapse
 
altesack profile image
Marat Latypov

Great article!
Sadly I have to use setters/getters every single day. In Symfony world it's highly hard to avoid it

Collapse
 
klnjmm profile image
Jimmy Klein

Thank you πŸ™ !
Have you ever try to don't generate getter and setter in your doctrine entity ?
I would say that it is not mandatory.
But it is a difficult rule, we are so used to have getter and setter.

Collapse
 
altesack profile image
Marat Latypov

Yes, I know Doctrine doesn't require it. I'm pretty sure some Symfony package does Don't remember exactly... Forms maybe ...

I have to try it on some home project