Make WordPress Core

Changeset 63020


Ignore:
Timestamp:
08/05/2026 07:45:41 AM (2 months ago)
Author:
westonruter
Message:

Build/Test Tools: Raise the PHPStan rule level to 2.

This rule level includes:

unknown methods checked on all expressions (not just $this), validating PHPDocs

Baselines are regenerated for errors at this level.

Developed in ​https://github.com/WordPress/wordpress-develop/pull/12852.
Follow-up to r61699, r63019.

Props westonruter, apermo.
See #64680.

Location:
trunk
Files:
19 added
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/phpstan.neon.dist

    r63019 r63020  
    2323        # and the list between the markers. Do not edit that list by hand.
    2424        # phpstan:baselines start
     25        - tests/phpstan/baselines/arguments.count.neon
     26        - tests/phpstan/baselines/binaryOp.invalid.neon
     27        - tests/phpstan/baselines/class.nameCase.neon
     28        - tests/phpstan/baselines/class.notFound.neon
    2529        - tests/phpstan/baselines/empty.variable.neon
     30        - tests/phpstan/baselines/encapsedStringPart.nonString.neon
     31        - tests/phpstan/baselines/greater.invalid.neon
    2632        - tests/phpstan/baselines/isset.variable.neon
     33        - tests/phpstan/baselines/method.nonObject.neon
     34        - tests/phpstan/baselines/method.notFound.neon
     35        - tests/phpstan/baselines/parameter.defaultValue.neon
     36        - tests/phpstan/baselines/parameter.notFound.neon
     37        - tests/phpstan/baselines/parameter.phpDocType.neon
     38        - tests/phpstan/baselines/parameter.unresolvableType.neon
     39        - tests/phpstan/baselines/property.nonObject.neon
     40        - tests/phpstan/baselines/property.notFound.neon
     41        - tests/phpstan/baselines/property.private.neon
     42        - tests/phpstan/baselines/property.protected.neon
     43        - tests/phpstan/baselines/return.missing.neon
     44        - tests/phpstan/baselines/staticClassAccess.privateMethod.neon
     45        - tests/phpstan/baselines/varTag.noVariable.neon
    2746        - tests/phpstan/baselines/variable.undefined.neon
    2847        # phpstan:baselines end
    … …  
    3049parameters:
    3150        # https://phpstan.org/user-guide/rule-levels
    32         level: 1
     51        level: 2
    3352        reportUnmatchedIgnoredErrors: true
    3453
Note: See TracChangeset for help on using the changeset viewer.