Skip to content

[13.x] Use generic TModel in additional places in Factory class#59780

Merged
taylorotwell merged 1 commit intolaravel:13.xfrom
jnoordsij:patch-1
Apr 20, 2026
Merged

[13.x] Use generic TModel in additional places in Factory class#59780
taylorotwell merged 1 commit intolaravel:13.xfrom
jnoordsij:patch-1

Conversation

@jnoordsij
Copy link
Copy Markdown
Contributor

In some of my own overrides I was recently faced with static errors like Parameter #1 $results of method Illuminate\Database\Eloquent\Factories\Factory<TModel of Illuminate\Database\Eloquent\Model>::store() expects Illuminate\Support\Collection<int, Illuminate\Database\Eloquent\Model>, Illuminate\Support\Collection<int, TModel of Illuminate\Database\Eloquent\Model> given.. Given the TModel typehint is correct for these places AFAICS, I suggest adding them there.

@taylorotwell taylorotwell merged commit 812551f into laravel:13.x Apr 20, 2026
54 checks passed
@jnoordsij jnoordsij deleted the patch-1 branch April 20, 2026 13:33
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