Support Drush 15 and the Symfony 8.2 test browser on Drupal 12

Supports Drush 15 and the Symfony 8.2 test browser on Drupal 12: https://www.drupal.org/project/domain/issues/3642184

The next-major CI lane now installs drush/drush 15.x-dev (no DrushCommands, AutowireTrait, ConsoleDefinitionsEvent or formatters: only Symfony console commands through core's dr) and symfony/browser-kit 8.2.0-RC1.

Changes

  • Drush commands: every command of domain (12) and domain_alias (5) is a Symfony console command in src/Command, which core 11.4+ registers for dr and Drush 15. A thin subclass in src/Drush/Commands exposes it to Drush 13.7 and 14 (each Drush version finds it once); composer.json declares the conflict with Drush before 13.7 that Drush documents for console commands. Names, aliases, arguments and options are unchanged.
    • Under Drush 13.7 and 14 the commands that print rows use Drush's own formatters (DrushOutputTrait), so --format, --fields (keys or labels), --field and --filter behave as before, domain:delete still runs the handlers of the domain-delete Drush event, and the questions of domain:delete and domain:scheme still follow --yes and --no.
    • Under dr and Drush 15 they print with --format (table, json, yaml, csv) and --fields.
  • domain_access and domain_source declare their reassignable field with the new hook_domain_command_fields(), which gives domain:delete its --content-assign / --source-assign options and domain:info its lines on every Drush version. It replaces their @hook option domain:delete and @hook alter domain:info implementations; other modules using those Drush hooks should implement hook_domain_command_fields().
  • Drush negotiation setting: a console command subscriber negotiates the domain under dr and Drush 15 (core's console dispatches through the Drupal dispatcher, command line only); the Drush 13.7/14 listener calls the same method.
  • Multi-host functional tests: since browser-kit 8.2, a cookie set without a Domain attribute only goes back to its host, so BigPipe sends its no-JS meta refresh on every test host; DomainTestBase::checkForMetaRefresh() follows it on the page's host instead of the base URL, where BigPipe refused it as a loop.
  • phpstan: DomainLanguageConfigFactoryOverride::getOverride() no longer needs a baseline entry that only matched before Drupal 12. The classes in src/Drush (loaded by Drush 13.7 and 14 only) use Drush and Consolidation classes that Drush 15 removed: their "not found" errors are ignored there with reportUnmatched: false.
  • Deprecations: domain.module and domain_source.module keep hook_hook_info() for the 11.x floor (core 11 still loads MODULE.domain.inc group files); the 11.5 deprecation of code in these two files is ignored by its exact message until the minimum core is 12.

Release notes

  • The domain commands also run under core's dr and Drush 15.
  • domain:delete --source-assign now reassigns the Domain Source field (it read --content-assign), and the reassignment now changes the references (it changed nothing before).
  • An unknown domain in --users-assign, --content-assign or --source-assign now stops domain:delete with an error instead of prompting or ignoring.
  • domain:list and the other row outputs are no longer HTML-escaped.
  • domain:add --validate now creates the domain when its host answers 200 (it never saved it), and domain:default --validate now checks the host (it never did).
  • --redirect=0 of domain-alias:update and domain-alias:delete-bulk now turns the redirect off, or selects the aliases without one (it was ignored).
  • The domain commands need Drush 13.7 or later (conflict in composer.json).
  • Modules that extended the domain Drush commands with @hook option domain:delete or @hook alter domain:info should implement hook_domain_command_fields(); @hook on-event domain-delete handlers keep running on Drush 13.7 and 14.

Tests

DomainConsoleCommandsTest, DomainAliasConsoleCommandsTest and DomainAccessConsoleCommandsTest run the commands through core's console.command_loader; DomainDrushOutputTest runs Drush's own FormatterListener on the Drush subclasses (skipped without Drush 13.7/14), including --yes and --no; DomainDrushNegotiationTest covers the console subscriber and the Drush listener. Drush 13.8 and 14 discovery of all 17 commands and the listener was checked with Drush's own ServiceManager.

AI-Generated: Yes (Claude Code wrote the changes and this description. I reviewed them.)

Edited by Frank Mably

Merge request reports

Loading
Loading