Add test PHPUnit 10 with PHP-Parser 4 usage#7
Merged
samsonasik merged 3 commits intomainfrom Oct 14, 2025
Merged
Conversation
Member
Author
|
@TomasVotruba this PR demonstrate error: by require nikic/php-parser 4 and phpunit 10. The PR to solve this is at PR: Now, built on dev-main, let's try merge this and see if on main branch works ok 👍 |
Member
Author
|
@TomasVotruba this somehow still error https://github.com/rectorphp/rector-compat-tests/actions/runs/18494807924/job/52696503178#step:7:21 I will check more |
Member
Author
|
@TomasVotruba the issue is it seems try to load $r = new ReflectionClass(\PhpParser\ParserFactory::class);
var_dump($r->getFileName());got: phar:///prj/rector-compat-tests/vendor/phpstan/phpstan/phpstan.phar/vendor/nikic/php-parser/lib/PhpParser/ParserFactory.phpwhich we use nikic/php-parser 5.x already, so the error is actually expected. I will just revert this, as this seems expected when using rector 2.x, phpstan used is 2.x, and php-parser is 5.x. The patch is actually valid before phpunit 12 tho :), for phpunit < 12 on different issue: |
samsonasik
added a commit
that referenced
this pull request
Oct 14, 2025
This reverts commit 2f6ca92.
samsonasik
added a commit
that referenced
this pull request
Oct 14, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Test for rectorphp/rector#9438