Releases: slevomat/coding-standard
Releases · slevomat/coding-standard
8.9.1
8.9.0
🆕 New sniffs
SlevomatCodingStandard.Classes.EnumCaseSpacing: Checks that there is a certain number of blank lines between enum casesSlevomatCodingStandard.Classes.RequireSelfReference: Requiresselffor local referenceSlevomatCodingStandard.Variables.DisallowVariableVariable: Disallows use of variable variablesSlevomatCodingStandard.ControlStructures.DisallowTrailingMultiLineTernaryOperator: Ternary operator has to be reformatted when the operator is not leading the line (thanks to @esserj)SlevomatCodingStandard.Arrays.AlphabeticallySortedByKeys: Enforces natural sorting of array definitions by key in multi-line arrays (thanks to @bkdotcom)
🔧 Improvements
- Support for
phpstan/phpdoc-parser1.16 @phpcsSuppresscan be with comment- Support for
non-falsy-string,listandnon-empty-listtype hints SlevomatCodingStandard.Arrays.TrailingArrayComma: Support for "legacy"array()syntax (thanks to @bkdotcom)SlevomatCodingStandard.Complexity.Cognitive: DeprecatemaxComplexityand implementwarningThresholdanderrorThresholdoptions (thanks to @bkdotcom)SlevomatCodingStandard.Attributes.AttributeAndTargetSpacing: New optionallowOnSameLine(thanks to @stlrnz)SlevomatCodingStandard.Classes.RequireMultiLineMethodSignature: New optionminParameterCount(thanks to @janedbal)
🐛 Fixes
SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses: Fixer should not remove doc commentsSlevomatCodingStandard.ControlStructures.EarlyExit: Fixed detection of useless elseSlevomatCodingStandard.Variables.UselessVariable: Fixed false positiveSlevomatCodingStandard.PHP.OptimizedFunctionsWithoutUnpacking: Fixed false positive with first class callableSlevomatCodingStandard.Classes.RequireConstructorPropertyPromotion: Fixes using prefixed var phpdoc (thanks to @franmomu)
8.8.0
🔧 Improvements
- Support for unsealed array shapes
- Allow for the 1.0.0 version of the Composer PHPCS plugin (thanks to @jrfnl)
🐛 Fixes
SlevomatCodingStandard.Classes.RequireAbstractOrFinal: Fixed false positive for readonly classes- Fix typo in exception message (thanks to @jslmorrison)
8.7.1
8.7.0
🔧 Improvements
- Support for
phpstan/phpdoc-parser1.15 - Support for
phpstan/phpdoc-parser1.14 SlevomatCodingStandard.Attributes.AttributesOrder: New optionorderAlphabeticallySlevomatCodingStandard.Attributes.AttributesOrder: Attributes could be ordered by mask (thanks to @alexndlm)
🐛 Fixes
SlevomatCodingStandard.Attributes.AttributeAndTargetSpacing: Fixed fixer
8.6.4
🔧 Improvements
- Improved annotations parsing
SlevomatCodingStandard.Classes.ClassConstantVisibility: Added support for traits with constantsSlevomatCodingStandard.Classes.ConstantSpacing: Added support for traits with constants
🐛 Fixes
SlevomatCodingStandard.Attributes.DisallowAttributesJoining: Fix for attribute with trailing comma (thanks to @javer)
8.6.3
🐛 Fixes
Slevomat.Namespaces.ReferenceUsedNamesOnly: Fixed fixer when there's conflict withSlevomat.Namespaces.UnusedUsesSlevomatCodingStandard.Namespaces.FullyQualifiedClassNameInAnnotation: Fixed false positives forint<0, max>andint<min, 100>SlevomatCodingStandard.Attributes.AttributeAndTargetSpacing: Fixed false positive for comment after attribute
8.6.2
8.6.1
🔧 Improvements
- Support of
phpstan/phpdoc-parser1.12.0
🐛 Fixes
SlevomatCodingStandard.Namespaces.FullyQualifiedClassNameInAnnotation: Fixed false positives for global constantsSlevomatCodingStandard.Commenting.InlineDocCommentDeclaration: Fixed false positives for constants
8.6.0
🆕 New sniffs
- Added
SlevomatCodingStandard.Attributes.AttributesOrder - Added
SlevomatCodingStandard.Attributes.AttributeAndTargetSpacing - Added
SlevomatCodingStandard.Attributes.DisallowMultipleAttributesPerLine - Added
SlevomatCodingStandard.Attributes.DisallowAttributesJoining(thanks to @michnovka) - Added
SlevomatCodingStandard.Attributes.RequireAttributeAfterDocComment
🔧 Improvements
- Support of
phpstan/phpdoc-parser1.11.0 - Support for
@phpstan-self-out/@phpstan-this-out - Support for
@param-outannotation` - Support for
@templatewith default value - Add
devComposer keyword (thanks to @GaryJones)
🐛 Fixes
- Improved detection of references in double quotes strings