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

Eloquent Collection with templated keys #272

Merged
merged 30 commits into from
Jan 23, 2023

Conversation

alies-dev
Copy link
Collaborator

@alies-dev alies-dev commented Jan 18, 2023

Use Larastan compatible syntax for Eloquent Collections:
instead of a single param syntax:

/** @return \Illuminate\Database\Eloquent\Collection<\App\Models\User> */

use two params syntax:

/** @return \Illuminate\Database\Eloquent\Collection<int, \App\Models\User> */

This will finally allow to use Psalm and Larastan at the same project without a lot of noise

alies-dev and others added 7 commits January 6, 2023 01:50
# Conflicts:
#	stubs/BelongsToMany.stubphp
#	stubs/Collection.stubphp
#	stubs/EloquentBuilder.stubphp
#	stubs/EloquentCollection.stubphp
#	stubs/FactoryBuilder.stubphp
#	stubs/HasManyThrough.stubphp
#	stubs/Relation.stubphp
@alies-dev alies-dev self-assigned this Jan 18, 2023
@alies-dev alies-dev added the release:major for PRs only (used by release-drafter) label Jan 19, 2023
@alies-dev alies-dev marked this pull request as ready for review January 20, 2023 22:10
@alies-dev
Copy link
Collaborator Author

Hey @mr-feek

This is the first PR for 3.x branch. I propose you to tag few alpha/beta/RC before the final release, but firstly let's support Laravel 10 on this branch, it will be my test task for the 3.x. One of ideas - use new Laravel's bin to generate Facade helpers - https://laravel-news.com/automatic-docblock-generation-on-facades. Stay tuned! :)

@alies-dev alies-dev added the release:feature for PRs only (used by release-drafter) label Jan 20, 2023
@alies-dev alies-dev changed the title [3.x] Collection with templated keys [3.x] Eloquent Collection with templated keys Jan 20, 2023
@alies-dev alies-dev merged commit 7b33477 into psalm:master Jan 23, 2023
@alies-dev alies-dev deleted the collection-with-templated-keys branch January 23, 2023 22:08
@alies-dev alies-dev changed the title [3.x] Eloquent Collection with templated keys Eloquent Collection with templated keys Jan 23, 2023
@alies-dev alies-dev added release:minor for PRs only (used by release-drafter) and removed release:major for PRs only (used by release-drafter) labels Jan 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release:feature for PRs only (used by release-drafter) release:minor for PRs only (used by release-drafter)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants