You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When rector encounters hierarchy of classes where child class redefines a method to receive one of the parameters as optional (which obviously a bad idea and a rather pungent code smell, but still), it makes the optional parameter last in the child class, but keeps sibling classes and parent class intact, which leads to fatal error.
Bug Report
When rector encounters hierarchy of classes where child class redefines a method to receive one of the parameters as optional (which obviously a bad idea and a rather pungent code smell, but still), it makes the optional parameter last in the child class, but keeps sibling classes and parent class intact, which leads to fatal error.
Minimal PHP Code Causing Issue
https://getrector.com/demo/96afac7f-bd7f-4809-b1dd-5fed5038fa8d
Here's a demo repository to showcase the issue.
Expected Behaviour
Rector should either change the complete code hierarchy, skip the change (with warning), or make the optional parameter non-optional (with warning)
The text was updated successfully, but these errors were encountered: