Looks like there is an issue with phpstan type definition, specifically &Proxy<T> part breaking extension chain resolving to Factory<T>.
I don't understand why T&Proxy<T> is a not a subtype of object.
Is this a problem in PhpStan itself?
Minimal reproducer https://phpstan.org/r/eece4718-641c-4e5b-bac9-e4f1430f8fda
Just as a test - removing &Proxy<T> part from PersistentProxyObjectFactory makes PhpStan happy.
https://phpstan.org/r/dc467615-ce04-4f6c-8370-b6be346ec8c0
Looks like there is an issue with phpstan type definition, specifically
&Proxy<T>part breaking extension chain resolving toFactory<T>.I don't understand why
T&Proxy<T>is a not a subtype ofobject.Is this a problem in PhpStan itself?
Minimal reproducer https://phpstan.org/r/eece4718-641c-4e5b-bac9-e4f1430f8fda
Just as a test - removing
&Proxy<T>part from PersistentProxyObjectFactory makes PhpStan happy.https://phpstan.org/r/dc467615-ce04-4f6c-8370-b6be346ec8c0