I’m setting up a controller on Drupal 8 which should redirect 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.
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.
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.
Over the course of my latest project at Microserve, I’ve 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.