DEV Community

Oliver Davies
Oliver Davies

Posted on • Originally published at oliverdavies.uk on

Symfony conventions making their way to Drupal

Drupal 8 was a major turning point for Drupal when it was released in 2015.

Moving from "not invented here" to "proudly found elsewhere" and "getting off the island", Drupal 8 introduced Composer to Drupal core and several of the Symfony PHP components.

Following Drupal 8's release, Drupal core started to follow semantic versioning and, six months later, released Drupal 8.1.0 with new features.

In comparison, Drupal 7, with non-semantic versioning, is now on version 7.99.

The approach to having fixed release dates instead of feature-based release dates is also used in Symfony, which makes it much easier to plan for.

The differences between major versions, such as Drupal 9 and 10, is the removal of deprecated code - making it much easier than ever before to upgrade to the new major version of Drupal core. Sometimes, you won't need to update any custom code - especially if it's been maintained and updated during the minor releases.

I've been pleased to see Symfony features such as autowiring and autoconfiguration start to be used within Drupal, as well as discussions around using PHP attributes to replace annotations and docblocks.

Most recently, when writing my automated testing email course, I saw a number of aliases have been added to core's core.services.yml file, which means I can use the fully qualified class name as the service name without adding aliases to my own services files.

Drupal and Symfony are separate projects, and Drupal uses more than just Symfony components, but as someone who uses Drupal and Symfony, I'm happy to see them learning from and inspiring each other.

I'm looking forward to seeing the next thing - Twig components, maybe - in Drupal.

P.S. Do you need immediate access to an expert Drupal Developer? With my Drupal development subscription, make unlimited requests for a fixed monthly price in less time than posting to a job board!

Top comments (0)