Skip to content

Releases: slevomat/coding-standard

8.11.1

24 Apr 08:30
8.11.1
af87461
Compare
Choose a tag to compare

🐛 Fixes

  • SlevomatCodingStandard.Commenting.AnnotationName: Fixed false positive
  • SlevomatCodingStandard.Strings.DisallowVariableParsing: Fixed false positive

8.11.0

21 Apr 16:11
8.11.0
91428d5
Compare
Choose a tag to compare

🆕 New sniffs

  • SlevomatCodingStandard.Commenting.AnnotationName: Checks incorrect annotation names

🔧 Improvements

  • SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses: Don't fix when multiple uses are in one statement (thanks to @jonathan1055)
  • Support for phpstan/phpdoc-parser 1.20

🐛 Fixes

  • SlevomatCodingStandard.Strings.DisallowVariableParsing: Fixed false positive
  • SlevomatCodingStandard.Arrays.DisallowPartiallyKeyed: Fixed false positive with array unpacking

8.10.0

10 Apr 08:22
8.10.0
Compare
Choose a tag to compare

🆕 New sniffs

  • SlevomatCodingStandard.Classes.DisallowStringExpressionPropertyFetch: Disallows string expression property fetch $object->{'foo'}
  • SlevomatCodingStandard.Strings.DisallowVariableParsing: Disallows variable parsing inside strings (thanks to @Ekimik)
  • SlevomatCodingStandard.Arrays.DisallowPartiallyKeyed: Disallows partially keyed arrays (thanks to @bkdotcom)

🔧 Improvements

  • Object shapes support
  • Improved support for arrays in array() style (thanks to @bkdotcom)
  • Support for phpstan/phpdoc-parser 1.18

8.9.2

05 Apr 06:32
8.9.2
c9b3906
Compare
Choose a tag to compare

🔧 Improvements

  • Support for phpstan/phpdoc-parser 1.17

🐛 Fixes

  • SlevomatCodingStandard.Classes.ParentCallSpacing: Fixed false positives with parent call used in match()

8.9.1

27 Mar 11:12
8.9.1
3d4fe0c
Compare
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
Compare
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
Compare
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
Compare
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
Compare
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
Compare
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)