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

Support @template-contravariant tags #140

Merged
merged 1 commit into from Jun 26, 2022

Conversation

autaut03
Copy link
Contributor

@autaut03 autaut03 commented Jun 26, 2022

This allows implementing phpstan/phpstan#7502 on PHPStan side.

@@ -178,6 +178,9 @@ public function parseTagValue(TokenIterator $tokens, string $tag): Ast\PhpDoc\Ph
case '@template-covariant':
case '@phpstan-template-covariant':
case '@psalm-template-covariant':
case '@template-contravariant':
case '@phpstan-template-contravariant':
case '@psalm-template-contravariant':
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Psalm doesn't currently support @template-contravariant tags either, so I'm unsure whether this should be included.

Support would be welcomed, so I'd rather keep this.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, there's no harm in having @psalm-template-contravariant here :)

@ondrejmirtes ondrejmirtes merged commit 135607f into phpstan:1.6.x Jun 26, 2022
@ondrejmirtes
Copy link
Member

Thank you!

@autaut03 autaut03 deleted the template-contravariant branch June 26, 2022 21:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants