Skip to content

Do not report generic covariant issue without strict check#5437

Open
VincentLanglet wants to merge 2 commits intophpstan:2.1.xfrom
VincentLanglet:genericStrictCheck
Open

Do not report generic covariant issue without strict check#5437
VincentLanglet wants to merge 2 commits intophpstan:2.1.xfrom
VincentLanglet:genericStrictCheck

Conversation

@VincentLanglet
Copy link
Copy Markdown
Contributor

No description provided.

@VincentLanglet VincentLanglet marked this pull request as ready for review April 9, 2026 21:47
@phpstan-bot
Copy link
Copy Markdown
Collaborator

This pull request has been marked as ready for review.

{
$this->checkTypeAgainstPhpDocType = true;
$this->strictWideningCheck = false;
$this->analyse([__DIR__ . '/data/generic-subtype.php'], []);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

It'd be nice to come up with an example that would still be reported even here. Like Foo<int> vs. Foo<string>.

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.

3 participants