Issue summary generated with the help of an LLM.

Problem/Motivation

PHPStan currently flags several class.nameCase errors across Drupal core where class, interface, or trait names are referenced with incorrect capitalization. These errors are currently ignored in core/.phpstan-baseline.php.

Although PHP treats class names as case-insensitive at runtime, mismatched casing reduces code readability, breaks consistency with PSR-4/Drupal coding standards, and adds unnecessary entries to the PHPStan baseline.

Proposed resolution

  • Update all class, interface, and trait references flagged with class.nameCase to match their exact declared casing.
  • Regenerate core/.phpstan-baseline.php to remove the resolved class.nameCase entries.

Remaining tasks

  • Fix all class.nameCase occurrences in core.
  • Regenerate core/.phpstan-baseline.php.
  • Verify PHPStan passes in GitLab CI.

User interface changes

None.

API changes

None.

Data model changes

None.

Issue fork drupal-3640899

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

mallezie created an issue. See original summary.

mallezie’s picture

Component: phpunit » other
Status: Reviewed & tested by the community » Needs review