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

feat: add generics for Collection #439

Merged
merged 1 commit into from
Feb 4, 2020
Merged

feat: add generics for Collection #439

merged 1 commit into from
Feb 4, 2020

Conversation

canvural
Copy link
Collaborator

@canvural canvural commented Feb 2, 2020

This PR adds stubs for the Laravel Collection.This will allow us to infer types in the collections for example returned by relationship. Like, $user->accounts->first() would return Account

Combined with the #435 this can be really good.

This should be merged after #435, and I want to do more testing.

@nunomaduro
Copy link
Collaborator

@canvural Do we need something on the core of Laravel 7 for this?

@canvural
Copy link
Collaborator Author

canvural commented Feb 3, 2020

@nunomaduro No, we don't.

@canvural canvural marked this pull request as ready for review February 3, 2020 23:59
@canvural canvural merged commit cc4c505 into larastan:master Feb 4, 2020
@canvural canvural deleted the collection-generics branch February 4, 2020 10:54
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