Skip to content

Failing test case for covariant templates - #193

Open
gsteel wants to merge 1 commit into
patchlevel:1.24.xfrom
gsteel:template-types
Open

Failing test case for covariant templates#193
gsteel wants to merge 1 commit into
patchlevel:1.24.xfrom
gsteel:template-types

Conversation

@gsteel

Copy link
Copy Markdown
Contributor

It is currently not possible to serialize types that are documented with @template-covariant

@gsteel

Copy link
Copy Markdown
ContributorAuthor

FYI: symfony/symfony#64130 but contributing to Symfony looks like hard work

@DavidBadura

Copy link
Copy Markdown
Member

Hey, thanks a lot for pushing this forward in Symfony as well! :)

@gsteel

Copy link
Copy Markdown
ContributorAuthor

It's worth mentioning that you can still annotate your stuff with

/** * @template-covariant T of MyType */class Some {
/** * @param MyType $things * @psalm-param T $things */publicfunction__construct(public$things) {}
}

Sign up for freeto 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.

2 participants

@gsteel@DavidBadura