
The Specification Pattern With Doctrine Criteria: Queries That Don't Leak
Business rules written as composable predicates, compiled to Doctrine Criteria at the adapter. One rule, tested once, no DQL in the core.
Tag archive

Business rules written as composable predicates, compiled to Doctrine Criteria at the adapter. One rule, tested once, no DQL in the core.

Dispatch a domain event inside the transaction and it fires on rows that never got saved. Collect on the aggregate, release after commit.

Embed a Money or Address value object into the owning table with Doctrine. Column prefixes, the nullability trap, and keeping VOs first-class.

Random UUIDv4 keys fragment your index. How Symfony Uid's ULID and UUIDv7 give you time-ordered ids that store and index well.
Originally posted on https://symfonycasts.com/blog/honest-entities Your Doctrine entities are...

A 20-line entity-to-row mapper you can read beats a reflection mapper you can't. Here is why explicit mapping protects the domain.

PHP 8.4 ships native lazy objects. They're faster than Doctrine's 15-year-old proxies, and the migration is one method call.
Starting in EasyAdmin 5.1, Symfony can now inject your entities into custom actions with zero configuration.

For half the services in a PHP codebase, a thin DBAL plus a hand-written mapper is faster to read, faster to evolve, and easier to test than a full ORM.

L'enseignement de 60 jours, le ROI en trois axes Trente-deux jours de production en solo...

The 60-day lesson, ROI on three axes Thirty-two days of solo production on an ERP, 118,808...

Define the repository port in domain language, implement with Doctrine 3, and keep the door open for DBAL, Eloquent, or an in-memory adapter.