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

[10.x] Make the updateOrCreate methods in relations use firstOrCreate behind the scenes #48213

Merged
merged 4 commits into from
Aug 29, 2023

Conversation

mpyw
Copy link
Contributor

@mpyw mpyw commented Aug 28, 2023

Related to:

Add consistent fix for updateOrCreate based on #48160, since there was a consistent fix for firstOrCreate in #48192.

@mpyw mpyw changed the title Make the updateOrCreate methods in relations use firstOrCreate [10.x] Make the updateOrCreate methods in relations use firstOrCreate Aug 28, 2023
@mpyw mpyw changed the title [10.x] Make the updateOrCreate methods in relations use firstOrCreate [10.x] Make the updateOrCreate methods in relations use firstOrCreate behind the scenes Aug 28, 2023
@mpyw mpyw force-pushed the use-first-or-create-in-relations branch from 4cc6211 to 892c9ba Compare August 28, 2023 02:30
@mpyw mpyw marked this pull request as ready for review August 28, 2023 02:38
@mpyw mpyw marked this pull request as draft August 28, 2023 02:38
@mpyw mpyw force-pushed the use-first-or-create-in-relations branch 2 times, most recently from a6226a6 to 73265b4 Compare August 28, 2023 03:48
@mpyw mpyw force-pushed the use-first-or-create-in-relations branch from 73265b4 to 5e1d32f Compare August 28, 2023 03:56
@mpyw mpyw marked this pull request as ready for review August 28, 2023 04:05
@mpyw mpyw force-pushed the use-first-or-create-in-relations branch from a8394fc to 0c6ebdb Compare August 29, 2023 04:08
@mpyw mpyw requested a review from taylorotwell August 29, 2023 04:08
@taylorotwell taylorotwell merged commit e1ae507 into laravel:10.x Aug 29, 2023
@mpyw mpyw deleted the use-first-or-create-in-relations branch August 29, 2023 14:05
tonysm added a commit to tonysm/framework that referenced this pull request Sep 25, 2023
…rstOrCreate` behind the scenes (laravel#48213)"

This reverts commit e1ae507.
taylorotwell pushed a commit that referenced this pull request Sep 25, 2023
…#48531)

* Avoid using createOrFirst inside other *OrCreate methods

* Revert "[10.x] Make the `updateOrCreate` methods in relations use `firstOrCreate` behind the scenes (#48213)"

This reverts commit e1ae507.

* Revert "Enhancing `updateOrCreate()` to Use `firstOrCreate()` (#48160)"

This reverts commit 80e0262.

* Fix mocked firstOrCreate tests
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