Skip to content

Update PHPStan to 2.3 - #82

Merged
jdevalk merged 1 commit into
developfrom
filip/phpstan-2.3
Oct 8, 2026
Merged

jdevalk merged 1 commit into
developfrom
filip/phpstan-2.3

Conversation

@ilicfilip

Copy link
Copy Markdown
Collaborator

Updates PHPStan to 2.3.0, the release with the big performance work (PHPStan 2.3: a leap in performance).

What changes

A major update, from PHPStan 1.12.32:

  • composer.json: phpstan/phpstan ^1.10 → ^2.0, szepeviktor/phpstan-wordpress ^1.3 → ^2.0.
  • composer.lock: phpstan/phpstan 2.3.0, szepeviktor/phpstan-wordpress 2.0.4, php-stubs/wordpress-stubs 6.9.0 → 7.1.2; symfony/polyfill-php73 is no longer needed.
  • phpstan.neon.dist, two fixes PHPStan 2 required. The code itself needed no changes.
    • tests doesn't exist in this repository, which PHPStan 2 refuses, so it is marked optional as tests (?).
    • The missingType.generics ignore matched nothing on PHPStan 2 and was reported as unused, so it is removed.

Checked

  • PHPStan 2.3 on this repository's own config reports 0 errors, the same as before the update.
  • PHPStan was run with a cold cache before and after the update.

🤖 Generated with Claude Code

PHPStan 1.12 to 2.3, with szepeviktor/phpstan-wordpress 1.3 to 2.0 (which brings WordPress stubs 6.9 to 7.1). The code needed no changes. Two config entries did:

- excludePaths: tests does not exist in this repository, which PHPStan 2 refuses; marked optional as tests (?).
- The ignore for missingType.generics matched nothing on PHPStan 2 and is reported as unused; removed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Signed-off-by: Filip Ilic <ilic.filip@gmail.com>
@github-actions

github-actions Bot commented Oct 6, 2026

Copy link
Copy Markdown

Test on Playground
Test this pull request on the Playground
or download the zip

@github-actions

github-actions Bot commented Oct 6, 2026

Copy link
Copy Markdown
Composer package changes
Dev Packages Operation Base Target
php-stubs/wordpress-stubs Upgraded v6.9.0 v7.1.2
phpstan/phpstan Upgraded 1.12.32 2.3.0
szepeviktor/phpstan-wordpress Upgraded v1.3.5 v2.0.4
symfony/polyfill-php73 Removed v1.33.0 -

@ilicfilip
ilicfilip marked this pull request as ready for review October 8, 2026 11:59
@ilicfilip
ilicfilip requested a review from jdevalk October 8, 2026 11:59

@jdevalk jdevalk left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

No actionable issues found. Verified the dependency and configuration changes against commit 9718e8e in an isolated checkout: Composer validation, locked dependency installation, platform requirements, PHPStan analysis of all eight PHP files, and code style checks pass. All nine CI checks also pass.

@jdevalk
jdevalk merged commit 1215e50 into develop Oct 8, 2026
9 checks passed
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