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
Add all PHPUnit annotations to the globally ignored list #254
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@author
is already part of phpDoc itself (see above).
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.
Technically it's fine to have duplicates so we can even keep it for completeness.
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.
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