-
Notifications
You must be signed in to change notification settings - Fork 222
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
Made it possible for totalCount to be a promise #782
Conversation
rsolyanik
commented
Nov 11, 2020
Q | A |
---|---|
Bug fix? | yes |
New feature? | no |
BC breaks? | no |
Deprecations? | no |
Tests pass? | yes |
Documented? | no |
License | MIT |
Sorry but all released versions are feature freeze. We only accept bugfix or security fix right now for these branches. Your feature add bc so can't definitely not be accepted. |
@mcg-web this don't break bc, but fixes error |
Changing the signature of an interface is a bc. If the fix introduce any bc it can't be allowed on this branch maybe it can be fixed a different way? |
@mcg-web Well, that's a tricky case. What if fixing a bug requires changing the signature of a function? Should we now just leave bugs only because of it? And is it a new feature anyway? I thinks it was supposed to be able to return promises from the beginning and if it doesn't work as supposed, then it's a bug. What is a BC break? It's something that makes your code fail. The following signature: public function getTotalCount() is a superset of: public function getTotalCount(): ?int How can it possibly make your code fail? Maybe only if someone decides to use the method reflection, but I don't see any reson to do so. |
@murtukov there's 2 methods changed, the getter doesn't effectively break anything but what about the setter ? |
@mcg-web the same with the setter, he just removed the type hint. I mean how can it possibly break anything? Or you mean the user-defined classes, that extend the interface, could stop working? |
This is a public interface. It scope doesn't stop to the bundle, so yes this interface was implemented by other users since it was introduced to help doing that. Changing a public method of a non internal class or interface is a BC. |
@mcg-web Then we return back to the previous questions:
yet it fails to return a promise
|
There is always a way of fixing this without breaking BC (some dedicated getter and setter to deal with promise?) , that what I say higher up. I'm not arguing about fixing this bug but the "how" does not follow the release policies of this bundle. We only allow break BC for security reasons. The contract is while updating a minors or a patch release the bundle should not break anything. |