Skip to content

Allow PHPStan 2#12

Merged
TomasVotruba merged 1 commit into
mainfrom
allow-phpstan-2
Dec 3, 2024
Merged

Allow PHPStan 2#12
TomasVotruba merged 1 commit into
mainfrom
allow-phpstan-2

Conversation

@samsonasik
Copy link
Copy Markdown
Member

@ondrejmirtes
Copy link
Copy Markdown

Please read the upgrading guide before you attempt to upgrade.

@ondrejmirtes
Copy link
Copy Markdown

The upgrading guide says:

Please switch to PHPStan 2.0 in a new major version of your extension. It's not feasible to try to support both PHPStan 1.x and PHPStan 2.x with the same extension code.

You can definitely get closer to supporting PHPStan 2.0 without increasing major version by solving reported deprecations and other issues by analysing your extension code with PHPStan & phpstan-deprecation-rules & Bleeding Edge, but the final leap and solving backward incompatibilities should be done by requiring "phpstan/phpstan": "^2.0" in your composer.json, and releasing a new major version.

@ondrejmirtes
Copy link
Copy Markdown

@samsonasik
Copy link
Copy Markdown
Member Author

Thank you, I will look on dependency tree, as it require-dev-ing rector, which rector still require phpstan 1.

I will check if it possibly check on symplify/phpstan-rules first, with temporary remove rector dependency to allow its phpstan extensions first...

@samsonasik samsonasik marked this pull request as draft November 11, 2024 09:57
@carlos-granados
Copy link
Copy Markdown

I checked this repo and after upgrading to PHPStan 2.0 no further changes are needed, al PHPStan and PHPUnit tests pass

@TomasVotruba TomasVotruba marked this pull request as ready for review December 3, 2024 09:02
@TomasVotruba TomasVotruba merged commit 05f5433 into main Dec 3, 2024
@TomasVotruba TomasVotruba deleted the allow-phpstan-2 branch December 3, 2024 09:02
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.

4 participants