Problem/Motivation

The phpstan (next major) job fails on 4.x with three unmatched ignores, while phpunit (next major) is green. Two inline ignores in DomainSourceToken (lines 60 and 62) cover the magic property access $node->field_domain_source, and the ignore in DomainConfigHookTest (line 43) covers $user->passRaw. Both phpstan jobs now report them as unmatched: the next major job first, and the current one since its toolchain moved on after the last green 4.x run, so every merge request against 4.x fails phpstan until they are gone.

The documentation also describes earlier branches. README.md says the module requires Drupal 9.5, and docs/index.md (English, French and Spanish) says it requires Drupal 10.2, while 4.x declares ^11.4 || ^12. The "Domains and caching" section of docs/index.md still tells site builders to add domain to required_cache_contexts in services.yml, which the module's service provider has done automatically for some time, as README.md already says. The phpstan configuration quoted in README.md shows level 2, and the project runs level 3.

docs/metrics.md and its translations still describe a snapshot of the 3.x branch taken on 2026-07-02.

Proposed resolution

  • Remove the need for the ignores rather than adjusting them: read the field with $node->get('field_domain_source'), and give the test user an explicit password through the values argument of drupalCreateUser().
  • State the requirements by branch (4.x requires Drupal 11.4 or later and supports Drupal 12) in README.md and the three docs/index pages, and replace the manual caching instructions with what the service provider does.
  • Quote the current phpstan.neon in README.md.
  • Regenerate docs/metrics.md and its translations from 4.x as the last commit before the release is tagged.

AI-Generated: Yes (Claude Code was used to draft this issue summary and to write the changes on the merge request. I reviewed them before posting, and both phpstan jobs pass on the merge request pipeline.)

Issue fork domain-3627952

Command icon 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

mably created an issue. See original summary.

mably’s picture

Issue summary: View changes
mably’s picture

Status: Active » Needs review
mably’s picture

Title: Fix the next major phpstan job, correct the documented requirements and refresh the codebase metrics for the first 4.x release » Fix the phpstan jobs, correct the documentation and refresh the codebase metrics for the first 4.x release

  • mably committed 2224c518 on 4.x
    task: #3627952 Fix the phpstan jobs, correct the documentation and...
mably’s picture

Status: Needs review » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

  • mably committed 1538b7e0 on 4.x
    Issue #3627952: Refresh the codebase metrics pages after the set domain...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.