Repository navigation
Build/Test Tools: Update PHPStan to 2.3.4 - #15137
westonruter wants to merge 1 commit into
Conversation
Regenerating the baselines with PHPStan 2.3.4 produces no changes, so the existing baselines remain accurate. The `phpstan/phpstan-phpunit` extension is already at its latest version. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
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:
|
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. |
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are recorded for the PHPStan 2.3.4 dependency update.
No open issues 🎉
What changed in this PR
Updates WordPress’s PHPStan development dependency from 2.3.2 to 2.3.4 to incorporate upstream static-analysis fixes.
Changes:
- Pins
phpstan/phpstanto version 2.3.4. - Leaves the PHPUnit extension unchanged; the PR reports no baseline changes after regeneration.
| File | Description |
|---|---|
composer.json |
Updates the pinned PHPStan version to 2.3.4. |
Review effort: Balanced
lancewillett
left a comment
There was a problem hiding this comment.
Reviewed the PHPStan 2.3.4 pin. Installed the updated dependencies in an isolated checkout and ran the full configured analysis: no errors. Current CI is green, including static analysis; Copilot reports no active findings. No new tests or baseline changes are needed for this dependency update.
AI review · gpt-6
|
I'm waiting a couple days from the release to let any issues shake loose before committing. |
Updates PHPStan from 2.3.2 to 2.3.4. The
phpstan/phpstan-phpunitextension is already at its latest version (2.1.1).Baselines are regenerated with
composer phpstan:baselines, and none of them change: PHPStan 2.3.4 reports exactly the same errors as 2.3.2.Changes since 2.3.2
2.3.3:
preg_match()/preg_match_all()shape inference now uses a parser generated by phplrt instead of Hoa, fixing a number of inferred shapes: assertions are zero-width, groups in negative assertions are never set, backreferences and subroutine calls are parsed, and conditional subpatterns, branch reset groups, duplicate group names, and quantified atoms that can match an empty string are handled more accurately (Replace Hoa with a regex parser generated by phplrt phpstan/phpstan-src#6851).date( 'D' )anddate( 'F' )(Infer literal types for word date format characters phpstan/phpstan-src#6838).2.3.4:
TypeCombinator::union()fixes for constant scalars refined by accessory types, which are now compared against and absorbed into the other union members correctly (Compare constant scalars refined by accessory types against other union members inTypeCombinator::union()phpstan/phpstan-src#6863).CollectedDataNodeare listed in--debugoutput (Print the rules on CollectedDataNode in --debug output phpstan/phpstan-src#6723).CollectedDataNoderules from the result cache. Core does not includebleedingEdge.neon, so it does not apply here.Follow-up to r64757.
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
Used for: Performing the upgrade, regenerating the baselines, and drafting this description.
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.
🤖 Generated with Claude Code