Skip to content

Revert Drush/Guzzle 8 workaround once Drush supports Guzzle 8 #179

Description

@rfay

Context

#178 added a temporary workaround so drupal12 workspaces can install Drush. Drupal core main requires guzzlehttp/guzzle: "^8.0" as of 2026-07-24 (drupal.org #3612544) while every Drush version still requires ^7.0, making ddev composer require drush/drush unsatisfiable against Drupal 12 HEAD.

The workaround retries the require with a Composer inline alias presenting the locked Guzzle 8 version as a 7.x one:

ddev composer require "guzzlehttp/guzzle:8.0.0 as 7.99.0" drush/drush -W

This needs to come back out once Drush supports Guzzle 8.

Trigger

Watch drush-ops/drush#6602 — a one-line change relaxing the constraint to ^7.8.2 || ^8.0. When it merges and lands in a release (or in 14.x-dev, which is what these workspaces install), this issue is actionable.

Note: the workaround is self-clearing at runtime. The template tries the plain require first and only falls back when it fails, so new workspaces stop using the alias the moment Drush is fixed — there's no urgency, and no workspace breaks if this issue sits. What's left to do is delete the dead code.

Verify first

# Should now report a constraint that includes ^8.0
curl -s https://raw.githubusercontent.com/drush-ops/drush/14.x/composer.json | jq -r '.require["guzzlehttp/guzzle"]'

Then, in a drupal12 workspace on core HEAD, confirm the plain require succeeds on its own:

cd ~/drupal-core && ddev composer require drush/drush && ddev drush status

The setup log (/tmp/drupal-setup.log) should show ✓ Drush installed with no preceding Drush/Guzzle constraint conflict line.

Remove

  1. drupal-core/template.tf — in the Drush install block (~L925–L957), delete the else branch containing the _guzzle_ver lookup and the aliased retry, collapsing back to a plain if ddev composer require drush/drush ....
  2. drupal-core/scripts/test-issue-branches.sh — delete the case "$GUZZLE_VER" fallback. The DRUSH_EXIT capture can stay or go; it exists only to feed the fallback, but it's also more correct than the original cmd | tail -5 (which tested tail's exit status).
  3. Keep the SETUP_FAILED=true on Drush install failure. That's an independent fix — every later step (site install, cache rebuild, uli) runs through Drush, so the old "non-critical" warning just buried the real cause. Not part of the revert.
  4. Run the pre-push checklist: terraform fmt -recursive, terraform -chdir=drupal-core validate, terraform -chdir=drupal-core test.
  5. Build a fresh drupal12 workspace and confirm the Drupal install completes.

drupal-contrib (added in #181)

  1. drupal-contrib/template.tf — in the ddev poser retry loop (~L775–L800), delete the if [ "$_guzzle_aliased" = "false" ] && grep -q ... block that adds the alias to composer.json and retries.
  2. drupal-contrib/scripts/test-issue-branches.sh — delete the matching if [ "$POSER_RC" != "0" ] && grep -q ... block. The POSER_RC capture can stay; it's more correct than the original cmd | tail -10 form regardless of the fallback.
  3. Run the pre-push checklist for drupal-contrib: terraform fmt -recursive, terraform -chdir=drupal-contrib validate, terraform -chdir=drupal-contrib test.
  4. Build a fresh drupal-contrib workspace with Drupal Version = 12 and confirm ddev poser succeeds without the alias.
  5. Consider reverting the PR-matrix change in fix(drupal-contrib): install Drush via Guzzle alias on Drupal 12 HEAD #181 (.github/workflows/drupal-contrib-integration-test.yml, smoke cell back to token D11) once D12 is no longer the fragile one — or leave it, since it's now the cell most likely to catch the next core dependency bump.

Already-provisioned workspaces

Workspaces created while the workaround was active keep "guzzlehttp/guzzle": "<version> as 7.99.0" in composer.local.json (gitignored by core, so it won't dirty the checkout). It stays harmless, but pins that exact Guzzle version. To clear it without recreating the workspace:

cd ~/drupal-core
ddev composer remove guzzlehttp/guzzle --no-update && ddev composer update drush/drush -W

The same applies to any non-Coder DDEV project where the one-liner was applied by hand — there the alias lives in the project's own composer.json and will show in git status.

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions