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

[RFC] Add PHPDoc generics to Collection #1159

Closed
wants to merge 1 commit into from

Conversation

franmomu
Copy link
Contributor

Hi, this is just to see if it's fine, then I'll continue. Nowadays many tools support this generic @template annotation, this would improve the developer experience allowing to specify which types a Collection holds.

I've only used in InvoiceService to see how would look like.

@CLAassistant
Copy link

CLAassistant commented Jul 13, 2021

CLA assistant check
All committers have signed the CLA.

@franmomu franmomu marked this pull request as draft July 13, 2021 07:26
@remi-stripe
Copy link
Contributor

@franmomu Thanks for the example, this is not something I had seen before. I'll assign to @richardm-stripe to look into the change and see if it's something we'd want to add. Since the library is automatically generated from code on our end, we'd be able to tweak this for the whole library if we end up aligning!

@richardm-stripe
Copy link
Contributor

@franmomu - I think this is a great idea.

When you say

Nowadays many tools support this generic

I am curious which tools you are referring to? I am aware of PHPStan and Psalm but I wonder if others should be on our radar.

@franmomu
Copy link
Contributor Author

I am curious which tools you are referring to? I am aware of PHPStan and Psalm but I wonder if others should be on our radar.

I was thinking about those two, Phan and the new phpstorm coming version.

So, based on:

Since the library is automatically generated from code on our end, we'd be able to tweak this for the whole library if we end up aligning!

is this something you should do? or can I help with something

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants