Releases: slevomat/coding-standard
Releases · slevomat/coding-standard
8.19.0
🔧 Improvements
- Support of PHP 8.4 properties
- Asymetric visibility supported
final/abstractproperties supported- Property hooks should not break any sniff
🐛 Fixes
SlevomatCodingStandard.Arrays.DisallowPartiallyKeyed: Fixed false positiveSlevomatCodingStandard.Classes.ClassMemberSpacing: Prevent deleting unexpected code/comments (thanks to @maryo)SlevomatCodingStandard.Complexity.Cognitive:do...whileloop should only increment once (not for both theT_DOandT_WHILE) (thanks to @bkdotcom)SlevomatCodingStandard.TypeHints.ClassConstantTypeHint: New optionfixableNativeTypeHint- it's possible to fix only private constants (thanks to @maryo)SlevomatCodingStandard.Classes.RequireConstructorPropertyPromotion: Properly autofixing when argument name has an attribute (thanks to @maryo)
8.18.1
🐛 Fixes
SlevomatCodingStandard.Commenting.InlineDocCommentDeclaration: Fix error when no code is found after@var(thanks to @AegirLeet)SlevomatCodingStandard.PHP.UselessParentheses: Fixed false positive for bitwise not operator
8.18.0
8.17.1
8.17.0
8.16.2
8.16.1
8.16.0
⚠️
- 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-parser2.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 forinvoke methodgroupSlevomatCodingStandard.Classes.ClassStructure: Support for definition of custom groups (thanks to @maryo)SlevomatCodingStandard.Namespaces.ReferenceUsedNamesOnly: New optionallowWhenNoNamespaceSlevomatCodingStandard.Classes.ForbiddenPublicProperty: New optionallowReadonly- 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 detectedSlevomatCodingStandard.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 attributesSlevomatCodingStandard.Classes.PropertyDeclaration: Fixed false positives where there's function withstaticreturn type hint before propertySlevomatCodingStandard.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 typeSlevomatCodingStandard.ControlStructures.NewWithParentheses: Fixed false positive for readonly anonymous classSlevomatCodingStandard.ControlStructures.DisallowYodaComparison: Fixed fixerSlevomatCodingStandard.PHPUselessParentheses: Fixed false positiveSlevomatCodingStandard.PHP.OptimizedFunctionsWithoutUnpacking:sprintf()is optimized too- Documentation fixes (thanks to @edpittol and @tfrommen)
🗑️ Deprecated
SlevomatCodingStandard.TypeHints.UnionTypeHintFormat: UseSlevomatCodingStandard.TypeHints.DNFTypeHintFormatinstead
8.15.0
🔧 Improvements
- Speedup of sniffs working with
use - Removed for a long time deprecated
FunctionLengthsniff inFilesnamespace
🐛 Fixes
SlevomatCodingStandard.Classes.ClassConstantVisibility: Fixed error message for typed constantsSlevomatCodingStandard.Namespaces.UnusedUses: Fixed false positive thanks to PHPCS upgradeSlevomatCodingStandard.Namespaces.UnusedUses: Fix class detection in double-quoted strings and heredoc (thanks to @c01l)SlevomatCodingStandard.Exceptions.RequireNonCapturingCatch: Fixed false positivesSlevomatCodingStandard.Functions.RequireTrailingCommaInCall: Fixed missing report for missing trailing comma after arrow functionSlevomatCodingStandard.Commenting.UselessFunctionDocComment: It should report simplearrayas useless- Fixed internal error in
CommentHelper