-
Notifications
You must be signed in to change notification settings - Fork 56
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
Fix annotation groups usage #91
Conversation
Applying the fixes to the configuration.
@lcobucci I don't understand the diff: you just moved |
@Ocramius yeap... the As I tried to explain, our configuration groups <rule ref="SlevomatCodingStandard.Commenting.DocCommentSpacing">
<properties>
<property name="linesCountBeforeFirstContent" value="0"/>
<property name="linesCountAfterLastContent" value="0"/>
<property name="linesCountBetweenDescriptionAndAnnotations" value="1"/>
<property name="linesCountBetweenAnnotationsGroups" value="1"/>
<property name="annotationsGroups" type="array">
<element value="@internal, @deprecated,"/>
<element value="@link, @see, @uses,"/>
<element value="@ORM\, @ODM\,"/>
<element value="@param"/>
<element value="@return"/>
<element value="@throws"/>
</property>
</properties>
</rule> And our files were using PHPUnit's meaning of I thought that we shouldn't discuss modifying the meaning of that annotation for our CS without having the build stable first. |
Isn't there a |
The typical example is a test like following: /**
* @covers \My\Authentication
* @uses \My\UserId
*/
final class TestAuthentication extends TestCase
{
// ...
} |
@Ocramius I know, I think I've failed to explain again. Our groups were set based on this: https://docs.phpdoc.org/references/phpdoc/tags/uses.html and not on PHPUnit's meaning of My intention with this PR was not to discuss whether this is right or wrong, our build is broken and this PR fixes it. Please be explicit if you'd like to have the configuration changed, I can change the PR. |
I don't mind either way. I don't think |
Let's ask the person who configured the groups then... @Majkl578 what's your take here, mate? |
I think a fixed master build would be nice. It makes it easier for contributors to keep focus on their own tests. @lcobucci Are you going to add your group-suggestion in another PR or are you going to add it here after feedback? |
I can do either, my initial thought was to do the former. |
🚢 |
The main issue here is that both PHPDocumentor and PHPUnit relies on
@uses
annotation - with different meaning.I personally wouldn't use
@uses
the way PHPDocumentor defines but I wanted to first have the build fixed before suggesting changes.BTW this would be my suggestion for annotation groups:
https://github.com/lcobucci/coding-standard/blob/940d248df0a3ff0d3ccfa3ea44c8566313863ce2/src/Lcobucci/ruleset.xml#L33-L52