Composer for (nearly) everything!

Datum
maandag, 30 december 2019
Body

I used the last days of this year, which is so climactic for our servers, to introduce a fairly large change to the Drupal-7 installation on which our Bookshop website runs. That Drupal version was still completely manually maintained. Drupal itself offers options to issue an update command to update installed modules, but that function does not extend to maintaining the Core of the Drupal system. Every time a new version of the Core came out I had to manually copy the modules of it over the installed modules. In doing so, you can make mistakes, or completely overlook a new version. And that's risky. Often the new versions of the core are created for what is called security reasons. Apparently, some sh*thead has once again found a hole in the code to hack sites...

Reason for me to delve into this. The solution, as almost always, was simpler than you might suspect. Composer can help with this too! So I reinstalled Drupal-7, now based on a composer setup. Then with composer require downloaded all required modules again. And finally, the website of the Bookshop migrated to the new setup. That last step went terribly wrong at first, but luckily I can fall back on the backup of ISP Strato. Ultimately, the Bookshop runs on a composer-maintained version of Drupal 7. Just tap in cu every now and then and the site will be updated. Cu is an alias for composer update --with-dependencies.

In any case, the site now runs as if nothing has changed at all, while that is exactly the case! That is always the best kind of ICT!

Reactions or questions? Mail to:  serverblog@erbenet.nl.                                                            ... back to overview of blogs ...