-
Notifications
You must be signed in to change notification settings - Fork 103
Feature request: Checking type hint of fields against Doctrine metadata #31
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
Comments
We have exactly this in our company, I might be able to release it publicly. |
It'd be cool to have it a part of phpstan-doctrine as rules.neon. |
Problem with this is it would most likely require to have doctrine in composer.json as a |
This should now be possible in a nice way thanks to #49. |
Basic version for |
Awesome ! Thanks @lookyman |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
phpstan-doctrine could check if a field's typehint matches Doctrine's metadata.
In the following example, the plugin could emit a warning telling that
int
does not matchstring
:In the following examples, the plugin could emit a warning telling that the field is nullable:
The text was updated successfully, but these errors were encountered: