Jump to the navigation menu

To patch or not to patch

Applying patch files is a common way to customise and extend open source software, and how we used to submit changes to Drupal before issue forks and merge requests were added to Drupal.org.

Some software, such as dwm and st from suckless.org are released as minimal versions that you patch to add features to.

If you find a line of code that you want to add, edit or delete, a patch file describes the changes so you can re-apply them whenever the source file changes.

Patching offers unlimited customisation and flexibility.

Whatever changes you want to make, you can.

The downside is you need to maintain any patches you've written.

If a change is made that causes your patch to no longer apply, you'll need to update the patch.

There are some patches I commonly apply to Drupal projects, but I'll try to either contribute the changes back to the Drupal so I no longer need the patch or make the change in a custom module.

Sometimes, though, patching is the only option.

- Oliver

Was this interesting?

Sign up here and get more like this delivered straight to your inbox every day.

About me

Picture of Oliver

I'm an certified Drupal Triple Expert with 18 years of experience, a Drupal core contributor, public speaker, live streamer, and host of the Beyond Blocks podcast.