
Preventing Race Conditions in Symfony with Doctrine and PostgreSQL
Two requests reserve the last available seat. Two workers decrement the same stock quantity. Two...
Tag archive

Two requests reserve the last available seat. Two workers decrement the same stock quantity. Two...

Until now, Small Entity Schema was mainly designed around entities using Small Swoole Entity...

Database migrations are one of those things that often look harmless during code review. A migration...
There is a concurrency problem in APIs that is easy to miss. Two clients read the same...
Single-database multi-tenancy is the cheapest kind: one schema, one connection, an organization_id...
Fourteen days, sixteen posts, one thesis repeated eight times. The corpus learned to ship daily without learning to be honest about repetition. The fix is the doctrine post the catalog is missing.
Originally posted on https://symfonycasts.com/blog/honest-entities Your Doctrine entities are...

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.
Starting in EasyAdmin 5.1, Symfony can now inject your entities into custom actions with zero configuration.