Skip to content

Releases: slevomat/coding-standard

8.9.1

27 Mar 11:12
8.9.1
3d4fe0c

Choose a tag to compare

🐛 Fixes

  • SlevomatCodingStandard.ControlStructures.NewWithParentheses: Fixed false positives for anonymous class with attributes
  • SlevomatCodingStandard.Classes.RequireSelfReference: Fixed false positives for anonymous classes with extends or implements

8.9.0

25 Mar 16:17
8.9.0
8f11e0f

Choose a tag to compare

🆕 New sniffs

  • SlevomatCodingStandard.Classes.EnumCaseSpacing: Checks that there is a certain number of blank lines between enum cases
  • SlevomatCodingStandard.Classes.RequireSelfReference: Requires self for local reference
  • SlevomatCodingStandard.Variables.DisallowVariableVariable: Disallows use of variable variables
  • SlevomatCodingStandard.ControlStructures.DisallowTrailingMultiLineTernaryOperator: Ternary operator has to be reformatted when the operator is not leading the line (thanks to @esserj)
  • SlevomatCodingStandard.Arrays.AlphabeticallySortedByKeys: Enforces natural sorting of array definitions by key in multi-line arrays (thanks to @bkdotcom)

🔧 Improvements

  • Support for phpstan/phpdoc-parser 1.16
  • @phpcsSuppress can be with comment
  • Support for non-falsy-string, list and non-empty-list type hints
  • SlevomatCodingStandard.Arrays.TrailingArrayComma: Support for "legacy" array() syntax (thanks to @bkdotcom)
  • SlevomatCodingStandard.Complexity.Cognitive: Deprecate maxComplexity and implement warningThreshold and errorThreshold options (thanks to @bkdotcom)
  • SlevomatCodingStandard.Attributes.AttributeAndTargetSpacing: New option allowOnSameLine (thanks to @stlrnz)
  • SlevomatCodingStandard.Classes.RequireMultiLineMethodSignature: New option minParameterCount (thanks to @janedbal)

🐛 Fixes

  • SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses: Fixer should not remove doc comments
  • SlevomatCodingStandard.ControlStructures.EarlyExit: Fixed detection of useless else
  • SlevomatCodingStandard.Variables.UselessVariable: Fixed false positive
  • SlevomatCodingStandard.PHP.OptimizedFunctionsWithoutUnpacking: Fixed false positive with first class callable
  • SlevomatCodingStandard.Classes.RequireConstructorPropertyPromotion: Fixes using prefixed var phpdoc (thanks to @franmomu)

8.8.0

09 Jan 10:47
8.8.0
59e2514

Choose a tag to compare

🔧 Improvements

  • Support for unsealed array shapes
  • Allow for the 1.0.0 version of the Composer PHPCS plugin (thanks to @jrfnl)

🐛 Fixes

  • SlevomatCodingStandard.Classes.RequireAbstractOrFinal: Fixed false positive for readonly classes
  • Fix typo in exception message (thanks to @jslmorrison)

8.7.1

15 Dec 08:18
8.7.1
c51edb8

Choose a tag to compare

🐛 Fixes

  • SlevomatCodingStandard.TypeHints.ParameterTypeHintSpacing: Fixed false positive when parameter has attribute but no type hint

8.7.0

13 Dec 16:38
8.7.0
326d195

Choose a tag to compare

🔧 Improvements

  • Support for phpstan/phpdoc-parser 1.15
  • Support for phpstan/phpdoc-parser 1.14
  • SlevomatCodingStandard.Attributes.AttributesOrder: New option orderAlphabetically
  • SlevomatCodingStandard.Attributes.AttributesOrder: Attributes could be ordered by mask (thanks to @alexndlm)

🐛 Fixes

  • SlevomatCodingStandard.Attributes.AttributeAndTargetSpacing: Fixed fixer

8.6.4

14 Nov 09:32
8.6.4
8a02c83

Choose a tag to compare

🔧 Improvements

  • Improved annotations parsing
  • SlevomatCodingStandard.Classes.ClassConstantVisibility: Added support for traits with constants
  • SlevomatCodingStandard.Classes.ConstantSpacing: Added support for traits with constants

🐛 Fixes

  • SlevomatCodingStandard.Attributes.DisallowAttributesJoining: Fix for attribute with trailing comma (thanks to @javer)

8.6.3

10 Nov 15:26
8.6.3
94fd4f9

Choose a tag to compare

🐛 Fixes

  • Slevomat.Namespaces.ReferenceUsedNamesOnly: Fixed fixer when there's conflict with Slevomat.Namespaces.UnusedUses
  • SlevomatCodingStandard.Namespaces.FullyQualifiedClassNameInAnnotation: Fixed false positives for int<0, max> and int<min, 100>
  • SlevomatCodingStandard.Attributes.AttributeAndTargetSpacing: Fixed false positive for comment after attribute

8.6.2

22 Oct 15:47
8.6.2
080f592

Choose a tag to compare

🐛 Fixes

  • SlevomatCodingStandard.Namespaces.FullyQualifiedClassNameInAnnotation: Fixed false positive with self::CONSTANT

8.6.1

21 Oct 16:18
8.6.1
71dddfe

Choose a tag to compare

🔧 Improvements

  • Support of phpstan/phpdoc-parser 1.12.0

🐛 Fixes

  • SlevomatCodingStandard.Namespaces.FullyQualifiedClassNameInAnnotation: Fixed false positives for global constants
  • SlevomatCodingStandard.Commenting.InlineDocCommentDeclaration: Fixed false positives for constants

8.6.0

17 Oct 07:09
8.6.0
d4175d8

Choose a tag to compare

🆕 New sniffs

  • Added SlevomatCodingStandard.Attributes.AttributesOrder
  • Added SlevomatCodingStandard.Attributes.AttributeAndTargetSpacing
  • Added SlevomatCodingStandard.Attributes.DisallowMultipleAttributesPerLine
  • Added SlevomatCodingStandard.Attributes.DisallowAttributesJoining (thanks to @michnovka)
  • Added SlevomatCodingStandard.Attributes.RequireAttributeAfterDocComment

🔧 Improvements

  • Support of phpstan/phpdoc-parser 1.11.0
  • Support for @phpstan-self-out/@phpstan-this-out
  • Support for @param-out annotation`
  • Support for @template with default value
  • Add dev Composer keyword (thanks to @GaryJones)

🐛 Fixes

  • Improved detection of references in double quotes strings