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

[9.x] Apply limit on DatabaseEngine before applying additional constraints #621

Merged
merged 1 commit into from
May 5, 2022

Conversation

crynobone
Copy link
Member

The previous PR broke Laravel Nova implementation on Global Search where we use the following:

App\Models\User::search('Laravel')->tap(fn ($query) => $query->limit(5))->get();

Before

Callback using tap() take priority over default.

After

limit() take priority over tap() and I would consider this a breaking change.

The previous PR broke Laravel Nova implementation on Global Search where we use the following:

```php
App\Models\User::search('Laravel')->tap(fn ($query) => $query->limit(5))->get();
``` 

### Before

Callback using `tap()` take priority over default.

#### After

`limit()` take priority over `tap()` and I would consider this a breaking change.
@taylorotwell taylorotwell merged commit 7b97c85 into laravel:9.x May 5, 2022
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