Skip to content

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

Merged
taylorotwell merged 1 commit intolaravel:7.xfrom
JosephSilber:fix-lazy-dump
Aug 20, 2020
Merged

[7.x] Fix the dump method for LazyCollection#33944
taylorotwell merged 1 commit intolaravel:7.xfrom
JosephSilber:fix-lazy-dump

Conversation

@JosephSilber
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants