Problem/Motivation
Domain 4.0.0 removed API that Domain Path calls, so the module no longer works against it, and the 3.x branch is pinned to Drupal 10.3 and 11. A 4.x branch is needed for Domain 4.x, and it should run on both Drupal 11.4 and Drupal 12 so that the current and the next-major CI lanes are both green.
The project also ships no PHPStan configuration of its own, so the job silently runs at the GitLab template default of level 0 with unmatched-ignore reporting switched off.
Proposed resolution
Domain 4.x API. Domain 4.0.0 removed the static DomainAccessManager::getAccessValues() and ::getAllValue(), now on the DomainAccessFields utility class in domain_access, and DomainStorage::createHostname(), now DomainResolver::getRequestHostname(). Domain Path called the first two in 16 places across DomainPathHelper, DomainPathFormHelper and DomainPathItem, and the third in two FunctionalJavascript tests. All of them are ported.
Drupal 12. core_version_requirement becomes ^11.4 || ^12 on both info files, and drupal/domain becomes ^4.0@dev because no 4.x release is tagged yet. Two Kernel test classes carried no #[RunTestsInSeparateProcesses], which throws an exception in Drupal 12. Every test class now declares its group as an attribute, because PHPUnit 12 no longer reads doc-comment metadata and the 15 classes whose only group was @group would have lost it. Three constraint validators gain a native void return type, which is the forward-compatibility warning that fails a lane running with --fail-on-deprecation. module_set_weight() is deprecated in Drupal 11.5 and the ModuleWeight service replacing it does not exist on the 11.4 floor, so the call is chosen at runtime through DeprecationHelper::backwardsCompatibleCall().
Legacy hook wrappers. Both .module files held nothing but #[LegacyHook] wrappers, one per hook, around hook classes that already exist. On an ^11.4 floor those wrappers never run, so the two files are removed, as Domain did on its own 4.x branch.
PHPStan level 3. The project gets its own phpstan.neon at level 3, plus an entity_mapping.neon telling phpstan-drupal which class the domain and path_alias storages hand back. Level 3 reported 67 findings and all 67 are fixed in the code, with no baseline and no new ignores. Restoring unmatched-ignore reporting also exposed 55 dead @phpstan-ignore-next-line comments, which are removed.
CI. OPT_IN_TEST_NEXT_MAJOR is on and OPT_IN_TEST_PREVIOUS_MAJOR is off. Pathauto has no Drupal 12 release yet and pulls in ctools and token, so _LENIENT_ALLOW_LIST covers all three. A .deprecation-ignore.txt scoped to the dependency namespaces keeps the same warnings failing the lane when they come from this project own code. The test hostnames move from the phpunit job onto .phpunit-base so that every lane built from it resolves them.
Remaining tasks
Both CI lanes have to be green, including the manual next-major one.
API changes
None in this project own API. The minimum requirements change to Drupal 11.4 and Domain 4.x.
Release notes snippet
Domain Path 4.x requires Domain 4.x and supports Drupal 11.4 and Drupal 12.
AI-Generated: Yes (Claude Code was used to help draft this issue summary and to write the changes. I reviewed them. PHPStan level 3, phpcs and the Kernel test suites were run locally against Drupal 11.4.4 with Domain 4.x; the Functional and FunctionalJavascript suites are left to CI.)
Issue fork domain_path-3618623
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