Skip to content

8.9.0

Compare
Choose a tag to compare
@kukulich kukulich released this 25 Mar 16:17
· 110 commits to master since this release
8.9.0
8f11e0f

馃啎 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)