Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

@phpstan-consistent-templates? #12638

Unanswered
arderyp asked this question in Support
Feb 23, 2025 · 1 comments · 3 replies
Discussion options

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.

You must be logged in to vote

Replies: 1 comment 3 replies

Comment options

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.

You must be logged in to vote
3 replies
Comment options

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.

https://phpstan.org/r/813ca428-f06a-4482-9a48-33ebd4d72eb9

Comment options

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 :)

Comment options

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 :)

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

AltStyle によって変換されたページ (->オリジナル) /