Problem/Motivation
The next-major (Drupal 12) CI lane now installs drush/drush 15.x-dev and symfony/browser-kit 8.2.0-RC1, where its last green run used 14.x-dev and 8.1.9. Both lanes fail on 4.x since then:
- Drush 15 has no DrushCommands, AutowireTrait or ConsoleDefinitionsEvent. It only runs Symfony console commands, through core's dr command loader. Every Drush command of domain and domain_alias, the domain:delete handlers of domain_access and domain_source, and the "Negotiate the active domain in Drush commands" listener no longer load on it, and neither do the phpstan checks of those classes and DomainDrushNegotiationTest.
- The functional tests that switch hosts get Access denied. The test browser now follows BigPipe's no-JS meta refresh and resolves it against the wrong host: after a page on five.example.local it requests /big_pipe/no-js on example.local, which already has the BigPipe no-JS cookie from the login, so BigPipe's redirect-loop guard answers 403. This happens in every multi-host functional test, whatever code it covers.
Proposed resolution
- Move each Drush command into a Symfony console command class in src/Command, which core 11.4+ registers for dr and Drush 15, and keep a thin subclass in src/Drush/Commands with the same #[AsCommand] name and options, so Drush 12 to 14 still list and run every command. Command names, options, output and aliases stay the same; descriptions only drop a leading "Drush command to".
- Keep the Drush 13.7+ negotiation listener for Drush 13 and 14, and do the same negotiation on Symfony's console command event, so it also runs under dr and Drush 15. Same setting, off by default, command line only.
- The domain functional test base classes turn off meta-refresh following in the test browser, so it behaves as before 8.2; no test changes what it checks.
- Verify on Drupal 10.6/Drush 13, 11.4/Drush 13, 12/Drush 14 and 12/Drush 15 (dr), and get every CI lane green, next major included.
Remaining tasks
- Port the Drush commands, the listener and the functional test bases, with tests (unit, and kernel through console.command_loader).
- Review the merge request.
User interface changes
None. The Drush commands keep their names, options and output, and also run under dr on Drupal 12.
API changes
New command classes in src/Command; the src/Drush/Commands classes become thin subclasses of them, so their public methods move to the new classes.
Data model changes
None.
AI-Generated: Yes (Claude Code drafted this issue summary from the CI logs and will write the fix and its tests. I reviewed the summary.)
Issue fork domain-3642184
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
mably commentedComment #5
mably commented