Skip to main content

EasyAdmin without the debt: CSS first, templates as a last resort

Symfony
EasyAdmin without the debt: CSS first, templates as a last resort

Customizing an EasyAdmin back office without building up maintenance debt? My rule: CSS first, templates as a last resort. 🎨

When you want to tweak EasyAdmin's rendering (or any Symfony bundle's), the temptation is to override the bundle's Twig templates. It works… but every version upgrade becomes a lottery: the original template changed, your copy is stale, and the regressions are silent.

My approach on my projects:

  • βœ… A "bridge" stylesheet that targets the bundle's existing classes and adjusts the rendering on top
  • βœ… The official extension points (field configurators, CRUD options, events)
  • ❌ Copying Twig templates β€” only when there is no other way, and documented as such

CSS survives the bundle's minor updates. A copied template rarely does.

It holds beyond EasyAdmin: the less you fork a bundle's code, the less debt you pay on every upgrade.

See the original post on LinkedIn