Commit 4b4b1e4
[10.x] Revival of the reverted changes in 10.25.0:
* Revert "[10.x] Revert from using `createOrFirst` in other `*OrCreate` methods (#48531)"
This reverts commit 408a3e3.
* test: 💍 Add `Builder::createOrFirst()` snapshot tests
* test: 💍 Add `Builder::firstOrCreate()` snapshot tests
* test: 💍 Add `Builder::updateOrCreate()` snapshot tests
* test: 💍 Add test stubs for `DatabaseEloquentHasManyTest`
* test: 💍 Add `HasMany::createOrFirst()` snapshot tests
* test: 💍 Add `HasMany::firstOrCreate()` snapshot tests
* test: 💍 Add `HasMany::updateOrCreate()` snapshot tests
* test: 💍 prepare HasManyThrough test
* test: 💍 Add HasManyThrough::CreateOrFirst() snapshot tests
* test: 💍 Add HasManyThrough::firstOrCreate() snapshot test
* test: 💍 Add HasManyThrough::updateOrCreate() snapshot test
* refactor: 💡 use createOrFirst in firstOrCreate
* test: 💍 fix test
* style: 💄 Apply StyleCI fixes
* docs: ✏️ Add missing FIXME comments
* refactor: 💡 Omit verbose arguments
* test: 💍 Rename `DatabaseEloquentHasManyThroughTest` with fixes
* test: 💍 Add `BelongsToMany::createOrFirst/firstOrCreate` tests
* test: 💍 Extract `DatabaseEloquentHasManyTest` cases with fixes
* test: 💍 Extract `DatabaseEloquentBuilderTest` cases with fixes
* test: 💍 refactoring
* test: 💍 Add `BelongsToMany::updateOrCreate` snapshot tests
---------
Co-authored-by: fuwasegu <[email protected]>firstOrCreate updateOrCreate improvement through createOrFirst + additional query tests (#48637)1 parent 56beb0e commit 4b4b1e4
File tree
10 files changed
+1670
-33
lines changed- src/Illuminate/Database/Eloquent
- Relations
- tests/Database
10 files changed
+1670
-33
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
567 | 567 | | |
568 | 568 | | |
569 | 569 | | |
570 | | - | |
| 570 | + | |
571 | 571 | | |
572 | 572 | | |
573 | 573 | | |
| |||
595 | 595 | | |
596 | 596 | | |
597 | 597 | | |
598 | | - | |
599 | | - | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
600 | 602 | | |
601 | 603 | | |
602 | 604 | | |
| |||
Lines changed: 7 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
622 | 622 | | |
623 | 623 | | |
624 | 624 | | |
625 | | - | |
| 625 | + | |
626 | 626 | | |
627 | 627 | | |
628 | 628 | | |
| |||
672 | 672 | | |
673 | 673 | | |
674 | 674 | | |
675 | | - | |
676 | | - | |
677 | | - | |
678 | | - | |
679 | | - | |
680 | | - | |
681 | | - | |
682 | | - | |
683 | | - | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
684 | 678 | | |
685 | | - | |
686 | | - | |
687 | | - | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
688 | 682 | | |
689 | 683 | | |
690 | 684 | | |
| |||
Lines changed: 6 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
277 | 277 | | |
278 | 278 | | |
279 | 279 | | |
280 | | - | |
| 280 | + | |
281 | 281 | | |
282 | 282 | | |
283 | 283 | | |
| |||
305 | 305 | | |
306 | 306 | | |
307 | 307 | | |
308 | | - | |
309 | | - | |
310 | | - | |
311 | | - | |
312 | | - | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
313 | 313 | | |
314 | 314 | | |
315 | 315 | | |
| |||
Lines changed: 5 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
236 | 236 | | |
237 | 237 | | |
238 | 238 | | |
239 | | - | |
| 239 | + | |
240 | 240 | | |
241 | 241 | | |
242 | 242 | | |
| |||
267 | 267 | | |
268 | 268 | | |
269 | 269 | | |
270 | | - | |
271 | | - | |
272 | | - | |
273 | | - | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
274 | 274 | | |
275 | 275 | | |
276 | 276 | | |
| |||
0 commit comments