How to use modules or themes not yet available on Drupal 11 with Composer

Submitted by Frederic Marand on
Let's face it, with the velocity of major version upgrades in Drupal having increased a lot since Drupal 9, many projects - both themes and modules - do not yet have releases for Drupal 11, or even Drupal 10 for some of them, although they may have automatic compatibility patches / issue forks ready to be committed for months. Alas, just because they do not declare Drupal 11 (or 10) compatibility in their composer.json (or they don't have one yet, looking at you Bartik), composer require with a patches clause won't work because Composer checks for compatibility without the patches. So how can we use all that perfectly ready code that doesn't have a correctly labeled release ?

Tip of the day: using Homebrew to get PHP Pear extensions behind a proxy

Submitted by Frederic Marand on

Four pears with leaves on a tableMost of the time, installing tools using Homebrew works flawlessly, including PHP these days. However, having to work in a client environment requiring a proxy, the PHP 8.1 post-install failed when updating Pear/Pecl channels, although the usual http_proxy and https_proxy were set and worked normally, including for the other Homebrew tasks. What could be going on ?

Tip of the day: validating a Jenkinsfile from the CLI with HTTPie

Submitted by Frederic Marand on

The Jenkins butler with a keyboard, variations by fgm@osinetfr and Dall-E 2An easily missed feature in Jenkins is the bundled linter for Jenkinsfiles.

While there are many examples about how to use it with cURL, I could not find any using HTTPie, which I find much more convenient in general than cURL. So, after some fumbling due to the little documented expectations of the validator, here is the solution showing how to validate a Jenkinsfile from the CLI:

Tip of the day: patching legacy Drupal 7 projects with Composer

Submitted by Frederic Marand on

Some late Drupal 7 projects use Composer for project structure and tooling, even though they don't use Composer for the Drupal requirements proper. In that case, the normal Drupal 8/9 patching process using cweagans/composer-patches is not available, since dependencies are not handled with Composer. So is there a way to apply patches cleanly from Composer ? Sure there is! Let's see how.