Skip to content
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

[CodeQuality] Handle crash on do {} while with first class callable on OptionalParametersAfterRequiredRector #6554

Merged
merged 6 commits into from
Dec 11, 2024

Conversation

samsonasik
Copy link
Member

PHPStan virtual node seems needs unpack:

There was 1 error:

1) Rector\Tests\CodeQuality\Rector\ClassMethod\OptionalParametersAfterRequiredRector\OptionalParametersAfterRequiredRectorTest::test with data set #12 ('/Users/samsonasik/www/rector-...hp.inc')
Error: Call to undefined method PHPStan\Node\Printer\Printer::pPHPStan_Node_MethodCallableNode()

/Users/samsonasik/www/rector-src/vendor/nikic/php-parser/lib/PhpParser/PrettyPrinterAbstract.php:606
/Users/samsonasik/www/rector-src/vendor/nikic/php-parser/lib/PhpParser/PrettyPrinterAbstract.php:281

@samsonasik
Copy link
Member Author

Fixed with try catch internal phpstan error inside PHPStan NodeScopeResolver

@samsonasik samsonasik merged commit 33d12b7 into main Dec 11, 2024
41 checks passed
@samsonasik samsonasik deleted the crash-do branch December 11, 2024 16:43
@samsonasik
Copy link
Member Author

I reported error on phpstan side

phpstan/phpstan#12246

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.

2 participants