wp-parsely icon indicating copy to clipboard operation
wp-parsely copied to clipboard

Upgrade to PHPStan 2.x

Open acicovic opened this issue 6 months ago • 2 comments

Is your request related to a problem?

We're currently using PHPStan 1.x as our Static Analysis tool.

PHPStan 2.0.0 was released on November 11 2024, though the 1.x branch is still maintained at the time of this writing. According to this blog post:

PHPStan 2.0 = PHPStan 1.12 + Bleeding Edge + BC breaks.

Describe the solution you'd like

Upgrade to PHPStan 2.x following the upgrade guide to take advantage of all the advancements.

acicovic avatar Jun 04 '25 07:06 acicovic

The first step for upgrading is enabling PHPStan's Bleeding Edge mode and fixing all the errors.

Currently, Bleeding Edge results in 63 errors for our codebase.

acicovic avatar Jun 04 '25 07:06 acicovic

Bleeding Edge can be enabled by adding the following to phpstan.neon:

includes:
	- phar://phpstan.phar/conf/bleedingEdge.neon

acicovic avatar Jun 04 '25 07:06 acicovic