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.6] Fix a unsuspected result from the split function in the Collection class #24083

Closed
wants to merge 1 commit into from
Closed

[5.6] Fix a unsuspected result from the split function in the Collection class #24083

wants to merge 1 commit into from

Conversation

tvbeek
Copy link
Contributor

@tvbeek tvbeek commented May 2, 2018

See: #22090

This will change the result of the split function to return the requested amount of collections (except the total of items is less then the requested number)

Example
collect(['a', 'b', 'c', 'd'])->split(3);

// expected and new result
[['a', 'b'], ['c'], ['d']]

// result before this change
[['a', 'b'], ['c', 'd']]

It will change the split function and add 3 new tests to test some edge cases that are fixed with this change

@tvbeek tvbeek changed the title Fix a unsuspected result from the split function in the Collection class [5.6] Fix a unsuspected result from the split function in the Collection class May 2, 2018
@taylorotwell
Copy link
Member

Not going to change this on a point release.

@tvbeek
Copy link
Contributor Author

tvbeek commented May 2, 2018

@taylorotwell Will you accept it on the master branch?

@tvbeek tvbeek deleted the fix_issue_with_split_on_collection_with_some_numbers branch May 3, 2018 09:27
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