-
-
Notifications
You must be signed in to change notification settings - Fork 680
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
Exception thrown when using ReturnTypeDeclarationRector::class
and bcmath extension
#6896
Exception thrown when using ReturnTypeDeclarationRector::class
and bcmath extension
#6896
Comments
The relevant debug output is:
I've tried copying my code into the demo and removing methods to see when it works and when it doesnt, but I would appreciate any suggestions to help me reproduce this using the playground. |
SetList::TYPE_DECLARATION
and @return numeric-string
SetList::TYPE_DECLARATION
and numeric-string
Hi, thanks for reporting. Could you share minimal content of Ideally in failing example on: https://getrector.org/demo |
@TomasVotruba Thanks for looking at this. I've confirmed locally that the minimal content supplied in the original description causes the exception locally. |
I've managed to narrow it down some more: https://getrector.org/demo/1ec68bfe-aab7-6998-9433-611a2d6f4b08 The exception occurs when using bcmath functions and |
SetList::TYPE_DECLARATION
and numeric-string
ReturnTypeDeclarationRector::class
and bcmath extension
Bug Report
When running rector set to PHP 8.1, and using the
SetList::TYPE_DECLARATION
an exception is thrown for(Edit: I've just tried this with@return numeric-string
@return string
and the same still applies so I'm not sure what at all is happening here). I've tried to recreate the problem using the demo below, however this doesn't show an exception, it just returns the page with no output whereas normally there would be a rector output saying "no changes".Minimal PHP Code Causing Issue
Demo: https://getrector.org/demo/1ec68b36-cdab-6cc4-99a7-55325363ad15
(Edit: I don't think this demo is helpful and it could be just because the bcmath extension is not included in demo)
Expected Behaviour
Rector should not throw an exception and should either refactor the code, report an error for me to change my code, or it should skip it.
Further information
The specific error in console is:
and the full exception when debugging:
Thank you for making rector, I hope I will give back in contributions over time.
The text was updated successfully, but these errors were encountered: