-
-
Notifications
You must be signed in to change notification settings - Fork 688
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Get ready for PHPStan 2.0 #8815
Comments
Sounds good 👍 We'll give this a priority by the end of the year and do upgrade of both PHPStan 2 and php-parser 5 at once. |
We're now in the release candidate period phpstan/phpstan#11816 |
rector phpstan's extensions seems need to have compatible to phpstan 2 first:
|
@TomasVotruba Today is 11.11. Do you plan to make Rector PHPStan 2 compatible this week? |
First step: symplify/phpstan-extensions#12 |
@szepeviktor Depends how many only-in-Rector BC breaks we'll have to deal with. We use lot of internal code, so it might be a challange. @samsonasik Could you look into it? |
@TomasVotruba sure, phpstan 2 require php-parser 5 so it will need revisit my old PR: to be reincorporated ;) |
I think best way to start is to enable bleeding edge and maybe install |
Exactly, as the upgrading guide says! |
sure, see rectorphp/rector-src#6415 |
I created this PR for |
Another PR for |
I am trying to install phpstan 2 and php-parser 5 the php-parser is patched, and currently got error on phpstan service:
|
I would prefer a solution that would allow us to keep the |
@carlos-granados add |
new PR to avoid conflict with real dependency of |
Just tried rector/dev-main on our project. Works like a charm. Migrated to v2 without any problems! Good work @samsonasik |
For 99 % use cases, they should be removed. The code snippets should be part of tests, if you have any. If you use them in some own tooling to generate documentation, you can implement |
After @samsonasik's latest fix, both Rector and PHPStan work 🎉 |
Everything is working for me too! 👍👌 |
I just find out a new issue with Rector on my code : The Also, I don't understand why I havce this error on parts of my code whereas other usages of Here the stack trace :
|
Class Rector\PhpParser\Printer\BetterStandardPrinter should extended PHPStan's Printer which has this method. |
@bobdivinity that seems due to: Let's revert. |
@bobdivinity please update and try once more |
it's perfect ! Thanks buddy |
no issue for me either using |
Thank you all for feedbacks 🙏 Time to move testing to next phase... Here we go 🎉 🎉 🎉 |
Tested on a project with PHP 8.3 / Symfony 7.2 with approximately 25k files, and everything looks perfect 💪 |
Is there an expected timeframe for the release of Rector 2 already? |
@chescos I think it is expected on 12/12 |
Yes 👍 In the meantime, you can bump to |
The rc2 has just been tagged → https://github.com/rectorphp/rector-src/releases/tag/2.0.0-rc2 🔥🔥🔥 |
version 2.0.0 tagged 🤔 |
Closing as implemented. |
Feature Request
Hi, I just started working on PHPStan 2.0 which will come with PHP-Parser 5. These are early days of the development, but you can already require
phpstan/phpstan:^2.0
(with minimum-stability dev) and start working on making Rector compatible.There will be more backward compatibility breaks coming in the next few months as I work towards to release, but you can already start getting rector-src ready for Rector 2.0 which will require PHPStan 2.0.
Please keep this issue open so we can discuss the next major PHPStan version. I'd also appreciate any feedback from your side. Thanks. 🤞
The text was updated successfully, but these errors were encountered: