5 ms·
I already explained how I personally do it in that comment chain: Doctrine ORM and Symfony. Instead of working directly with raw database data as arrays, you wo
by bakugo 3y ago
I already explained how I personally do it in that comment chain: Doctrine ORM and Symfony. Instead of working directly with raw database data as arrays, you work with classes where all the database columns are defined as typed class properties and let the ORM handle the conversion between the two for you.
If you're starting a new project in PHP, I recommend giving it a try. The SymfonyCasts tutorials are a great way to start (though sadly they're not free).