-
-
Notifications
You must be signed in to change notification settings - Fork 65
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
Define Proxy
as generic
#164
Conversation
@franmomu maybe this can be improved?
|
@@ -485,14 +489,21 @@ private function getRealClass(string $class): string | |||
private function createDefaultProxyClassNameResolver(): void | |||
{ | |||
$this->proxyClassNameResolver = new class implements ProxyClassNameResolver { | |||
/** | |||
* @template T of object | |||
* @psalm-param class-string<Proxy<T>>|class-string<T> $className |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've copied this because otherwise the /** @psalm-var class-string<T> */
won't recognise the T
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like this is not enough, the tests are still failing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apparently it should work, I'll ignore for now.
Thanks @franmomu ! |
This would allow things like doctrine/common#926