Skip to content

4.2.0

Compare
Choose a tag to compare
@kukulich kukulich released this 04 Jan 10:07
· 1788 commits to master since this release
4.2.0
accf5e3

⚠️ PHPCS 3.0.2+ is now required.

Deprecated:

  • ClassConstantVisibilitySniff: enabled - Deprecated now
  • NullableTypeForNullDefaultValueSniff: enabled - Deprecated now
  • TypeHintDeclarationSniff: enableNullableTypeHints - Deprecated now
  • TypeHintDeclarationSniff: enableVoidTypeHint - Deprecated now

Improvements:

  • UseDoesNotStartWithBackslashSniff: Detects functions and constants now
  • UseDoesNotStartWithBackslashSniff: Sniff is now fixable
  • DeclareStrictTypesSniff: newlinesCountAfterDeclare - Allows to set 0 to N newlines to be between declare and next statement
  • FullyQualifiedGlobalFunctionsSniff: exclude - List of global functions that are allowed not to be referenced via FQN
  • FullyQualifiedGlobalConstantsSniff: exclude - List of global constants that are allowed not to be referenced via FQN
  • ClassConstantVisibilitySniff: Sniff is now fixable (thanks to @Majkl578)
  • ClassConstantVisibilitySniff: fixable - The sniff is not fixable by default because we think it's better to decide about each constant one by one however you can enable fixability with this option
  • LongTypeHintsSniff: Sniff is now fixable

Fixes:

  • RequireYodaComparisonSniff: Fixed short array support
  • DisallowYodaComparisonSniff: Fixed short array support
  • UnusedPrivateElementsSniff: Fixed false positive for static properties
  • UnusedPrivateElementsSniff: Fixed detection of write only properties
  • UnusedPrivateElementsSniff: Fixed false positive when calling private method on the same class
  • FullyQualifiedGlobalFunctionsSniff: Improved ignoring functions that are not global
  • FullyQualifiedGlobalConstantsSniff: Improved ignoring constants that are not global
  • ReferencedNameHelper: Methods imported from trait should not be detected as referenced names