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

Strict comparison for returning scope results on query builder. #18842

Closed
wants to merge 1 commit into from
Closed

Strict comparison for returning scope results on query builder. #18842

wants to merge 1 commit into from

Conversation

adrianspacely
Copy link
Contributor

The way the callScope() function is implemented is to return the query builder on null, 0, or false (loose comparison) for the result.

This change will have the callScope() method on the query builder only return $this if the $result is null only.

In my application, I created a query scope that performs the query, evaluates the results and returns a boolean. I was expecting false when a query builder was returned.

@taylorotwell
Copy link
Member

This will need to be sent to 5.5 (master branch) since it's a breaking change.

@adrianspacely
Copy link
Contributor Author

adrianspacely commented Apr 18, 2017

Sure thing, what is the minimum required PHP version for Laravel 5.5?

EDIT: All good, found it

@adrianspacely adrianspacely deleted the patch/strict-comparison-on-scope-return branch April 18, 2017 12:26
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