-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
The class ClassMetada is not correctly inferring the constructor of ClassMetadaInfo #8709
Comments
I saw you did a lot of static analysis on this repository @greg0ire, maybe you can tell me (or ping the right person) to decide if I should do a PR here or in phpstan repository ? :) |
🤔 isn't that going to be fixed by #8708 ? |
Sorry, my first post wasn't clear because I played with my vendor. Currently
After #8708
|
I see. I think it should be fixed here, with the repetition you suggested. In order for that constructor not to get removed, please also add something similar to what Marco did in doctrine/dbal#4638 It was already suggested here BTW: #8633 (comment) |
Solved in #8734 |
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 phpstan/phpstan#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)
The text was updated successfully, but these errors were encountered: