Skip to content

Bump PHPStan rule level to 2 and regenerate baselines - #12852

Closed
westonruter wants to merge 1 commit into
WordPress:trunkfrom
westonruter:bump/phpstan-level-2
Closed

Bump PHPStan rule level to 2 and regenerate baselines#12852
westonruter wants to merge 1 commit into
WordPress:trunkfrom
westonruter:bump/phpstan-level-2

Conversation

@westonruter

@westonruter westonruter commented Aug 5, 2026

Copy link
Copy Markdown
Member

✅ Committed in r63020 (d8871f3)


Follow-up to #11151 (r63019, e9e0be1)

Trac ticket: https://core.trac.wordpress.org/ticket/64680

$ composer phpstan:baselines
Analyzing with phpstan.neon.dist, existing baselines suppressed...

                                                                                                                        
 [OK] Baseline generated with 902 errors.                                                                               
                                                                                                                        

tests/phpstan/baselines/arguments.count.neon: 6 entries, 9 errors
tests/phpstan/baselines/binaryOp.invalid.neon: 3 entries, 4 errors
tests/phpstan/baselines/class.nameCase.neon: 1 entries, 1 errors
tests/phpstan/baselines/class.notFound.neon: 14 entries, 14 errors
tests/phpstan/baselines/empty.variable.neon: 9 entries, 9 errors
tests/phpstan/baselines/encapsedStringPart.nonString.neon: 1 entries, 1 errors
tests/phpstan/baselines/greater.invalid.neon: 1 entries, 1 errors
tests/phpstan/baselines/isset.variable.neon: 6 entries, 6 errors
tests/phpstan/baselines/method.nonObject.neon: 7 entries, 7 errors
tests/phpstan/baselines/method.notFound.neon: 5 entries, 5 errors
tests/phpstan/baselines/parameter.defaultValue.neon: 17 entries, 17 errors
tests/phpstan/baselines/parameter.notFound.neon: 3 entries, 3 errors
tests/phpstan/baselines/parameter.phpDocType.neon: 1 entries, 1 errors
tests/phpstan/baselines/parameter.unresolvableType.neon: 1 entries, 1 errors
tests/phpstan/baselines/property.nonObject.neon: 47 entries, 75 errors
tests/phpstan/baselines/property.notFound.neon: 62 entries, 113 errors
tests/phpstan/baselines/property.private.neon: 8 entries, 29 errors
tests/phpstan/baselines/property.protected.neon: 8 entries, 11 errors
tests/phpstan/baselines/return.missing.neon: 41 entries, 44 errors
tests/phpstan/baselines/staticClassAccess.privateMethod.neon: 34 entries, 55 errors
tests/phpstan/baselines/varTag.noVariable.neon: 8 entries, 17 errors
tests/phpstan/baselines/variable.undefined.neon: 195 entries, 479 errors
phpstan.neon.dist: `includes` updated.

Use of AI Tools

n/a


This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.

@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

Core Committers: Use this line as a base for the props when committing in SVN:

Props westonruter.

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@apermo apermo left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

pento pushed a commit that referenced this pull request Aug 5, 2026
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 #12852.
Follow-up to r61699, r63019.

Props westonruter, apermo.
See #64680.


git-svn-id: https://develop.svn.wordpress.org/trunk@63020 602fd350-edb4-49c9-b593-d223f7449a82
markjaquith pushed a commit to markjaquith/WordPress that referenced this pull request Aug 5, 2026
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 WordPress/wordpress-develop#12852.
Follow-up to r61699, r63019.

Props westonruter, apermo.
See #64680.

Built from https://develop.svn.wordpress.org/trunk@63020


git-svn-id: http://core.svn.wordpress.org/trunk@62239 1a063a9b-81f0-0310-95a4-ce76da25c4cd
@westonruter westonruter closed this Aug 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants