Skip to content

8.16.0

Latest
Compare
Choose a tag to compare
@kukulich kukulich released this 23 Feb 18:16
· 3 commits to master since this release
8.16.0
7748a42

⚠️

  • Drop PHP 7.2 and 7.3 support
  • Tested on PHP 8.4 but no support for PHP 8.4 features
  • Update to phpstan/phpdoc-parser 2.0 (thanks to @ondrejmirtes)

🆕 New sniffs

  • SlevomatCodingStandard.TypeHints.ClassConstantTypeHint: Checks type hint of class constants (thanks to @DaDeather)
  • SlevomatCodingStandard.TypeHints.DNFTypeHintFormat: Checks format of DNF type hints

🔧 Improvements

  • SlevomatCodingStandard.Classes.ClassStructure: Support for invoke method group
  • SlevomatCodingStandard.Classes.ClassStructure: Support for definition of custom groups (thanks to @maryo)
  • SlevomatCodingStandard.Namespaces.ReferenceUsedNamesOnly: New option allowWhenNoNamespace
  • SlevomatCodingStandard.Classes.ForbiddenPublicProperty: New option allowReadonly - Add support for allowing public readonly properties (thanks to @tfrommen)
  • SlevomatCodingStandard.TypeHints.DisallowMixedTypeHint: Does not report error when attribute #[Override] is presented (thanks to @kamil-zacek)
  • SlevomatCodingStandard.PHP.UselessParentheses: Checks useless parentheses in (new Foo());
  • Remove use of deprecated T_ARRAY_HINT (thanks to @jrfnl)

🐛 Fixes

  • SlevomatCodingStandard.Namespaces.ReferenceUsedNamesOnly: Some references were not detected
  • SlevomatCodingStandard.TypeHints.DeclareStrictTypes: Fixing number of empty lines when previous effective token before declare is line comment (thanks to @maryo)
  • SlevomatCodingStandard.Classes.MethodSpacing: Fix check for method with attributes
  • SlevomatCodingStandard.Classes.PropertyDeclaration: Fixed false positives where there's function with static return type hint before property
  • SlevomatCodingStandard.ClassesEnumCaseSpacing: Fixed internal error (thanks to @v.fateev)
  • SlevomatCodingStandard.ClassesConstantSpacing: Fixed internal error (thanks to @v.fateev)
  • SlevomatCodingStandard.TypeHints.PropertyTypeHint: Fixed false positive for object shape as item in travesable type
  • SlevomatCodingStandard.ControlStructures.NewWithParentheses: Fixed false positive for readonly anonymous class
  • SlevomatCodingStandard.ControlStructures.DisallowYodaComparison: Fixed fixer
  • SlevomatCodingStandard.PHPUselessParentheses: Fixed false positive
  • SlevomatCodingStandard.PHP.OptimizedFunctionsWithoutUnpacking: sprintf() is optimized too
  • Documentation fixes (thanks to @edpittol and @tfrommen)

🗑️ Deprecated

  • SlevomatCodingStandard.TypeHints.UnionTypeHintFormat: Use SlevomatCodingStandard.TypeHints.DNFTypeHintFormat instead