PHP Symfony Sonata

Tag Doctrine

Symfony: Queries from OR

When building Doctrine queries, combining `AND` and `OR` conditions can quickly become difficult to structure correctly. This article shows how to use `QueryBuilder` and `orX()` to group alternative conditions while keeping the required filters separate.

Symfony: Uid in API

Avoid exposing internal entity IDs in your API. In this article, we’ll see how to use UUID v7 with Symfony Uid, from generating and storing UUIDs to documenting them with NelmioApiDoc and querying them with Doctrine.

Symfony: Checking for Entity Differences in Doctrine 2

In this article, I show how to use Doctrine 2 UnitOfWork to detect changes in an entity. You’ll learn how to retrieve the original entity data and inspect a change set containing both old and new values, as well as how to efficiently check changes for a single entity.

© 2026 PHPNotes — Powered by WordPress

Theme by Anders Noren — Up ↑