Issue #3616783: Fix the remaining Drupal 12 test failures and stop deprecations failing the next-major lane
Two core changes account for the five tests still failing in phpunit (next major). Neither is a bug in domain's runtime code, so this is test-side only.
hook_module_implements_alter() was removed (#3571069). The domain_config_hook_test support module used it to switch its own procedural hook_user_login() back off, which is the scenario it exists to reproduce: a page cache request policy that reads the config factory, next to a module that removes a hook implementation.
The hook is now an OOP implementation, DomainConfigHookTestHooks::userLogin(), and a second class carries #[RemoveHook] to take it out again, following core's own HookOrder test modules. RemoveHook exists in Drupal 11.4 and on the development branch, so no version check is needed, and the procedural .module file is gone.
The standard profile front page moved to /user/login (#3572350, 22 July), which is when these three tests started failing. core/profiles/standard/config/install/system.site.yml reads front: /node on 11.4.x and front: /user/login on the development branch.
DomainConfigUIOverrideTest::testOverridescompared its overrides against a hardcoded/node. It now sets the base front page it wants to compare against, so the value no longer depends on the profile.DomainPrefixFunctionalTest::testFormSubmissionOnPrefixedDomainsubmitted the site information form unchanged. The form revalidates the front page path and an authenticated user has no access to the login route, so the save was refused with "Either the path '/user/login' is invalid or you do not have access to it". The test now submits a front page the person saving can reach, which is also closer to what the test is about, namely submitting a form on a prefixed domain.DomainNavBlockTest::testDomainNavasserted the block repeatsuser/loginon each domain while that page is open. Any URL for the front page path is written as the site root, so the test browser landed on the root and the block built its links from that request. It now uses a page that is not the front page.
Verification. The Drupal 12 side is only reachable in CI, so the next-major lane is the check for the five. The 11.4 lane covers the other direction, that none of this breaks the current major. Local functional runs on 11.4 were not possible this time: the only 11.4 environment here had its module slot in use.
phpcs with the Drupal standard is clean over the repository. phpstan reports the same findings with and without this change.
Not for 3.x or 3.0.x: they support Drupal 10.2 and 11, where hook_module_implements_alter() still runs and the profile still installs /node.