Articles
Symfony, Twig & Doctrine ORMs
The framework this site has the most to say about: Twig templates, Doctrine mappings and queries, forms, and the security bits that changed under everyone.
Search these 6 posts
Everything in Symfony, Twig & Doctrine ORMs

10/06/2026
Symfony 7.4 LTS or 8.1: Which Should You Use?
Symfony 8.1 is the latest stable and 7.4 is the long-term support release. The support dates and PHP requirements, and how to choose for a new or existing project.

01/25/2016
Doctrine: joining entities with no association
In Symfony using Doctrine, if no association is available for two entities, you can still join them and treat them like they have a relationship. To do so, you have to use the “Join: WITH” method.

11/30/2015
Extending a parent Twig block with parent()
Define a block in a child template and it replaces the parent's version completely - which is rarely what you wanted for a block holding stylesheets or scripts. parent() puts the inherited content back.

04/28/2015
Show the logged-in user in a Twig template
The snippet everyone has saved uses app.user.username, which throws on every supported Symfony. Here is the version that works, which check to guard it with, and how to greet somebody by name rather than by email address.

04/14/2015
Dynamic field names in Twig with attribute() and ~
Dot notation cannot reach a property whose name you are building in the template. attribute() takes the name as a string, the tilde concatenates it, and `is defined` keeps the loop from throwing on a gap.

03/24/2015
Doctrine field type mappings: tinyint is a boolean
When Doctrine reads a MySQL schema, every tinyint becomes boolean whatever its declared length. The full type table, and two ways to keep a small integer an integer.