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

[5.7] Update collection every() method documentation #4894

Merged
merged 2 commits into from Jan 9, 2019
Merged

[5.7] Update collection every() method documentation #4894

merged 2 commits into from Jan 9, 2019

Conversation

rbarden
Copy link
Contributor

@rbarden rbarden commented Jan 9, 2019

The every() method returns true for empty collections which is not documented but should be, since it goes against what the description would lead most developers to believe. After discussion with a few developers, we decided at least a documentation change should be put in, since changing the behavior may break many apps who rely on this in the wild.

Adds note to every() method about empty collections.
@driesvints driesvints changed the title Update collection every() method documentation [5.7] Update collection every() method documentation Jan 9, 2019
@rbarden
Copy link
Contributor Author

rbarden commented Jan 9, 2019

I'd just like to add that I did some digging and found when this method was introduced which leads to javascript documentation with this behavior and a link to Wikipedia, so I understand why the method works the way it does now.

@taylorotwell taylorotwell merged commit a41d796 into laravel:5.7 Jan 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants