Skip to content

Releases: slevomat/coding-standard

8.5.2

27 Sep 16:49
8.5.2
f32937d

Choose a tag to compare

🐛 Fixes

  • SlevomatCodingStandard.TypeHints.PropertyTypeHint: Fixed false positives when enableUnionTypeHint is disabled and enableIntersectionTypeHint is enabled
  • SlevomatCodingStandard.TypeHints.ParameterTypeHint: Fixed false positives when enableUnionTypeHint is disabled and enableIntersectionTypeHint is enabled
  • SlevomatCodingStandard.TypeHints.ReturnTypeHint: Fixed false positives when enableUnionTypeHint is disabled and enableIntersectionTypeHint is enabled

8.5.1

23 Sep 05:38
8.5.1
971f489

Choose a tag to compare

🐛 Fixes

  • SlevomatCodingStandard.PHP.RequireExplicitAssertion: Fixed broken fixer when enableAdvancedStringTypes is enabled

8.5.0

21 Sep 12:54
8.5.0
a52720f

Choose a tag to compare

🔧 Improvements

  • PHP 8.2: Support for standalone null, true and false type hints
  • SlevomatCodingStandard.PHP.RequireExplicitAssertion: Improved support for native simple types
  • SlevomatCodingStandard.PHP.RequireExplicitAssertion: New option enableIntegerRanges
  • SlevomatCodingStandard.PHP.RequireExplicitAssertion: New option enableAdvancedStringTypes
  • Support of phpstan/phpdoc-parser 1.8.0

🐛 Fixes

  • SlevomatCodingStandard.Classes.PropertyDeclaration: Fixed false positive
  • SlevomatCodingStandard.PHP.RequireExplicitAssertion: Fixed false positive
  • SlevomatCodingStandard.ControlStructures.DisallowYodaComparison/RequireYodaComparison: Fixed support for condition in arrow function
  • SlevomatCodingStandard.Classes.DisallowMultiPropertyDefinition: Fixed false positives for old array definition style
  • SlevomatCodingStandard.Variables.UselessVariable: Fixed false positives

8.4.0

09 Aug 19:14
8.4.0
02f2732

Choose a tag to compare

🔧 Improvements

  • Support of phpstan/phpdoc-parser 1.7.0

🐛 Fixes

  • Fixed detection of some PHP 8.1 types
  • SlevomatCodingStandard.PHP.RequireNowdoc: Accepts escaped sequences (thanks to @dg)
  • SlevomatCodingStandard.Functions.RequireSingleLineCall: Skip calls with multi-line double-quoted string (thanks to @schlndh)
  • SlevomatCodingStandard.PHP.UselessParentheses: Fixed false positive with xor
  • SlevomatCodingStandard.Operators.RequireCombinedAssignmentOperator: Try to ignore string offsets

8.3.0

16 Jul 12:05
8.3.0
a14df43

Choose a tag to compare

🆕 New sniffs

  • Added SlevomatCodingStandard.Complexity.Cognitive (thanks to @bkdotcom)
  • Added SlevomatCodingStandard.Files.FileLength (thanks to @bkdotcom)
  • Added SlevomatCodingStandard.Classes.ClassLength (thanks to @bkdotcom)

🐛 Fixes

  • SlevomatCodingStandard.PHP.RequireExplicitAssertion: Do not throw away static type (thanks to @simPod)

8.2.0

08 Jul 10:55
8.2.0
0cec515

Choose a tag to compare

🆕 New sniffs

  • Added SlevomatCodingStandard.Classes.BackedEnumTypeSpacing

🔧 Improvements

  • SlevomatCodingStandard.TypeHints.ParameterTypeHint: MissingTraversableTypeHintSpecification is not reported when promoted property has @var annotation

8.1.0

24 Jun 11:43
8.1.0
bf55f29

Choose a tag to compare

🔧 Improvements

  • SlevomatCodingStandard.Classes.PropertyDeclaration: New option checkPromoted to enable check of promoted properties
  • SlevomatCodingStandard.Classes.PropertyDeclaration: New option enableMultipleSpacesBetweenModifiersCheck to enable check of spaces between property modifiers
  • SlevomatCodingStandard.Classes.PropertyDeclaration: Improved error messages
  • SlevomatCodingStandard.Classes.ForbiddenPublicProperty: New option checkPromoted to enable check of promoted properties

🐛 Fixes

  • SlevomatCodingStandard.TypeHints.PropertyTypeHint: Fix inconsistent enableIntersectionTypeHint (thanks to @schlndh)

8.0.1

22 Jun 06:59
8.0.1
c5cf9b5

Choose a tag to compare

🐛 Fixes

  • Group use statements are ignored - we don't support them
  • SlevomatCodingStandard.PHP.UselessParentheses: Fixed false positive
  • SlevomatCodingStandard.TypeHints.ParameterTypeHint: Fixed internal error (thanks to @schlndh)

8.0.0

17 Jun 13:24
8.0.0
84cc169

Choose a tag to compare

🔧 Improvements

  • Support for intersection types
  • Support for readonly properties
  • Support for enums
  • Support for never type hint
  • Support for more unofficial type hints
  • SlevomatCodingStandard.Classes.PropertyDeclaration: Checks also order of modifiers
  • SlevomatCodingStandard.Classes.ClassStructure: Support for enum cases and readonly properties

🐛 Fixes

  • SlevomatCodingStandard.Classes.PropertyDeclaration: Fixed missing support for only static property
  • SlevomatCodingStandard.TypeHints.PropertyTypeHint: Fixed missing support for only static property
  • SlevomatCodingStandard.Commenting.EmptyComment: Fixed internal error
  • SlevomatCodingStandard.Classes.ForbiddenPublicProperty: Fixed internal error
  • SlevomatCodingStandard.Namespaces.FullyQualifiedClassNameInAnnotation: Fixed false positives for @psalm-import-type in @psalm-var
  • SlevomatCodingStandard.PHP.RequireExplicitAssertion: Ignore unsupported unofficial type hints

⚠️BC breaks

  • SlevomatCodingStandard.TypeHints.PropertyTypeHintSpacing renamed to SlevomatCodingStandard.Classes.PropertyDeclaration
  • SlevomatCodingStandard.Classes.ClassStructure: Removed option enableFinalMethods
  • Removed error SlevomatCodingStandard.Namespaces.UnusedUses.MismatchingCaseSensitivity

7.2.1

25 May 11:05
7.2.1
aff06ae

Choose a tag to compare

🐛 Fixes

  • SlevomatCodingStandard.Namespaces.ReferenceUsedNamesOnly: Fixed false positives for colliding functions and constants
  • SlevomatCodingStandard.Commenting.DisallowCommentAfterCode: Don't break multi-line string during auto-fix (thanks to @schlndh)
  • Fixed detection of function object