Releases: slevomat/coding-standard
Releases · slevomat/coding-standard
8.5.2
🐛 Fixes
SlevomatCodingStandard.TypeHints.PropertyTypeHint: Fixed false positives whenenableUnionTypeHintis disabled andenableIntersectionTypeHintis enabledSlevomatCodingStandard.TypeHints.ParameterTypeHint: Fixed false positives whenenableUnionTypeHintis disabled andenableIntersectionTypeHintis enabledSlevomatCodingStandard.TypeHints.ReturnTypeHint: Fixed false positives whenenableUnionTypeHintis disabled andenableIntersectionTypeHintis enabled
8.5.1
8.5.0
🔧 Improvements
- PHP 8.2: Support for standalone
null,trueandfalsetype hints SlevomatCodingStandard.PHP.RequireExplicitAssertion: Improved support for native simple typesSlevomatCodingStandard.PHP.RequireExplicitAssertion: New optionenableIntegerRangesSlevomatCodingStandard.PHP.RequireExplicitAssertion: New optionenableAdvancedStringTypes- Support of
phpstan/phpdoc-parser1.8.0
🐛 Fixes
SlevomatCodingStandard.Classes.PropertyDeclaration: Fixed false positiveSlevomatCodingStandard.PHP.RequireExplicitAssertion: Fixed false positiveSlevomatCodingStandard.ControlStructures.DisallowYodaComparison/RequireYodaComparison: Fixed support for condition in arrow functionSlevomatCodingStandard.Classes.DisallowMultiPropertyDefinition: Fixed false positives for old array definition styleSlevomatCodingStandard.Variables.UselessVariable: Fixed false positives
8.4.0
🔧 Improvements
- Support of
phpstan/phpdoc-parser1.7.0
🐛 Fixes
- Fixed detection of some PHP 8.1 types
SlevomatCodingStandard.PHP.RequireNowdoc: Accepts escaped sequences (thanks to @dg)SlevomatCodingStandard.Functions.RequireSingleLineCall: Skip calls with multi-line double-quoted string (thanks to @schlndh)SlevomatCodingStandard.PHP.UselessParentheses: Fixed false positive withxorSlevomatCodingStandard.Operators.RequireCombinedAssignmentOperator: Try to ignore string offsets
8.3.0
🆕 New sniffs
- Added
SlevomatCodingStandard.Complexity.Cognitive(thanks to @bkdotcom) - Added
SlevomatCodingStandard.Files.FileLength(thanks to @bkdotcom) - Added
SlevomatCodingStandard.Classes.ClassLength(thanks to @bkdotcom)
🐛 Fixes
SlevomatCodingStandard.PHP.RequireExplicitAssertion: Do not throw awaystatictype (thanks to @simPod)
8.2.0
8.1.0
🔧 Improvements
SlevomatCodingStandard.Classes.PropertyDeclaration: New optioncheckPromotedto enable check of promoted propertiesSlevomatCodingStandard.Classes.PropertyDeclaration: New optionenableMultipleSpacesBetweenModifiersCheckto enable check of spaces between property modifiersSlevomatCodingStandard.Classes.PropertyDeclaration: Improved error messagesSlevomatCodingStandard.Classes.ForbiddenPublicProperty: New optioncheckPromotedto enable check of promoted properties
🐛 Fixes
SlevomatCodingStandard.TypeHints.PropertyTypeHint: Fix inconsistentenableIntersectionTypeHint(thanks to @schlndh)
8.0.1
8.0.0
🔧 Improvements
- Support for intersection types
- Support for readonly properties
- Support for enums
- Support for
nevertype hint - Support for more unofficial type hints
SlevomatCodingStandard.Classes.PropertyDeclaration: Checks also order of modifiersSlevomatCodingStandard.Classes.ClassStructure: Support for enum cases and readonly properties
🐛 Fixes
SlevomatCodingStandard.Classes.PropertyDeclaration: Fixed missing support for only static propertySlevomatCodingStandard.TypeHints.PropertyTypeHint: Fixed missing support for only static propertySlevomatCodingStandard.Commenting.EmptyComment: Fixed internal errorSlevomatCodingStandard.Classes.ForbiddenPublicProperty: Fixed internal errorSlevomatCodingStandard.Namespaces.FullyQualifiedClassNameInAnnotation: Fixed false positives for@psalm-import-typein@psalm-varSlevomatCodingStandard.PHP.RequireExplicitAssertion: Ignore unsupported unofficial type hints
⚠️ BC breaks
SlevomatCodingStandard.TypeHints.PropertyTypeHintSpacingrenamed toSlevomatCodingStandard.Classes.PropertyDeclarationSlevomatCodingStandard.Classes.ClassStructure: Removed optionenableFinalMethods- Removed error
SlevomatCodingStandard.Namespaces.UnusedUses.MismatchingCaseSensitivity