Releases: slevomat/coding-standard
Releases · slevomat/coding-standard
8.1.0
🔧 Improvements
SlevomatCodingStandard.Classes.PropertyDeclaration
: New optioncheckPromoted
to enable check of promoted propertiesSlevomatCodingStandard.Classes.PropertyDeclaration
: New optionenableMultipleSpacesBetweenModifiersCheck
to enable check of spaces between property modifiersSlevomatCodingStandard.Classes.PropertyDeclaration
: Improved error messagesSlevomatCodingStandard.Classes.ForbiddenPublicProperty
: New optioncheckPromoted
to 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
never
type 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-type
in@psalm-var
SlevomatCodingStandard.PHP.RequireExplicitAssertion
: Ignore unsupported unofficial type hints
⚠️ BC breaks
SlevomatCodingStandard.TypeHints.PropertyTypeHintSpacing
renamed toSlevomatCodingStandard.Classes.PropertyDeclaration
SlevomatCodingStandard.Classes.ClassStructure
: Removed optionenableFinalMethods
- Removed error
SlevomatCodingStandard.Namespaces.UnusedUses.MismatchingCaseSensitivity
7.2.1
7.2.0
🆕 New sniffs
- Added
SlevomatCodingStandard.Functions.DisallowTrailingCommaInClosureUse
- Added
SlevomatCodingStandard.Functions.RequireTrailingCommaInClosureUse
🔧 Improvements
- Support for offset access type syntax in annotations
- Support for
@phpstan-assert
/@psalm-assert
annotations SlevomatCodingStandard.Whitespaces.DuplicateSpacesSniff
: New optionignoreSpacesInMatch
SlevomatCodingStandard.Functions.DisallowTrailingCommaInCall
: New optiononlySingleLine
SlevomatCodingStandard.Functions.DisallowTrailingCommaInDeclaration
: New optiononlySingleLine
🐛 Fixes
SlevomatCodingStandard.TypeHints.ReturnTypeHint
: Fixed internal errorSlevomatCodingStandard.ControlStructures.UselessIfConditionWithReturn
: Fixed internal errorSlevomatCodingStandard.Functions.RequireSingleLineCall
: Fixed false positiveSlevomatCodingStandard.Variables.UnusedVariable
: Resolve false positives with increment/decrement operators (thanks to @aadmathijssen)SlevomatCodingStandard.Variables.UnusedVariable
: allow increment/decrement operators after yield (thanks to @aadmathijssen)
7.1.0
⚠️ Removed support for PHP 7.1
🆕 New sniffs
- Added
SlevomatCodingStandard.Classes.RequireAbstractOrFinal
(thanks to @roslov) - Added
SlevomatCodingStandard.Exceptions.DisallowNonCapturingCatch
(thanks to @olsavmic)
🔧 Improvements
- Support for conditional types in annotations
SlevomatCodingStandard.Numbers.RequireNumericLiteralSeparator
: Added optionignoreOctalNumbers
SlevomatCodingStandard.Functions.FunctionLength
: New optionsincludeComments
andincludeWhitespace
(thanks to @bkdotcom)
7.0.20
🐛 Fixes
SlevomatCodingStandard.TypeHints.ReturnTypeHint
: Improved - Type alias should not be reported as "missing traversable type hint specification"SlevomatCodingStandard.TypeHints.ParameterTypeHint
: Improved - Type alias should not be reported as "missing traversable type hint specification"SlevomatCodingStandard.TypeHints.PropertyTypeHint
: Improved - Type alias should not be reported as "missing traversable type hint specification"SlevomatCodingStandard.TypeHints.ReturnTypeHint
: It was not possible to suppress some errorsSlevomatCodingStandard.Classes.ParentCallSpacing
: Fixed false positive
7.0.19
🐛 Fixes
SlevomatCodingStandard.TypeHints.PropertyTypeHint
: Type alias should not be reported as "missing traversable type hint specification"SlevomatCodingStandard.TypeHints.ParameterTypeHint
: Type alias should not be reported as "missing traversable type hint specification"SlevomatCodingStandard.TypeHints.ReturnTypeHint
: Type alias should not be reported as "missing traversable type hint specification"SlevomatCodingStandard.ControlStructures.RequireYodaComparison
: Fixed false positives withmatch
SlevomatCodingStandard.ControlStructures.DisallowYodaComparison
: Fixed false positives withmatch
SlevomatCodingStandard.Commenting.DocCommentSpacing
: Fixed internal errorSlevomatCodingStandard.Variables.UnusedVariable
: Fixed false positiveSlevomatCodingStandard.Variables.UnusedVariable
: Fixed missing report when optionignoreUnusedValuesWhenOnlyKeysAreUsedInForeach
is enabledSlevomatCodingStandard.Functions.RequireTrailingCommaInCall
: Fixed false positiveReferencedNameHelper
: Fixed searching of class references in heredoc- Ignore invalid
@template
and@type
annotations
7.0.18
7.0.17
🐛 Fixes
SlevomatCodingStandard.Namespaces.UnusedUses
: Improved detection of relative name in generic annotationSlevomatCodingStandard.Classes.ClassConstantVisibility
: Added support for final constantsSlevomatCodingStandard.Functions.RequireTrailingCommaInCall
: Skip instances on same line as closing parenthesis (thanks to @donatj)