[CodeQuality][EarlyReturn] Handle crash Replace Stmt to Expr on FlipTypeControlToUseExclusiveTypeRector+FlipTypeControlToUseExclusiveTypeRector+ReturnBinaryOrToEarlyReturnRector#4474
Conversation
…ypeControlToUseExclusiveTypeRector+FlipTypeControlToUseExclusiveTypeRector+ReturnBinaryOrToEarlyReturnRector
|
Thanks for the test fixture 👍 Seems the fix commit is missing. Or still WIP? :) |
|
I am still looking for the solution 👍 |
|
I can check if you want. It will be some rule returning expr instead of stmt. Not directly in the refactor() method, but in one of nested nodes IMO. |
|
That seems due to refactor return array of nodes, which inside the nodes doesn't have origNode yet/overlapped on multi rules |
|
It seems can be tweaked on |
That should be ok, untill all those arrays contain only stmts. |
|
Fixed with verify on re-print has empty origNode, that's means the node is on nested Expr d0e6a73 |
|
All checks have passed 🎉 @TomasVotruba let's give it a try to have faster feedback to test ;) |
|
It seems cause error on downgrade: https://github.com/rectorphp/rector-src/actions/runs/5518361429/jobs/10062204998#step:15:23 I will check 👍 |
|
Thank you @samsonasik 🎉 BTW I also get a similar error But I could not reproduce this one in the playground. Just writing it here in case it rings a bell for you. Or maybe it'll also be fixed with this PR because both are |
|
@canvural yes, that should be resolved in core instead of individual rule to avoid similar issue happen again. I am looking into it, as current solution cause error on downgrade |
|
I'll tag a new version 👍 |
|
@TomasVotruba it not yet resolved, so new tag won't be applied to downgrade as downgrade build error |
|
Ah, I see :) |
Fixes rectorphp/rector#8044