mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
Question: type-safe proxies #6686
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @signor-pedro on GitHub (Apr 8, 2021).
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
getId()method.Obviously, my psalm now cries
Is there some adviced way to make Proxies type-safe? Thank you
@beberlei commented on GitHub (Apr 8, 2021):
Why do you typehint for proxy? You should not need this.
Correct typehint is EntityInterface|(EntityInterface&Proxy)
@signor-pedro commented on GitHub (Apr 8, 2021):
Thank you very much- I did not know of the intersection types.