Symfony: Guides and Practical Know-how | Page 5 | mironsoft Blog
Symfony
-
Jan 21, 2026
Once a project moves from auto-increment primary keys to globally unique IDs, the choice often falls on UUIDv4, simply because it is the most familiar standard. What frequently gets overlooked is that a fully random ID fragments B-tree indexes in a way auto-increment keys never would, and that can cost noticeable performance on large, fast growing tables. The Symfony UID component offers UUID and ULID under one consistent API, and this article shows exactly when each format is genuinely the better choice and how both integrate cleanly with Doctrine.
-
Jan 15, 2026
As soon as an internal Symfony bundle is needed in more than one repository, the question of the right distribution path arises. This article compares Private Packagist, a self hosted Satis and monorepo strategies, including Composer configuration and CI safeguards, so bundles arrive reliably and versioned across multiple projects.
-
Jan 9, 2026
Single-page-application feel does not require React, Vue or Angular. With Symfony Turbo and Hotwire, users navigate without full-page reloads, form submits update only the relevant page regions, and real-time updates land directly in the DOM via Turbo Streams, all controlled server side.
-
Jan 8, 2026
Once a project grows past a handful of message handlers, it quickly becomes clear that concerns like logging, execution time measurement, or wrapping work inside a database transaction shouldn't be duplicated inside every single handler. The Symfony Messenger bus solves exactly this problem with a middleware chain that every message passes through before and after reaching its handler, similar in spirit to an HTTP kernel event, but specific to the messaging layer. This article walks through implementing custom middleware, registering it at the right spot in the chain, and where the line to classic event listeners sits.
-
Jan 5, 2026
The shared kernel pattern solves a problem that appears in almost every Symfony microservice landscape: several services need the same value objects, error codes or event contracts. This article shows how a shared kernel is built as its own versioned Composer package, what belongs inside, what has to stay out, and how contract tests prevent creeping coupling.
-
Jan 2, 2026
Doctrine ORM offers two fundamentally different ways to react to database operations: Lifecycle Callbacks directly in the entity and Doctrine Event Listeners as standalone services. Both solve the same problem, but with different architecture, testability and dependency management.
-
Jan 1, 2026
Without preloading, every single Symfony request recompiles the same thousand classes from OPcache bytecode all over again. With opcache.preload and a clean preload.php, the container, router and kernel classes stay permanently resident in every PHP-FPM worker before the first request even arrives.
-
Dec 30, 2025
CQRS separates reads from writes, but that separation stays half-hearted as long as both flow through the same Messenger bus with identical middleware. Two separate buses, command.bus and query.bus, each with its own middleware stack, make the separation not just conceptual but technically consistent, preventing query handlers from running inside unnecessary transactions or command handlers slipping through without validation.
-
Dec 29, 2025
Nearly every application contains logic that depends on the current time: voucher expiration dates, deadlines for order cancellations, or time-gated feature rollouts. When that time is fetched through a direct new \DateTime() call in the code, any test that needs to simulate a specific moment either turns into a fragile construction built on real sleep calls or becomes outright impossible to write. The Symfony Clock component solves this by treating the current time as an injectable dependency that can be swapped for a deterministic implementation in tests, without a single millisecond of real waiting.
-
Dec 24, 2025
A REST API that loads the same data from the database on every request and sends it back in full wastes bandwidth and server resources. ETag, Last-Modified and Cache-Control are the HTTP standard tools that prevent exactly that, with 304 Not Modified for unchanged resources and proxy caching for public data.