Skip to content

Add support for withoutGlobalScopes #424

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

Merged

Conversation

gitwilliam
Copy link
Contributor

The intention of this PR is to add in support for the withoutGlobalScope and withoutGlobalScopes function in Eloquent (https://laravel.com/docs/8.x/eloquent#removing-global-scopes).

When an application using the Caching Library applies the withoutGlobalScopes() modifier to a model, the global scopes are currently being added back in by the Caching Library. This requires the client application to disable the cache, disableCache(), prior to calling withoutGlobalScopes. This PR should fix that.

@gitwilliam gitwilliam marked this pull request as ready for review March 3, 2022 16:30
@mikebronner
Copy link
Owner

@gitwilliam Thank you so much for all the work you put into this! I will review and merge by the end of this weekend and release a new version if everything is working. :)

@mikebronner mikebronner self-requested a review March 3, 2022 16:35
@mikebronner mikebronner self-assigned this Mar 3, 2022
@gitwilliam
Copy link
Contributor Author

gitwilliam commented Mar 3, 2022

@gitwilliam Thank you so much for all the work you put into this! I will review and merge by the end of this weekend and release a new version if everything is working. :)

Thanks for looking at it @mikebronner. I fully admit that there are still a lot of things about the library that I don't understand. So feel free to send me off to correct anything you think is not in keeping with design or intention.

@mikebronner mikebronner merged commit 7c4b047 into mikebronner:master Mar 8, 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