-
Notifications
You must be signed in to change notification settings - Fork 11.7k
[5.7] Bug fix related to extra calls to resolving callbacks (The Other way) #27061
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
|
Changing a About boolean flags in methods - I'm not a fan of them for reasons listed here. |
|
@X-Coder264 No problem with targeting the master branch. |
|
@imanghafoori1 people might be overwriting the method |
|
@X-Coder264 That can be fixed in the following PRs separately. I have made a proposal for that, |
|
Ok if they override it, why they should pass a third parameter for the If they continue to use it normally and pass the 2 parameters nothing will change. |
|
Anyway the PR to the master branch already exists, but it is closed, I can close this and open that. |
|
It's a breaking change because you are gonna get this: http://sandbox.onlinephpfunctions.com/code/6908b81f74b823e7ac3030ff00e14872b4baf533
|
|
Aha, Got it. |
8cdd1f2 to
f53313a
Compare
|
Now we have a little but more change but it is fully backward compatible. |
f53313a to
98a52b8
Compare
+ bug fix related to multiple calls to "resolving" and "afterResolving" callbacks
98a52b8 to
54b1a28
Compare
(Following the currently open PR #27014) This is an other way of fixing the issue of "multiple calls to resolving callback" which came to my mind while I was under the shower today.🚿 🛀
Compared to the solution in: #27014 ,it requires a less code and is more understandable and logical.
Plus, it adds an opportunity to have a fully backward compatible new feature to the IOC container for resolving an object silently. (Which will suppress the resolving callbacks.)
for example :
makeSilent(...This way we fire the callback attached to the interface and skip the re-firing it when resolving the implementation.
which makes more sense, because the callback was actually attached to the interface like this :
app()->bind(someInterface::class, 'Myclass'); `Anyway I do not know which one you like most, so I leave them both open.