Skip to content

4.5.0

Choose a tag to compare

@kukulich kukulich released this 02 Mar 15:42
· 1757 commits to master since this release
4.5.0
3957603

⚠️ PHPCS 3.2.3+ is now required.

New sniffs:

  • SuperfluousExceptionNamingSniff: Reports usage of superfluous suffix Exception for exceptions
  • SuperfluousAbstractClassNamingSniff: Reports usage of superfluous prefix or suffix Abstract for abstract classes
  • SuperfluousInterfaceNamingSniff: Reports usage of superfluous prefix or suffix Interface for interfaces
  • UseSpacingSniff: Enforces configurable number of lines before first use, after last use and between two different types of use (eg. between use function and use const)
  • EmptyCommentSniff: Reports empty comments
  • DocCommentSpacing: Enforces configurable number of lines before first content (description or annotation), after last content (description or annotation), between description and annotations, between two different annotations types
  • DisallowOneLinePropertyDocCommentSniff: Require comments with single-line content to be written as multi-liners (thanks to @Majkl578)
  • RequireOneLinePropertyDocCommentSniff: Require comments with single-line content to be written as one-liners (thanks to @Majkl578)
  • TypeCastSniff: Enforces using shorthand cast operators, forbids use of unset and binary cast operators (thanks to @Majkl578)

Improvements:

  • EarlyExitSniff: New check "Remove useless elseif to reduce code nesting"
  • UnusedUsesSniff: ignoredAnnotationNames - To ignore specified annotation names (thanks to @xificurk)
  • ReferenceUsedNamesOnlySniff: Improved annotations parsing
  • FullyQualifiedClassNameInAnnotationSniff: Improved annotations parsing
  • ForbiddenAnnotationsSniff: Improved annotations parsing
  • AlphaneticallySortedUsesSniff: Make error message more clear (thanks to @brettdorrans)

Fixes:

  • EarlyExitSniff: Report else when all conditions contain early exit