Skip to content

Releases: slevomat/coding-standard

7.2.0

06 May 11:46
7.2.0
b4f96a8

Choose a tag to compare

🆕 New sniffs

  • Added SlevomatCodingStandard.Functions.DisallowTrailingCommaInClosureUse
  • Added SlevomatCodingStandard.Functions.RequireTrailingCommaInClosureUse

🔧 Improvements

  • Support for offset access type syntax in annotations
  • Support for @phpstan-assert/@psalm-assert annotations
  • SlevomatCodingStandard.Whitespaces.DuplicateSpacesSniff: New option ignoreSpacesInMatch
  • SlevomatCodingStandard.Functions.DisallowTrailingCommaInCall: New option onlySingleLine
  • SlevomatCodingStandard.Functions.DisallowTrailingCommaInDeclaration: New option onlySingleLine

🐛 Fixes

  • SlevomatCodingStandard.TypeHints.ReturnTypeHint: Fixed internal error
  • SlevomatCodingStandard.ControlStructures.UselessIfConditionWithReturn: Fixed internal error
  • SlevomatCodingStandard.Functions.RequireSingleLineCall: Fixed false positive
  • SlevomatCodingStandard.Variables.UnusedVariable: Resolve false positives with increment/decrement operators (thanks to @aadmathijssen)
  • SlevomatCodingStandard.Variables.UnusedVariable: allow increment/decrement operators after yield (thanks to @aadmathijssen)

7.1.0

29 Mar 13:06
7.1.0
b521bd3

Choose a tag to compare

⚠️ Removed support for PHP 7.1

🆕 New sniffs

  • Added SlevomatCodingStandard.Classes.RequireAbstractOrFinal (thanks to @roslov)
  • Added SlevomatCodingStandard.Exceptions.DisallowNonCapturingCatch (thanks to @olsavmic)

🔧 Improvements

  • Support for conditional types in annotations
  • SlevomatCodingStandard.Numbers.RequireNumericLiteralSeparator: Added option ignoreOctalNumbers
  • SlevomatCodingStandard.Functions.FunctionLength: New options includeComments and includeWhitespace (thanks to @bkdotcom)

7.0.20

25 Mar 09:54
7.0.20
cbfadfe

Choose a tag to compare

🐛 Fixes

  • SlevomatCodingStandard.TypeHints.ReturnTypeHint: Improved - Type alias should not be reported as "missing traversable type hint specification"
  • SlevomatCodingStandard.TypeHints.ParameterTypeHint: Improved - Type alias should not be reported as "missing traversable type hint specification"
  • SlevomatCodingStandard.TypeHints.PropertyTypeHint: Improved - Type alias should not be reported as "missing traversable type hint specification"
  • SlevomatCodingStandard.TypeHints.ReturnTypeHint: It was not possible to suppress some errors
  • SlevomatCodingStandard.Classes.ParentCallSpacing: Fixed false positive

7.0.19

01 Mar 18:21
7.0.19
bef66a4

Choose a tag to compare

🐛 Fixes

  • SlevomatCodingStandard.TypeHints.PropertyTypeHint: Type alias should not be reported as "missing traversable type hint specification"
  • SlevomatCodingStandard.TypeHints.ParameterTypeHint: Type alias should not be reported as "missing traversable type hint specification"
  • SlevomatCodingStandard.TypeHints.ReturnTypeHint: Type alias should not be reported as "missing traversable type hint specification"
  • SlevomatCodingStandard.ControlStructures.RequireYodaComparison: Fixed false positives with match
  • SlevomatCodingStandard.ControlStructures.DisallowYodaComparison: Fixed false positives with match
  • SlevomatCodingStandard.Commenting.DocCommentSpacing: Fixed internal error
  • SlevomatCodingStandard.Variables.UnusedVariable: Fixed false positive
  • SlevomatCodingStandard.Variables.UnusedVariable: Fixed missing report when option ignoreUnusedValuesWhenOnlyKeysAreUsedInForeach is enabled
  • SlevomatCodingStandard.Functions.RequireTrailingCommaInCall: Fixed false positive
  • ReferencedNameHelper: Fixed searching of class references in heredoc
  • Ignore invalid @template and @type annotations

7.0.18

07 Dec 17:21
7.0.18
b81ac84

Choose a tag to compare

🐛 Fixes

  • Improved AnnotationTypeHelper::export() for callable in array

7.0.17

06 Dec 22:16
7.0.17
b574727

Choose a tag to compare

🐛 Fixes

  • SlevomatCodingStandard.Namespaces.UnusedUses: Improved detection of relative name in generic annotation
  • SlevomatCodingStandard.Classes.ClassConstantVisibility: Added support for final constants
  • SlevomatCodingStandard.Functions.RequireTrailingCommaInCall: Skip instances on same line as closing parenthesis (thanks to @donatj)

7.0.16

22 Oct 07:00
7.0.16
14c324b

Choose a tag to compare

🐛 Fixes

  • SlevomatCodingStandard.Classes.ModernClassNameReference: Don't flag method declarations (thanks to @jrfnl)
  • SlevomatCodingStandard.Commenting.InlineDocCommentDeclaration: Fixed false positive
  • SlevomatCodingStandard.ControlStructures.NewWithParentheses: Fixed false positive
  • Appended logic in ReferencedNameHelper for find names of class inside double quotes (thanks to @AIlkiv)

7.0.15

09 Sep 10:42
7.0.15
cc80e59

Choose a tag to compare

🐛 Fixes

  • UseSpacingSniff: Fixed false positive
  • TypeCastSniff: Fixed internal error
  • RequireConstructorPropertyPromotionSniff: Fixed false positives
  • ClassStructureSniff: Add missing magic methods (thanks to @jrfnl)
  • Updated phpstan/phpdoc-parser (thanks to @alexndlm)

7.0.14

26 Aug 12:24
7.0.14
15b2b46

Choose a tag to compare

🐛 Fixes

  • InlineDocCommentDeclarationSniff: Don't report missing assigment for $this
  • ParameterTypeHintSniff, ReturnTypeHintSniff, PropertyTypeHintSniff: Short nullable is now reported as useless annotation too
  • Don't try to find references in double quoted string - it's difficult to parse it with PHPCS

7.0.13

29 Jul 14:32
7.0.13
122a9bf

Choose a tag to compare

🐛 Fixes

  • RequireConstructorPropertyPromotionSniff: Fixed false positive
  • UnusedUsesSniff: Fixed false positive