From 2b1ce640e423a3d008ab6a3026267e219d08883e Mon Sep 17 00:00:00 2001 From: Randy Fay Date: Sat, 26 Sep 2026 16:25:48 -0600 Subject: [PATCH] Fix drupal-contrib D12 tests tracking a frozen alpha tag instead of core HEAD The D12 test cell resolves drupal/core via a "^12" constraint, which Composer's prefer-stable logic always resolves to the latest tagged prerelease (currently 12.0.0-alpha1, frozen at 2 Sep 2026) rather than the continuously-updated 12.0.x dev branch. This caused CI to keep failing on a Twig 3.30 TypeError (drupal.org #3625969) for weeks after the fix landed on 12.0.x, because no new prerelease tag had been cut. Use an explicit "12.x-dev" constraint for version 12, which Composer always honors regardless of prefer-stable/minimum-stability, so this cell tracks core HEAD as intended. Versions 10/11 are unaffected since they have real stable tagged releases. Co-Authored-By: Claude Sonnet 5 --- drupal-contrib/template.tf | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/drupal-contrib/template.tf b/drupal-contrib/template.tf index 925899e..d471f93 100644 --- a/drupal-contrib/template.tf +++ b/drupal-contrib/template.tf @@ -672,8 +672,25 @@ COMPOSE_EOF # Set DRUPAL_CORE so ddev-drupal-contrib's expand-composer-json / ddev poser # installs the selected major version instead of defaulting to ^11. - ddev dotenv set .ddev/.env.web --drupal-core "^$DRUPAL_VERSION" - log_setup "✓ DRUPAL_CORE set to ^$DRUPAL_VERSION" + # + # Version 12 has no stable release yet (targeted for December 2026), so + # a caret constraint like "^12" only matches the single tagged + # prerelease (e.g. 12.0.0-alpha1) — a frozen snapshot. Composer's + # expand_composer_json.php sets prefer-stable=true, which always picks + # that tagged prerelease over the continuously-updated 12.0.x dev + # branch, even though the branch is ahead of it. That bit us directly: + # drupal.org #3625969 (a Twig 3.30 TypeError) was fixed on 12.0.x after + # 12.0.0-alpha1 was tagged, so "^12" kept installing the broken alpha + # long after the fix landed upstream. Use an explicit dev branch + # constraint instead, which Composer always honors regardless of + # prefer-stable/minimum-stability, so this cell actually tracks core + # HEAD as the workflow comment above claims. + DRUPAL_CORE_CONSTRAINT="^$DRUPAL_VERSION" + if [ "$DRUPAL_VERSION" = "12" ]; then + DRUPAL_CORE_CONSTRAINT="12.x-dev" + fi + ddev dotenv set .ddev/.env.web --drupal-core "$DRUPAL_CORE_CONSTRAINT" + log_setup "✓ DRUPAL_CORE set to $DRUPAL_CORE_CONSTRAINT" # Start DDEV ddev poweroff 2>&1 | tee -a "$SETUP_LOG" || true