Add all PHPUnit annotations to the globally ignored list#254
Add all PHPUnit annotations to the globally ignored list#254Majkl578 merged 1 commit intodoctrine:masterfrom
Conversation
SenseException
left a comment
There was a problem hiding this comment.
It's okay to me, but the PHPUnit annotations are quite a few compared to the docs. I wonder if we should put them all into the list.
|
I'm happy to add the rest, I didn't want to go overboard. Just let me know what the right approach is. |
|
The reason why most of them aren’t ignored is because most of them are only relevant in test files, where the annotation parser doesn’t go very often. The code coverage annotations on the other hand are used in entities and other logic classes, so they have to be excluded. @doctrine/doctrinecore what’s our stance here? Should we ignore all PHPUnit annotations by default or should we expect users to manually exclude them if they use the annotation parser on test classes? |
|
It would help if @jrjohnson would tell us his use case for using annotation parser in test files |
I think it might fine to include them in Annotations 2.0 where unqualified annotations will no longer be supported, thus also minimized chances for conflicts. |
|
A test library I'm using has recently included Sounds like I should go ahead an add the rest of the PHPUnit annotations, I'll update this PR with those included. |
|
I've added all the annotations found at https://phpunit.readthedocs.io/en/8.0/annotations.html |
| 'codeCoverageIgnoreEnd' => true, | ||
| 'codeCoverageIgnoreStart' => true, | ||
| 'covers' => true, | ||
| 'author' => true, |
There was a problem hiding this comment.
@author is already part of phpDoc itself (see above).
There was a problem hiding this comment.
Technically it's fine to have duplicates so we can even keep it for completeness.
greg0ire
left a comment
There was a problem hiding this comment.
The code looks fine to me, but I would squash the 2 commits together.
d4b4d35 to
7ccffb7
Compare
|
No problem @greg0ire commits are now squashed. |
|
Thank you @jrjohnson. |
|
🎊 Happy to help! |
Everything from https://phpunit.readthedocs.io/en/8.0/annotations.html