Question: type-safe proxies #8610
-
|
Hi, I am using psalm heavily and have reached a situation where I can have All my entities implement the EntityInterface, because I enforce that every entity has a Obviously, my psalm now cries Is there some adviced way to make Proxies type-safe? Thank you |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
|
Why do you typehint for proxy? You should not need this. Correct typehint is EntityInterface|(EntityInterface&Proxy) |
Beta Was this translation helpful? Give feedback.
-
|
Thank you very much- I did not know of the intersection types. |
Beta Was this translation helpful? Give feedback.
Why do you typehint for proxy? You should not need this.
Correct typehint is EntityInterface|(EntityInterface&Proxy)