-
Notifications
You must be signed in to change notification settings - Fork 102
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
Repository extending ServiceEntityRepository
not using generic
#651
Comments
phpstan-doctrine is not aware of |
Yes, maybe I was not clear, I'm only extending the proxy class, because the other one did not work. If you run the analysis on the repo I shared you see this output
|
Running
from Not sure why you're using two composer.json files. PHPStan works best when you include it in the project you're analysing. The reason why running it from inside |
We use a monorepo for different applications and don´t want to install phpstan with all the plugins in each one, so the phpstan is installed as a separate tool, also to avoid dependency conflicts. Thanks for the suggestion, I will try that. |
You cannot have dependency conflicts with PHPStan: https://github.com/phpstan/phpstan/blob/fdd5ad98e8a8a5a061f791e82fac5b16f0a51a1e/composer.json#L6-L8 |
Technically, you can. As PHPStan is often used with other extension libs. |
Yes that worked! Thank you. My wrong assumption was that phpstan was changing the working directory based on the config file location, like phpunit does for instance. I even used the I will close that one, but let me know if this deserves to be pointed at some documentation. |
Exactly, we use it with other extensions, and is just how generally we use development tools |
When running PHPStan from another vendor than the one the doctrine package is installed it doesn't seem to work as expected.
I have created a reproducible repo in https://github.com/andersonamuller/phpstan-doctrine-repro
It does NOT work for the documented case:
But it does work in this other case that we shouldn't extend from:
The text was updated successfully, but these errors were encountered: