8000 [9.x] Improves auto-completion on `Model::factory()` by nunomaduro · Pull Request #39171 · laravel/framework · GitHub
[go: up one dir, main page]

Skip to content

[9.x] Improves auto-completion on Model::factory() #39171

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

Merged
merged 1 commit into from
Oct 13, 2021

Conversation

nunomaduro
Copy link
Member

This pull request makes the HasFactories leverage the work on #39169.

Because PHPStorm does not support generic traits, Team::factory() returns an instance of Factory<Team> but not TeamFactory, allowing to get some level of native auto-completion like this:
Screenshot 2021-10-12 at 14 39 22

@taylorotwell taylorotwell merged commit 161098d into master Oct 13, 2021
@taylorotwell taylorotwell deleted the feat/generic-has-factories branch October 13, 2021 13:36
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
0