Skip to content

Releases: wdes/coding-standard

v3.3.2

16 Dec 21:47
v3.3.2
e593f9b
Compare
Choose a tag to compare
  • Fixed SlevomatCodingStandard.TypeHints.DeclareStrictTypes (d95135d)
  • Bump dependencies (5f2d8bf)
  • Adjust testing gear

v3.3.1

11 Nov 16:13
v3.3.1
42d4eec
Compare
Choose a tag to compare
  • Removed SlevomatCodingStandard.Files.TypeNameMatchesFileName (42d4eec)

v3.3.0

11 Nov 16:08
v3.3.0
c6bb233
Compare
Choose a tag to compare
  • ⚠️ removed support for PHP 7.1 (1d2c9a5)
  • Add new rule SlevomatCodingStandard.Files.TypeNameMatchesFileName (ef96d67)
  • Bump slevomat/coding-standard from ^7.0.18 to ^8.6.3 (1d2c9a5, c638c46)
  • Test on PHP 8.2 (b086897)

v3.2.1

08 Apr 23:03
v3.2.1
1e4c2c3
Compare
Choose a tag to compare
  • Enable back Generic.PHP.LowerCaseType rule disabled due to a syntax mistake (cd470ea)
  • Internal micro improvements
  • Force coding standard to only apply to .php files (a1d22eb)
  • Documentation improvements

v3.2.0

18 Feb 20:26
v3.2.0
716e0f8
Compare
Choose a tag to compare
  • Add more rules (d3107e8)
    • Disallow old list syntax list(...) = $var
    • Disallow group use
    • Disallow trailing comma in function declaration
    • Enforce trailing array comma
    • Enforce class constant visibility
    • Enforce nullable hint on default null value in signatures
    • Some more minor rules, see the commit d3107e8

v3.1.0

19 Dec 22:39
v3.1.0
07a089e
Compare
Choose a tag to compare
  • Forbid long array syntax (e5a379d)
  • Upgrade dependencies
  • Improve the README
  • Run coding standard test on PHP 8.1

v3.0.0

21 Mar 14:33
v3.0.0
0100e93
Compare
Choose a tag to compare
  • Add PSR1, PS2, PSR12
  • Adjust DeclareStrictTypes spacings
  • Remove phpdoc rules (please keep your docs perfect anyway ;))
     <rule ref="SlevomatCodingStandard.Namespaces.UseFromSameNamespace"/>
     <rule ref="SlevomatCodingStandard.TypeHints.DeclareStrictTypes">
         <properties>
-            <property name="newlinesCountBetweenOpenTagAndDeclare" value="1"/>
-            <property name="newlinesCountAfterDeclare" value="1"/>
+            <property name="newlinesCountBetweenOpenTagAndDeclare" value="2"/>
+            <property name="newlinesCountAfterDeclare" value="2"/>
             <property name="spacesCountAroundEqualsSign" value="1"/>
         </properties>
     </rule>
@@ -94,16 +94,13 @@
     <rule ref="PEAR.NamingConventions.ValidClassName"/>
     <rule ref="PEAR.WhiteSpace.ObjectOperatorIndent"/>
     <rule ref="PEAR.WhiteSpace.ScopeClosingBrace"/>
-    <rule ref="PSR1.Classes.ClassDeclaration"/>
-    <rule ref="PSR1.Files.SideEffects"/>
-    <rule ref="PSR2.ControlStructures.ControlStructureSpacing"/>
-    <rule ref="PSR2.ControlStructures.ElseIfDeclaration"/>
-    <rule ref="PSR2.Files.EndFileNewline"/>
-    <rule ref="PSR2.Methods.MethodDeclaration"/>
-    <rule ref="PSR2.Namespaces.NamespaceDeclaration"/>
-    <rule ref="PSR2.Namespaces.UseDeclaration"/>
     <rule ref="Squiz.Strings.DoubleQuoteUsage" />
-    <rule ref="Squiz.PHP.DisallowMultipleAssignments"/>
+    <rule ref="Squiz.Strings.ConcatenationSpacing">
+        <properties>
+            <property name="spacing" value="1"/>
+            <property name="ignoreNewlines" value="true"/>
+        </properties>
+    </rule>
     <rule ref="Squiz.PHP.DisallowSizeFunctionsInLoops"/>
     <rule ref="Squiz.PHP.DiscouragedFunctions">
         <properties>
@@ -141,6 +138,12 @@
     <rule ref="Generic.Functions.OpeningFunctionBraceBsdAllman.BraceOnSameLine">
         <severity>0</severity>
     </rule>
-    <rule ref="PSR12.Keywords.ShortFormTypeKeywords"/>
-    <rule ref="PSR12.Classes.ClassInstantiation"/>
+    <rule ref="PSR1"/>
+    <rule ref="PSR2">
+        <exclude name="PSR2.Classes.ClassDeclaration.CloseBraceAfterBody"/>
+    </rule>
+    <rule ref="PSR12">
+        <exclude name="PSR12.Files.DeclareStatement.SpaceFoundAfterDirective"/>
+        <exclude name="PSR12.Files.DeclareStatement.SpaceFoundBeforeDirectiveValue"/>
+    </rule>
 </ruleset>

v2.0.1

21 Mar 11:38
v2.0.1
827398c
Compare
Choose a tag to compare

Drop:

<rule ref="PEAR.Commenting.FunctionComment"/>
<rule ref="PEAR.Commenting.InlineComment"/>
<rule ref="Squiz.PHP.CommentedOutCode">
        <properties>
            <property name="maxPercentage" value="50"/>
        </properties>
</rule>

v2.0.0

21 Mar 11:22
v2.0.0
aa758f0
Compare
Choose a tag to compare

Add:

    <rule ref="SlevomatCodingStandard.Classes.ClassConstantVisibility"/>
    <rule ref="SlevomatCodingStandard.PHP.UselessSemicolon"/>
    <rule ref="SlevomatCodingStandard.Functions.StaticClosure"/>
    <rule ref="Squiz.Strings.DoubleQuoteUsage" />

v1.0.0

21 Mar 01:41
v1.0.0
9d2a74a
Compare
Choose a tag to compare

First version