Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Merged
mikebronner merged 1 commit into mikebronner:master from saernz:fix/scopes_applied_twice
Jul 2, 2020

Conversation

@saernz
Copy link
Contributor

@saernz saernz commented Jul 2, 2020

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.

mikebronner and mycarrysun reacted with heart emoji
Copy link
Owner

@saernz Thanks so much for this, this is awesome! I will take a look first thing in the morning.

saernz reacted with thumbs up emoji

@mikebronner mikebronner merged commit 4389592 into mikebronner:master Jul 2, 2020
*/
public function applyScopes()
{
if ($this->scopesAreApplied) {
Copy link
Owner

@mikebronner mikebronner Jul 2, 2020
edited
Loading

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.

Copy link
Owner

@mikebronner mikebronner Jul 2, 2020

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.

saernz reacted with thumbs up emoji
Copy link
Contributor Author

saernz commented Jul 2, 2020

@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.

mikebronner reacted with thumbs up emoji

Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@mikebronner mikebronner mikebronner left review comments

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Scopes being applied twice

AltStyle によって変換されたページ (->オリジナル) /