mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
create generic EntityInterface #7006
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 @arderyp on GitHub (Jul 16, 2022).
Feature Request
Summary
For those of us who use PHPStan/Psalm, which are increasing in popularity, there should be an EntityInterface. It could be blank, or maybe have a single
getId()method. This would resolved a lot of themixedtyping with Doctrine. I have done this myself, and all of my entities implement it, and I've created a stub to get around some of themixedmess, for example: