Repository navigation
Conversation
This release adds support for auto-fixable rules through the new `--fix` option, which can also remove unmatched `ignoreErrors` entries and `@phpstan-ignore` comments, and allows extensions to be registered with attributes. The analysis reports no new errors, and the baselines are unchanged. The `phpstan/phpstan-phpunit` and `phpstan/phpstan-strict-rules` extensions are already at their latest versions. Follow-up to r65078. See #65817.
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. Core Committers: Use this line as a base for the props when committing in SVN: To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. Props Bot commandsYou can trigger Props Bot actions by commenting on this PR:
|
WordPress 7.2 will support PHP 8.6.
Test using WordPress PlaygroundThe changes in this pull request can previewed and tested using a WordPress Playground instance. WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser. Some things to be aware of
For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation. |
|
Merged in r65310. |
This makes two changes to the PHPStan tooling.
Update PHPStan to 2.3.5
Updates
phpstan/phpstanfrom 2.3.4 to 2.3.5. This release adds support for auto-fixable rules through the new--fixoption, which can also remove unmatchedignoreErrorsentries and@phpstan-ignorecomments, and allows extensions to be registered with attributes.The other PHPStan-related packages,
phpstan/phpstan-phpunit(2.1.1) andphpstan/phpstan-strict-rules(2.1.1), are already at their latest versions.Raise the maximum PHP version analyzed to 8.6
phpVersion.maxintests/phpstan/base.neonis raised from80500to80600, and the comment above it now describes the setting as the supported version range rather than the minimum version.With the maximum at 8.5, PHPStan narrows
PHP_VERSION_IDtoint<70400, 80500>, so any check for PHP 8.6 is reported as always false. For example, thePHP_VERSION_ID >= 80600check in #15204 is flagged withgreaterOrEqual.alwaysFalse, even though the branch is reachable on PHP 8.6.Testing
Running the full analysis locally with both changes reports no new errors, and no baseline or
ignoreErrorsentries became unmatched, so the baselines are unchanged. With the change from #15204 applied, itsgreaterOrEqual.alwaysFalsewarning is no longer reported.Trac ticket: https://core.trac.wordpress.org/ticket/65817
Use of AI Tools
Claude Code was used to check for available updates, apply the PHPStan update, test the
phpVersionchange, run PHPStan locally, and draft this description.🤖 Generated with Claude Code