| Subject | Details |
| :------------- | :---------------------------------------------------------------|
| Rector version | Rector 0.8.x-dev@0a8bef3 |
| Installed as | docker latest image |
When using the AddProphecyTraitRector (via the set phpunit91) rector reported an error for some of my files 馃憞
Could not process "../project/tests/MapperTest.php" file, due to:
"Pick more specific node than "PhpParser\Node\Expr\StaticCall", e.g. "$node->name"
After checking the code, it seems when you do something like Foo::bar()->method() this error is reported. After separating Foo::bar() into an own variable and calling ->method() on this variable, the error was gone, but I think this shouldn't be reported as an error, as this is valid PHP code
Does not work: https://getrector.org/demo/02427812-7d64-4cb9-9b68-bf35d015b0d8#result
Works: https://getrector.org/demo/5f74a983-3f0f-4b2b-b9e7-139e3ed92b2c#result
The file should be processed and the prophecy trait should be added without rector reporting the error "Pick more specific node than "PhpParser\Node\Expr\StaticCall", e.g. "$node->name"
Thanks for very prectise report and 2 demo links :+1:
It helped me to find the bug, and add the fix in 5 minutes
Thank you for fixing it so quickly, highly appreciated 馃槃