-
Notifications
You must be signed in to change notification settings - Fork 107
Check that doctrine entities are not final #143
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I'm fine with this. Please add it as a bleeding edge rule similar to here: https://github.com/phpstan/phpstan-strict-rules/blob/334898a32217e4605e0f9cfa3d3fc3101bda26be/rules.neon#L67-L69
2b17ca7
to
7cc794d
Compare
@ondrejmirtes Updated according to your suggestions. Also added a test case. |
Hmm... there is already a similar pull request: #84 Except I slightly disagree with the statement that entities shouldn't have final methods. I have a case where I'm actually using final method on purpose. But then again I could just disable that particular rule in my codebase. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm fine with the rule in this PR as it is.
d52b474
to
30f2b9e
Compare
Done. :-) |
30f2b9e
to
89c2186
Compare
89c2186
to
cd8bcc9
Compare
Should be okay now. |
Thank you! |
Tagged as 0.12.20. |
@enumag thanks! 👍 |
I create all my classes as final by default. This however can cause issues with Doctrine:
What do you think about a rule to avoid final entities?