-
-
Notifications
You must be signed in to change notification settings - Fork 932
-
Is this feature available? I'm confused by the frequent side-by-side discussion of @phpstan-consistent-templates and static<>. They are not they same... or are they? static<> is available in latest release... is @phpstan-consistent-templates?
I've been told the solution I need is @phpstan-consistent-templates for this.
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 1 comment 3 replies
-
I figured out a way how to make static<...> work without @phpstan-consistent-templates. So no, this tag is not available.
You can enjoy static<...> benefits wihout additional work.
Beta Was this translation helpful? Give feedback.
All reactions
-
Thanks @ondrejmirtes. Can you think of a way to adjust my example to avoid the errors using static<>? I'm not sure I understand how that could address the problem.
Beta Was this translation helpful? Give feedback.
All reactions
-
This could be made to work like we made static<...> work: https://phpstan.org/r/6d99b4b8-1ce1-44e0-b26d-ae9861c4c10f
Right now PHPStan does not understand TypeCommunicator<TypeConcurrent> but it's very similar concept to static<...>. Feel free to open a feature request about it :)
Beta Was this translation helpful? Give feedback.
All reactions
-
thanks @ondrejmirtes! I opened: #12646
I am not really sure how to accurately word/describe the situation here that needs to be address. If you'd like me to update the issue title or description, please just let me know. I think the example should speak for itself :)
Beta Was this translation helpful? Give feedback.