mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
The class ClassMetada is not correctly inferring the constructor of ClassMetadaInfo #6729
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 @VincentLanglet on GitHub (May 23, 2021).
Hi
Currently
new ClassMetadataInfo(\DateTime::class)is inferred asClassMetadataInfo<\DateTime>by both psalm and phpstannew ClassMetadata(\DateTime::class)is inferred asClassMetadata<\DateTime>by psalm but asClassMetadata<object>by phpstanThis is related to this phpstan issue https://github.com/phpstan/phpstan/issues/5057
I don't know how and when the issue will be fixed so one way to fix it temporary would be to repeat the constructor:
Since you're using phpstan in this project, you might end with this issue while bumping the phpstan level.
Do you prefer I create a PR here or in https://github.com/phpstan/phpstan-doctrine ?
(The second solution won't fix the issue here since you're not using the library here)