Overriding checkout templates in Magento

I recently spent the best part of a day trying to figure out how to replace a single part of a Magento checkout with a custom template. Since I spent most of my time jumping around the internet, I thought I'd collate my findings in this post.

Testing https redirects in Docksal

Redirecting http:// to https:// is standard practice, but how do you test that locally if the redirect depends on environment variables and a certain set of paths?

Running functional JavaScript tests in Docksal

Running PHPUnit tests in Docksal is straightforward, but we struggled to get Functional JavaScript tests to run within Docksal. Here's how we got them working.

Creating fields in update hooks on Drupal 8

You've got an update hook that depends on a new field that depends on config import that needs to be done after the update hook has run that requires the config import that needs... ARGH.

User registration using Simple Oauth

In a headless setup, I wanted to protect the user registration endpoint from being accessed by unauthenticated users. I achieved it using the Simple Oauth module.

Testing redirects in Drupal 8

I'm setting up a controller on Drupal 8 which should redirct to the home page if certain query parameters aren't set. Writing a test to make sure that the redirect happens correctly took longer than expected. After trying a number of different approaches, I finally figured it out.

Make a file executable in Git

I make it a habit to ignore all file permission changes in Git, but sometimes I need to make a script executable. This is how I change the permissions on a file in such a way that they're stored in the repo.

Upgrading from Drush 8 to 9 with Acquia

While starting on a new project recently, I decided to take the plunge and upgrade to Drush 9. The upgrade process, especially since it's an Acquia site, was a little bit haphazard. In this post I'll describe the issues I faced and how I resolved them.

Creating and releasing a project on Drupal.org

Over the course of a recent project, I helped to write some custom modules that have been reused across a few other projects internally. Instead of keeping them internal, I decided to open-source them and post them on Drupal.org, feeding back to the community and ensuring the stability and safety of the code. I found the process to be quite difficult to follow, so here's a handy summary of how to publish a module to Drupal.org, and some tips and tricks along the way.