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.3] Arr::sort(): limited use of underlying Collection fixed #15050

Merged
merged 1 commit into from
Aug 26, 2016
Merged

Conversation

Syra
Copy link
Contributor

@Syra Syra commented Aug 25, 2016

Hello,

I'm noticed that Arr::sort() that based on Collection::sortBy limiting use of $callback. In Collection it can be as closure as string in dot notation via following mechanics

protected function valueRetriever($value)
{
    if ($this->useAsCallable($value)) {
        return $value;
    }

    return function ($item) use ($value) {
        return data_get($item, $value);
    };
}

Checkout please.

Thanks,
Alex

@GrahamCampbell GrahamCampbell changed the title Arr::sort(): limited use of underlying Collection fixed [5.3] Arr::sort(): limited use of underlying Collection fixed Aug 25, 2016
@taylorotwell taylorotwell merged commit 3dc4155 into laravel:5.3 Aug 26, 2016
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.

None yet

2 participants