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

Fix wrong stack processing order #7

Conversation

dionysiosarvanitis
Copy link

Calling first on a collection triggers Arr::first which changes the
order of key,value when executing the callback.

See Illuminate\Support\Arr : L147

Calling `first` on a collection triggers `Arr::first` which changes the
order of key,value when executing the callback.

See Illuminate\Support\Arr : L147
@BenConstable
Copy link
Owner

Great spot on this, thanks very much.

The order of parameters to Arr::first() was changed in Laravel 5.3 (see "Arrays" section here) As I want this package to support 5.1 and up, I've removed the use of the callback to first() in favour of filter(), as this supports all versions of Laravel from 5.1 and up.

You can see the change in e695f5f.

@BenConstable
Copy link
Owner

Also, I've updated the TravisCI config to test individually against each "major" Laravel version, so these kind of problems should be picked up by the tests now.

@dionysiosarvanitis
Copy link
Author

I imagined that something like that would have happen. Thanks for taking care of this.

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