-
Notifications
You must be signed in to change notification settings - Fork 232
Add some code to stop scopes from being applied twice. #358
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
Add some code to stop scopes from being applied twice. #358
Conversation
...est for this as well.
@saernz Thanks so much for this, this is awesome! I will take a look first thing in the morning.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@saernz Quick question: where is $this->scopesAreApplied defined or updated when scopes are applied? I couldn't find it when doing a global search.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, nevermind, I found it in Caching.php ... sorry, overlooked that earlier.
@mikebronner Thanks for the merge man! That's weird there was that compatibility issue that the tests didn't pick up, thanks for fixing it all up.
I think it was because the tests weren't triggering the case where the scopes weren't applied yet. Will experiment with that a bit and see if we can't get a test to do that.
This should fix #289 by overriding the builders implementation of
applyScopes()to make it check if scopes have been applied already before attempting to apply them again.