-
Notifications
You must be signed in to change notification settings - Fork 11.3k
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
After LazyCollection calls the unique method and then calls the isEmpty method, a piece of data will be lost. #38817
Comments
@JosephSilber I guess this works as expected but wanted to confirm with you. |
It does not. It's broken. You can see the problem more easily with this piece of code: $items = LazyCollection::make(function () {
yield 1;
yield 2;
yield 3;
});
$items
->unique()
->tap(fn ($collection) => $collection->take(2)->eager())
->dd(); // [3] That call to That's not expected. Separate enumerations should never affect each other. I'll work on a fix. |
Thanks @JosephSilber |
mysql 5.7.34-log
Description:
After LazyCollection calls the unique method and then calls the isEmpty method, a piece of data will be lost.
Steps To Reproduce:
The text was updated successfully, but these errors were encountered: