Closed Ocramius closed 1 year ago
Note: I noticed the problem while working on laminas-session
, which (ab-)uses a lot of the ArrayObject
stuff that keeps haunting us everywhere.
Is it not possible to do @psalm-self-out static<...>
to get around this issue?
The &static
approach is something I had already tried, but caused even more issues.
I will keep using psalm-self-out
outside the context of inheritance, in builders and similar abstractions, but it is not a.good fit here 😁
Before this change, in following example,
@psalm-self-out
would delete inheritance type information at runtime. For example:This change corrects that, preserving
static
in the type information.