[PHPStan 2.1.35] Add failing test where original Node not processed under VirtualNode on NodeScopeResolver::processNodes() by samsonasik · Pull Request #4795 · phpstan/phpstan-src
@ondrejmirtes this is failing test case where since PHPStan 2.1.35, it seems original node under VirtualNode no longer processed on NodeScopeResolver::processNodes(),
see issue:
Related PRs:
see comparison of Before vs After Bump to PHPStan 2.1.35
- 2.1.34 (working) : [test] Test pin PHPStan 2.1.34 (working) rectorphp/rector-downgrade-php#359
- 2.1.35 (not working): [test] Test bump PHPStan 2.1.35 (not working) rectorphp/rector-downgrade-php#360
Test can be run with:
➜ phpstan-src git:(add-failing-tset) vendor/bin/phpunit tests/PHPStan/Analyser/VirtualNodeOriginalNodeCallbackTest.php
PHPUnit 11.5.46 by Sebastian Bergmann and contributors.
Runtime: PHP 8.4.16
Configuration: /Users/samsonasik/www/phpstan-src/phpunit.xml
Random Seed: 1768974045
F 1 / 1 (100%)
Time: 00:00.355, Memory: 50.00 MB
There was 1 failure:
1) PHPStan\Analyser\VirtualNodeOriginalNodeCallbackTest::testOriginalNodeOfVirtualNodeIsPassedToCallback
Expected callback to receive original PhpParser\Node\Expr\StaticCall.
Failed asserting that false is true.
/Users/samsonasik/www/phpstan-src/tests/PHPStan/Analyser/VirtualNodeOriginalNodeCallbackTest.php:32