From 1929e7eaefef9ffdbe846ed9dbcdce1dd85b0391 Mon Sep 17 00:00:00 2001 From: soyuka Date: Fri, 16 Oct 2026 16:05:37 +0200 Subject: [PATCH] test(laravel): use createOne() for the for() relation create() returns Collection|Model, which PHPStan rejects as a for() argument. --- src/Laravel/Tests/NullableBelongsToTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Laravel/Tests/NullableBelongsToTest.php b/src/Laravel/Tests/NullableBelongsToTest.php index d90bea255d..5c657ec9e5 100644 --- a/src/Laravel/Tests/NullableBelongsToTest.php +++ b/src/Laravel/Tests/NullableBelongsToTest.php @@ -69,7 +69,7 @@ public function testOmittingBelongsToKeepsIt(): void public function testPatchWithExplicitNullClearsMorphTo(): void { - $slot = TimeSlotFactory::new()->create(); + $slot = TimeSlotFactory::new()->createOne(); $note = NullableMorphNoteFactory::new()->for($slot, 'noteable')->create(); $this->assertNotNull(NullableMorphNote::query()->sole()->noteable_id); // @phpstan-ignore-line