-
Notifications
You must be signed in to change notification settings - Fork 11.2k
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
[5.7] Track abstracts being resolved, fire resolving events once #23701
Conversation
Put this on master, btw, because it changes (expected?) behavior and that might break existing apps. |
The output is ...
The fact that the resolving event is triggered after the class has resolved is weird. I didn't expect that all. |
You're totally right on the missing Looking into your second remark... |
I added a method that checks whether an object or a base class / interface is pending in the So, for a
|
51d029e
to
25d59b2
Compare
@sisve I've added the situation you describe to the test. |
9d0259a
to
1644e62
Compare
Before this is merged - can you run some scripts that creates like 10,000 Eloquent objects? What is the memory usage before/after this patch? And resolve loads of classes - what does that do? The reason is - using arrays to track things was a cause to a bug I fixed a while ago in the container back in 5.4 here: #18812 I'm not saying your approach wont work - it probably does from the quick glance I did. But you gotta be very careful with arrays and the container and memory usage. |
@laurencei Thanks for your comment. The Simplified demo: https://3v4l.org/cEoe4 |
This loop at every step of resolution is a little concerning. Could be a performance problem. |
I'll assess the performance impact. |
Closing pending inactivity on performance reports. |
Fixes #23699 by tracking abstracts that are currently being resolved.
If an object is built that is an
instanceof
of an object that is already on the stack, firing the resolving() callbacks is inhibited.These callbacks are fired eventually when the
instanceof
object is resolved.