Something I’ve noticed in Symfony, as well as Javas Spring, is that the models tend to have getters and setters for every property. Is there something wrong with having public properties that I’m missing? Or at least only have getters/setters for certain items that maybe need some kind of calculation or formatting or something like a password?

Btw, asked a similar question in r/java, but I wanted to get some PHP perspectives as well since that’s most of my background

source