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

Use strict tryLoadOne in ContainsOne #848

Merged
merged 3 commits into from
Apr 12, 2021
Merged

Use strict tryLoadOne in ContainsOne #848

merged 3 commits into from
Apr 12, 2021

Conversation

mvorisek
Copy link
Member

@mvorisek mvorisek commented Apr 10, 2021

to enforce stronger checks from #846

regex to find possible places to fix: (try)?loadAny

@mvorisek mvorisek marked this pull request as ready for review April 10, 2021 11:10
@mvorisek mvorisek added the RTM label Apr 10, 2021
@@ -100,8 +100,7 @@ public function ref(array $defaults = []): Model
});
}

// try to load any (actually only one possible) record
$theirModel->tryLoadAny();
$theirModel->tryLoadOne();
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the main change

Copy link
Member

@DarkSide666 DarkSide666 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@DarkSide666 DarkSide666 merged commit 2b6dc2d into develop Apr 12, 2021
@DarkSide666 DarkSide666 deleted the use_loadOne branch April 12, 2021 12:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants