Fix Parameter Grouping with Laravel 7.x#27
Open
EK1771 wants to merge 1 commit intojarektkaczyk:masterfrom
Open
Fix Parameter Grouping with Laravel 7.x#27EK1771 wants to merge 1 commit intojarektkaczyk:masterfrom
EK1771 wants to merge 1 commit intojarektkaczyk:masterfrom
Conversation
|
Is it possible to merge this request? It would solve a problem with advanced where statements when using Laravel 7.x and your eloquence package. I've tried this fix and it works. |
|
Hi! This is an important fix, can you merge it, please? |
|
I also really need this fix. My entire application is broken after upgrading to L7. Could this please be merged? |
|
I too hope this can be merged ASAP. An application I'm having to support needs this to work in L7. |
|
@jarektkaczyk plz help! |
|
Any update on this? |
jitendrajp
added a commit
to jitendrajp/hookable
that referenced
this pull request
Jun 3, 2022
Remo
added a commit
to ortic/hookable
that referenced
this pull request
Jun 3, 2022
jarektkaczyk#27 Fix Parameter Grouping with Laravel 7.x
maqduni
approved these changes
Apr 3, 2023
vmartins
approved these changes
Dec 6, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Laravel 7.x introduced the following change laravel/framework#30934 allowing for the feature https://laravel.com/docs/7.x/queries#subquery-where-clauses
This currently breaks parameter grouping when using eloquence due to the where() function passing
=as the default operator even if a closure is passed.This MR aims to fix the issue by detecting if a closure is passed and if so, not applying the default
=operator.To replicate the bug using sample Code on a fresh Laravel 7 install with sofa/eloquence-base:
app/User.php
routes/web.php
Results in the error