Skip to content

Releases: slevomat/coding-standard

4.1.0

19 Dec 13:22
3992f96

Choose a tag to compare

⚠️ PHP 7.1 is now required.

Improvements:

  • FullyQualifiedExceptionsSniff: Sniff is now fixable (thanks to @VasekPurchart)
  • FullyQualifiedClassNameAfterKeywordSniff: Sniff is now fixable (thanks to @VasekPurchart)
  • FullyQualifiedClassNameInAnnotationSniff: Sniff is now fixable (thanks to @VasekPurchart)

Fixes:

  • UnusedPrivateElementsSniff: Check for unused private methods is case insensitive now
  • TypeHintDeclarationSniff: Fixed useless doccomment detection when parameters are aligned
  • AnnotationHelper: Fixed parsing of multiline annotations

4.0.0

15 Sep 18:30

Choose a tag to compare

⚠️ Using all sniffs from the standard is no longer a recommended way to use Slevomat Coding Standard, see How to run the sniffs.

BC breaks:

  • YodaComparisonSniff was renamed to DisallowYodaComparisonSniff

New sniffs:

  • RequireYodaComparisonSniff: If you prefer Yoda conditions, you can disable DisallowYodaComparison and use this sniff

Improvements:

  • Basic support of object type hint

Fixes:

  • TypeHintDeclarationSniff: {@ignoredoc} is case insensitive now
  • UnusedPrivateElementsSniff: Chained private methods should not be reported as unused
  • ReferencedNameHelper: Some references were not recognized

2.5.0

15 Sep 16:26
4f59b04

Choose a tag to compare

New checks:

  • TypeHintDeclarationSniff: Checks if closures use void type hint.

New settings:

  • ReferenceUsedNamesOnlySniff: allowFullyQualifiedGlobalFunctions - allows using fully qualified functions from global space (i.e. \phpversion())
  • ReferenceUsedNamesOnlySniff: allowFullyQualifiedGlobalConstants - allows using fully qualified constants from global space (i.e. \PHP_VERSION)

Fixes:

  • UseStatement: Constant name are not case insensitive
  • ReferencedNameHelper: Type hints of variadic parameters and parameters passed by reference wasn't recognized
  • TypeHintDeclarationSniff: Methods with {@ignoredoc} format wasn't ignored
  • TypeHintDeclarationSniff: {@ignoredoc} is case insensitive now
  • YodaComparisonSniff: Fixed bugs with logical and, or and xor
  • UnusedPrivateElementsSniff: Fixed false positive

3.3.0

25 Aug 15:27
3.3.0
84c2f64

Choose a tag to compare

New sniffs:

  • FullyQualifiedGlobalFunctionsSniff: All references to global functions must be referenced via a fully qualified name
  • FullyQualifiedGlobalConstantsSniff: All references to global constants must be referenced via a fully qualified name

Fixes:

  • UseStatement: Constant name are not case insensitive
  • ReferencedNameHelper: Type hints of variadic parameters and parameters passed by reference wasn't recognized

3.2.1

23 Aug 20:45
3.2.1
cb6986f

Choose a tag to compare

Fixes:

  • TypeHintDeclarationSniff: Methods with {@ignoredoc} format wasn't ignored
  • YodaComparisonSniff: Fixed bugs with logical and, or and xor

3.2.0

23 Aug 15:48
3.2.0
2f337b0

Choose a tag to compare

New checks:

  • TypeHintDeclarationSniff: Checks if closures use void type hint.

3.1.2

14 Aug 15:51

Choose a tag to compare

Fixes:

  • LanguageConstructWithParenthesesSniff: T_EXIT should be checked too

3.1.1

10 Aug 20:36

Choose a tag to compare

Fixes:

  • UnusedPrivateElementsSniff: Fixed infinite loop

3.1.0

10 Aug 19:49

Choose a tag to compare

New sniffs:

  • LanguageConstructWithParenthesesSniff: Checks and fixes language construct used with parentheses

Fixes:

  • UnusedPrivateElementsSniff: Fixed false positive

3.0.5

01 Aug 22:45

Choose a tag to compare

Fixes:

  • UnusedPrivateElementsSniff: Fixed false positive