Skip to content
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

[7.x] Fix the dump method for LazyCollection #33944

merged 1 commit into from Aug 20, 2020


Copy link

@JosephSilber JosephSilber commented Aug 20, 2020

The dump method is currently broken when called on a lazy collection.

This PR fixes it, with tests.

I made a small change: calling dump on a regular Collection will no longer dump the actual collection instance - only its values.

The reason I did this is because for lazy collections, it makes no sense to dump the collection instance, since it won't show you any of its values (they haven't been generated yet). For consistency, the regular collection class now also only dumps its values, which is probably anyhow what you're after.

@taylorotwell taylorotwell merged commit 455b343 into laravel:7.x Aug 20, 2020
10 checks passed
@JosephSilber JosephSilber deleted the fix-lazy-dump branch Aug 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

Successfully merging this pull request may close these issues.

None yet

2 participants