Skip to content

fix(drupal-core): install Drush via Guzzle alias while Drush lags core's Guzzle 8 bump#178

Merged
rfay merged 1 commit into
mainfrom
fix-drush-guzzle8
Jul 25, 2026
Merged

fix(drupal-core): install Drush via Guzzle alias while Drush lags core's Guzzle 8 bump#178
rfay merged 1 commit into
mainfrom
fix-drush-guzzle8

Conversation

@rfay

@rfay rfay commented Jul 25, 2026

Copy link
Copy Markdown
Member

Summary

Drupal core main moved to guzzlehttp/guzzle: "^8.0" on 2026-07-24 (drupal.org #3612544, core commit 6e1efec8a) while every Drush version still requires ^7.0. That makes ddev composer require drush/drush unsatisfiable against Drupal 12 HEAD, so every drupal12 workspace has been failing its Drupal install for the last day — the setup log shows Failed to install Drush (non-critical) followed by a cascade of drush is not available errors from drush si / drush cr.

Nothing in this repo, DDEV, or the add-on is involved: the same conflict reproduces from a 6-line composer.json with no site and no DDEV.

  • Fall back to an inline Guzzle alias when the plain require fails. Guzzle 8 works with Drush at runtime, so composer require "guzzlehttp/guzzle:<locked> as 7.99.0" drush/drush -W installs unmodified upstream Drush from Packagist. The version is read from composer.lock because Composer rejects a range as an alias source (the alias source must be an exact version), and the fallback is gated on Guzzle 8.* so it can't misfire on 11.x/10.x workspaces.
  • The plain require still runs first, so the fallback stops being reached the day Drush tags Guzzle 8 support (drush-ops/drush#6602, a one-line constraint change) and the block can simply be deleted. No coordinated cleanup needed.
  • Treat a Drush install failure as fatal. Every later step (site install, cache rebuild, uli) runs through Drush, so the old "non-critical" warning only buried the real cause under downstream errors.
  • Mirror the same fallback in drupal-core/scripts/test-issue-branches.sh, and capture the require's exit code there — the previous cmd | tail -5 form meant the script tested tail's status, so a failure wouldn't have been detected without pipefail.

Test plan

  • terraform fmt -recursive clean
  • terraform validate passes for drupal-core
  • terraform test passes for drupal-core (6 passed)
  • bash -n drupal-core/scripts/test-issue-branches.sh clean
  • Reproduced the failure in a live drupal-core workspace on core HEAD: plain ddev composer require drush/drush exits 1; -W also fails with Conclusion: don't install drupal/core 12.x-dev
  • Verified the fallback in that workspace: installs upstream drush/drush 14.x-dev against guzzlehttp/guzzle 8.0.0, then drush si -y demo_umami[OK] Installation complete, drush cr OK, drush statusDrupal bootstrap: Successful, Install profile: demo_umami
  • Verified the same one-liner fixes a plain local drupal/recommended-project D12 site (outside Coder)
  • Fresh drupal12 workspace build from the pushed template (not yet run — the fallback was exercised by hand in an existing workspace, in the same order the template runs it)

Notes

  • drupal-contrib with Drupal Version = 12 is very likely broken the same way — it adds drush/drush to require-dev and resolves via ddev poser. Not addressed here: it defaults to 11, and the fix there can't read a lock file (the solve fails before one exists), so it needs a different, separately tested approach.
  • Drush's own CI on #6602 is currently red on the test-*-functional jobs. I confirmed which jobs failed but didn't read the CircleCI logs, so I can't say whether that's real Guzzle 8 breakage in paths beyond the three commands exercised above. The workaround produces the same runtime state the merged PR would, either way.
  • Drupal 11.x and 10.x workspaces are unaffected.

🤖 Generated with Claude Code

Drupal core main moved to guzzlehttp/guzzle ^8.0 on 2026-07-24
(drupal.org issue #3612544) while every Drush version still requires
^7.0, so `ddev composer require drush/drush` became unsatisfiable
against Drupal 12 HEAD and every drupal12 workspace failed to install
Drupal.

Guzzle 8 works with Drush at runtime — verified drush 14.x-dev against
guzzle 8.0.0 with `drush si demo_umami`, `drush cr` and `drush status`.
So retry the require with an inline alias presenting the locked Guzzle
version as a 7.x one. Composer only accepts an exact version as an alias
source, hence reading it from composer.lock, and the fallback is gated on
Guzzle 8.x so it cannot misfire on 11.x/10.x workspaces.

The plain require still runs first, so this fallback stops being reached
once Drush ships Guzzle 8 support (drush-ops/drush#6602) and can then be
deleted.

Also treat a Drush install failure as fatal. Every later step (site
install, cache rebuild, uli) runs through Drush, so the old
"non-critical" warning just produced a cascade of "drush is not
available" errors that buried the real cause.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@github-actions

github-actions Bot commented Jul 25, 2026

Copy link
Copy Markdown
PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-07-25 15:12 UTC

@rfay

rfay commented Jul 25, 2026

Copy link
Copy Markdown
Member Author

Tracking issue for removing this workaround once Drush supports Guzzle 8: #179

@rfay
rfay merged commit 0ac89b2 into main Jul 25, 2026
14 checks passed
@rfay
rfay deleted the fix-drush-guzzle8 branch July 25, 2026 15:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant