Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork5.2k
[Draft] Added detailed BC promise text#3438
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Remove default value of a parameter No No | ||
Add type hint to a parameter No No | ||
Remove type hint of a parameter Yes [1]_ No | ||
Change return type Yes [1]_ No |
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.
changing the return type should be allowed only for compatible return values, to avoid breaking calling code, otherwise it is not safe to use anymore
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.
Yes, I initially had a footnote for that there, but then you need to define which return values are "compatible". I couldn't really find a useful definition here.
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.
if changing the return type is allowed, you can basically allow everything else as well. I would rather get a fatal error that a method signature is wrong, than having some nasty bugs because of changed return type, likearray[0]
is suddenlystring[0]
.
fyi, this needs a rebase |
Replaced by#3439 (correctly rebased onto 2.1 now). |
I created a detailed text about which parts of the Symfony code are covered by our BC promise. The goals are to:
I'll continue working on the individual rules of allowed changes. Nevertheless, let me hear your feedback.