-
-
Notifications
You must be signed in to change notification settings - Fork 708
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
NotImplementedException due to: "Rector\NodeTypeResolver\StaticTypeMapper::mapPHPStanTypeToPhpParserNode for PHPStan\Type\IntersectionType" #2614
Comments
What about Rector 0.6.9? What in your |
Sorry, I was under the impression that the rector.yaml file was not processed if I passed in a rule name in the command line. That was my mistake. I updated to 0.6.9, and the error still persists. Here's the smallest rector.yaml file that produces the error with the PHP code from the original post: parameters:
autoload_paths:
- 'C:\path\to\project\vendor\autoload.php'
sets:
- 'type-declaration' Removing the autoload_paths prevents the error from happening. Here is the full command and the output:
|
Thanks for more details.
Why do you need to add it? It should be loaded by default by Rector. How is the Rector installed? I'm having troubles to replicate the issue. When I run: vendor/bin/rector process theFileYouProvided.php --set type-declaration -n No code is changed and Rector is ended with OK. Could add failing test case here? |
Both of these are probably related -- I have rector installed globally. It resides in a separate project, as we develop dozens of smaller apps. My hope was to have one rector installation to work on all of the projects. I wrote a small script that auto generates the rector.yaml file based on the Symfony and Twig versions of each of the applications. Sorry I cannot be more help, I don't have the experience with Rector or Unit tests that allows me to add a failing one. I understand that this means the bug can't be duplicated, and apologize for taking up your time. |
rectorphp/rector-src@f608461 Remove RemoveOverriddenValuesRector as flow of control is not reliable and could cause invalid removal (#2614)
Current Behaviour
Minimal PHP Code Causing Issue
Basically, this is a simplified Doctrine Entity with a Collection. The getter says it returns the Collection, and the parameter type hint is an Intersection of the Collection type, and the array syntax of what the Collection contains.
Removing either the getter or the @var annotation makes the error not appear.
Expected Behaviour
No error? 😃
The text was updated successfully, but these errors were encountered: