Skip to content

Commit

Permalink
feat: ban phpunit's annotations
Browse files Browse the repository at this point in the history
Use Attributes instead (since PHPUnit v10). Older PHPUnit's versions will not be supported.
  • Loading branch information
simPod committed Mar 20, 2023
1 parent 39a49e5 commit 09b78d4
Showing 1 changed file with 57 additions and 0 deletions.
57 changes: 57 additions & 0 deletions src/Cdn77/ruleset.xml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,64 @@
"/>
</properties>
</rule>

<rule ref="SlevomatCodingStandard.Classes.RequireConstructorPropertyPromotion" />
<rule ref="SlevomatCodingStandard.Commenting.ForbiddenAnnotations">
<properties>
<property name="forbiddenAnnotations" type="array" extend="true">
<!-- Use attributes instead -->
<element value="@after" />
<element value="@afterClass" />
<element value="@backupGlobals" />
<element value="@backupStaticProperties" />
<element value="@before" />
<element value="@beforeClass" />
<element value="@codeCoverageIgnore" />
<element value="@coversClass" />
<element value="@coversFunction" />
<element value="@coversNothing" />
<element value="@dataProvider" />
<element value="@dataProviderExternal" />
<element value="@depends" />
<element value="@dependsExternal" />
<element value="@dependsExternalUsingDeepClone" />
<element value="@dependsExternalUsingShallowClone" />
<element value="@dependsOnClass" />
<element value="@dependsOnClassUsingDeepClone" />
<element value="@dependsOnClassUsingShallowClone" />
<element value="@dependsUsingDeepClone" />
<element value="@dependsUsingShallowClone" />
<element value="@doesNotPerformAssertions" />
<element value="@excludeGlobalVariableFromBackup" />
<element value="@excludeStaticPropertyFromBackup" />
<element value="@group" />
<element value="@large" />
<element value="@medium" />
<element value="@postCondition" />
<element value="@preCondition" />
<element value="@preserveGlobalState" />
<element value="@requiresFunction" />
<element value="@requiresMethod" />
<element value="@requiresOperatingSystem" />
<element value="@requiresOperatingSystemFamily" />
<element value="@requiresPhp" />
<element value="@requiresPhpExtension" />
<element value="@requiresPhpunit" />
<element value="@requiresSetting" />
<element value="@runClassInSeparateProcess" />
<element value="@runInSeparateProcess" />
<element value="@runTestsInSeparateProcesses" />
<element value="@small" />
<element value="@test" />
<element value="@testDox" />
<element value="@testWith" />
<element value="@testWithJson" />
<element value="@ticket" />
<element value="@usesClass" />
<element value="@usesFunction" />
</property>
</properties>
</rule>
<rule ref="SlevomatCodingStandard.ControlStructures.JumpStatementsSpacing">
<properties>
<property name="linesCountAfterWhenLastInCaseOrDefault" value="0"/>
Expand Down

0 comments on commit 09b78d4

Please sign in to comment.