-
Notifications
You must be signed in to change notification settings - Fork 183
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
Generic PHPDoc support #165
Comments
Is that only for arrays, or are there other types that need to be handled differently? |
Not sure about Psalm docs, but PHPStan implements generics which are mostly equivalent to Psalm's: https://phpstan.org/blog/generics-in-php-using-phpdocs |
Yes, that is correct. I was looking at PHPStan's implementation, but mostly just for array annotation. |
When looking at https://phpstan.org/blog/generics-in-php-using-phpdocs#these-rules-are-useful%2C-but-sometimes-limiting it gets complicated:
This means that JsonMapper would need to fetch and combine information from different classes in complicated ways. Patches welcome, but I guess they complicate the code a lot, for little gain in my eyes. So I'll probably reject them. |
Would it be possible to support Generic PHPDocs?
For example:
would be:
The text was updated successfully, but these errors were encountered: