-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
BC promise: only optional arguments can be removed #12606
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@nicolas-grekas may we have your 2 cents here? Thanks 😊 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With one minor suggestion
What about this point?
|
A trait is not part of a type, thus we don't know what contract it implements: maybe an interface/the parent of the class that uses the trait actually declared the optional argument. Removing it would be a BC break. Since we cannot know, we cannot remove these arguments. |
Should we add a note to explain this? Probably in another PR... |
Thanks for updating this guide! Let's keep it like this for now. If there is confusion about traits in the core contributions, we can always elaborate in this guide. |
…hanhui) This PR was merged into the 3.4 branch. Discussion ---------- BC promise: only optional arguments can be removed Fixes symfony/symfony#34230 (comment) I've changed `Yes` to `No`, since it makes more sense, i.e. it's not allowed, unless... Additional question: Should I also change `No` to `No [3]_` for traits? Or is there a specific reason why it's absolutely not allowed on traits? Commits ------- ef477e3 BC promise: only optional arguments can be removed
Fixes symfony/symfony#34230 (comment)
I've changed
Yes
toNo
, since it makes more sense, i.e. it's not allowed, unless...Additional question: Should I also change
No
toNo [3]_
for traits? Or is there a specific reason why it's absolutely not allowed on traits?