Check that doctrine entities are not final#143
Conversation
ondrejmirtes
left a comment
There was a problem hiding this comment.
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. |
ondrejmirtes
left a comment
There was a problem hiding this comment.
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?