Bug Report
| Subject |
Details |
| Rector version |
0.17.0 |
Rector is overly eager in removing variable assignments.
Even when the variable is not referenced after assignment, it may still be bound by reference.
Minimal PHP Code Causing Issue
https://getrector.com/demo/18574ffe-1c32-4d81-9d0d-9f41b9e1c193
Expected Behaviour
Rector should not remove variable assignments when the variable is bound by reference.
Bug Report
Rector is overly eager in removing variable assignments.
Even when the variable is not referenced after assignment, it may still be bound by reference.
Minimal PHP Code Causing Issue
https://getrector.com/demo/18574ffe-1c32-4d81-9d0d-9f41b9e1c193
Expected Behaviour
Rector should not remove variable assignments when the variable is bound by reference.