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

[10.x] Convert eloquent builder to base builder in whereExists #46460

Conversation

gdebrauwer
Copy link
Contributor

@gdebrauwer gdebrauwer commented Mar 14, 2023

The whereExists method accepts an Eloquent builder (see docblock on whereExists-methods) but the addWhereExistsQuery method used by whereExists only accepts a base builder. To fix that I added code that converts Eloquent builder to base builder before calling the addWhereExistsQuery method.

(The other solution would be changing the parameter type on the addWhereExistsQuery method, but I thought converting the type in the whereExists method would probably be the preferred way of handling this)

@taylorotwell taylorotwell merged commit 4126b40 into laravel:10.x Mar 14, 2023
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