Backport PHP 8.3 support to PHP-Parser 4.x #935
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hello,
PHPStan is a bit between a rock and a hard place regarding PHP 8.3 support. I understand you want to support PHP 8.3 features only with PHP-Parser 5.
But I can upgrade to PHP-Parser 5 only in PHPStan 2.0. Additionally, PHPStan depends on BetterReflection which also needs to release a new version that works with PHP-Parser 5 before I can use it in PHPStan. And also Rector depends on PHPStan which means that Rector can support PHP 8.3 only once PHPStan does.
But I want to support PHP 8.3 as soon as possible with PHPStan and I don't want to be forced to release PHPStan 2.0 sooner than I'd want because of that. I'd like to have PHP 8.3 support and 2.0 release as separate milestones.
So I'd like to decouple and deconstruct this situation to remove a bottleneck and to make this easier between PHPStan <-> BetterReflection <-> Rector. Support for PHP 8.3 in 4.x would really help me with that.
I prepared a branch where I cherry-picked the commits. I'd understand if you don't want to merge this. In that case I'll use a temporary PHP-Parser fork in PHPStan 1.x with these commits. (Rector will also likely need to use the same fork.)
Thanks for understanding.
/cc @TomasVotruba