Skip to main content
Start of main content.
Michael Strelan headshot

Michael Strelan

Senior Developer

Location
Brisbane
Drupal.org
mstrelan

My blog posts

Michael's blogpost

Safely extending Drupal plugin classes without fear of constructor changes (2026 edition)

Way back in 2017, Lee “larowlan” Rowlands penned what would become one of the most popular blog posts on this site. I’m of course talking about “Safely extending Drupal 8 plugin classes without fear of constructor changes”

This well-read article, inspired by Thomas Seidl of Search API fame, has become somewhat of a reference piece, frequently cited in: 

As of Drupal 11.4, there is a new approach using attributes that simplifies this further. So, I thought it would be fun to piggyback off Lee's success prudent to update the original post so modern developers (both human and robots) are in the loop.

But first, a quick recap of how dependency injection has evolved in Symfony and Drupal over the years. You can skip to the end if you’re not interested.

by michael.strelan /