-
-
Notifications
You must be signed in to change notification settings - Fork 189
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
TASK: Use yield instead of AppendIterator in getObjects #1842
Conversation
Not 100% sure about that removed |
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.
Looks good…
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.
But yes this should target at least 6.0 probably even before...
Not good really, because |
But we could just do that? Like iterate the inner generators? Seems fine to me |
Good now, but probably needs retargeting to 4.3, or at least 6.0? |
6.0 according to Travis… |
I'll move that to 6.0 |
fbf0228
to
1456d65
Compare
This fixes a regression introduced in #1842: In this change, a "yield" and a "return" call were introduced in the same method; so that the early return was not properly executed because PHP somehow thought this is a fully-suspendable function, although only one part of the "if"-statement was suspendable. Related: #1842
The method docblock stated that it returns a
Generator
, while in reality for aPackageStorage
with patterns, it would fall back to anAppendIterator
.This change instead makes use of
yield
to return theStorageObjects
in a memory-efficient manner.