Repository navigation
Build/Test Tools: Update PHPStan to 2.3.7 and the strict-rules extension to 2.1.2 - #16186
westonruter wants to merge 1 commit into
Conversation
This also updates `phpstan/phpstan-strict-rules` to 2.1.2. Neither release changes what PHPStan reports for core, so the baselines are unchanged. Co-Authored-By: Claude Opus 5.5 (medium effort) <noreply@anthropic.com> Claude-Code-Session-Id: 6039515b-ba87-4f51-93df-97ff03a73533
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. |
|
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:
|
Updates PHPStan and its extensions to their latest releases:
phpstan/phpstan2.3.6 → 2.3.7range(), so PHPStan knows when it can throw aValueError.??is narrowed to non-null when a comparison rules out the right side, ternary arms are only recorded as conditional expressions when they are disjoint, and two conditional types are compared branch by branch only when they share the same condition.TypeCombinator::union().phpstan/phpstan-strict-rules2.1.1 → 2.1.2RequireParentConstructCallRulenow names an anonymous class by its display name in its error.StrictFunctionCallsRuleis simplified without changing what it reports.phpstan/phpstan-phpunitstays at 2.1.2, which is already the latest.Neither update changes what PHPStan reports for core:
composer phpstan:baselinesleaves every baseline intests/phpstan/baselinesandtests/phpstan/baselines-strictunchanged, and bothcomposer phpstan:defaultandcomposer phpstan:strictreport no errors.composer phpstan:fixfinds no@phpstan-ignorecomment that has gone stale.The release was also checked for anything that would let core drop a workaround. The three
ignoreErrorsentries inphpstan.neon.distmarkedreportUnmatched: falsebecause they wait on PHPStan (theValueError@throwsincompat.php,wp_imagecreatetruecolor()returningGdImage, andsubstr_compare()'s nullable$length) all still match with 2.3.7, so they stay.Companion Gutenberg PR: WordPress/gutenberg#87323
Trac ticket: https://core.trac.wordpress.org/ticket/65817
Use of AI Tools
AI assistance: Yes
Tool(s): Claude Code
Model(s): Claude Opus 5.5 (medium effort)
Used for: Updating the dependencies, checking the analysis and baselines, and drafting this description; directed and reviewed by me.
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.