-
-
Notifications
You must be signed in to change notification settings - Fork 735
Closed
rectorphp/rector-src
#7453Labels
Description
Bug Report
| Subject | Details |
|---|---|
| 2.1.1 | Rector 2.1.1 |
When converting callback to arrow functions, if the callback uses parameters which are exclusively used in a compact call, it removes the parameters, but compact does not know about them anymore (See example code below).
Minimal PHP Code Causing Issue
Here it is: https://getrector.com/demo/71bd1985-bd97-4cda-af96-440b328bb962
Expected Behaviour
Maybe the best call would be to convert compact calls to explicit array, but it does more than what the rule says.
Or maybe Rector should not convert this callback at all.
I'm not pretty sure what is the best solution here, but happy to talk about it.