-
Notifications
You must be signed in to change notification settings - Fork 105
Doctrine entity: is never written, only read. #229
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
same issue, i would have thought that this extension would fix the issue explained here https://phpstan.org/blog/detecting-unused-private-properties-methods-constants#what-if-my-code-is-%E2%80%9Cspecial%E2%80%9D%3F am i mistaken ? |
Currently I suppress this error message with the following setting in the
But this is of course not a long-term solution. |
It works when adding a ObjectManager like described here: https://github.com/phpstan/phpstan-doctrine#configuration I am not sure if this issue is solved with this or we should keep it open because it should work even without a ObjectManager. |
PHPStan needs the ObjectManager so that Doctrine tells it what's a persisted field and what isn't. Regardless of whether you're using PHPDocs, PHP 8 attributes or for example XML annotation driver. |
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. |
I receive phpstan message
for doctrine entity, which should probaly not happen.
As discussed in: https://stackoverflow.com/questions/69851516/phpstan-and-doctrine-id-is-never-written-only-read?noredirect=1#comment123480939_69851516
I made a test-repo: https://github.com/ivoba/phpstan-test
that reproduces this issue.
Maybe its just a misconfiguration. Thank you.
The text was updated successfully, but these errors were encountered: