Issue #3616747: Remove reportUnmatchedIgnoredErrors from phpstan configuration
Removes reportUnmatchedIgnoredErrors: false from phpstan.neon, so PHPStan reports ignores that no longer match an error, and drops the ignores that had gone stale. The module carried 50 of them; 26 remain.
Removed as unmatched:
- 24
@phpstan-ignore-next-linecomments acrossdomain,domain_access,domain_alias,domain_config,domain_config_uianddomain_source. - The
classConstant.internalClassidentifier on theconfirmFields()calls indomain_access.installanddomain_source.install;method.internalClassis still reported there and is kept.
Two ignores were reported on one Drupal version and not the other, which an inline ignore cannot express. Both are resolved in the code rather than in the configuration:
module_set_weight()is deprecated as of Drupal 11.5, sofunction.deprecatedwas reported on the next major version of Drupal but not on 11.4. The four calls now go throughDeprecationHelper::backwardsCompatibleCall(), which makes them forward compatible and leaves PHPStan nothing to report on either version. TheModuleWeightservice is addressed by its service id rather thanModuleWeight::class, because the class does not exist in 11.4 and a class constant would be reported asclass.notFoundthere.DomainSourcePathAliasTestfell back to thepath_alias.whitelistservice whenpath_alias.prefix_listwas absent. That service was removed in Drupal 10, so on^11.4 || ^12the fallback is unreachable and the conditional is removed, which also retires acspell:disable-next-line.
phpstan.neon therefore keeps only its existing Unsafe usage of new static entry.
Verified: phpstan, phpstan (next major), phpcs, cspell, eslint, stylelint and phpunit all pass. phpunit (next major) fails with the five cases that also fail on 4.x without this change.
AI-Generated: Yes (Claude Code was used to make this change and to run PHPStan and PHPCS over the result against Drupal 11.4. I reviewed the work myself before posting it.)