This repository has been archived by the owner on Aug 9, 2024. It is now read-only.
Update dependency squizlabs/php_codesniffer to v3.7.2 #24
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
3.5.5
->3.7.2
Release Notes
squizlabs/PHP_CodeSniffer (squizlabs/php_codesniffer)
v3.7.2
Compare Source
v3.7.1
Compare Source
v3.7.0
Compare Source
PHP 8.1 Language Feature Support
PHP_CodeSniffer has run correctly under PHP 8.1 since PHP 8 support was added, but it has not supported new 8.1 language features until this release. Version 3.7.0 adds support for the following PHP 8.1 language features:
never
typeChangelog
T_ENUM_CASE
token to represent the case statements inside an enumT_TYPE_INTERSECTION
token to represent the ampersand character inside intersection typesFile::getMethodParameters
now supports the new PHP 8.1 readonly tokenproperty_readonly
array index is included in the return valuereadonly_token
array index is included in the return valueGeneric.PHP.LowerCaseKeyword
PSR2.Classes.PropertyDeclaration
Squiz.Commenting.BlockComment
Squiz.Commenting.DocCommentAlignment
Squiz.Commenting.VariableComment
Squiz.WhiteSpace.ScopeKeywordSpacing
Generic.PHP.UpperCaseConstant
andGeneric.PHP.LowerCaseConstant
now ignore type declarationstrue
/false
/null
when used as valuesGeneric.PHP.LowerCaseType
now supports the PHP 8.1never
type@throw
T_GOTO_LABEL
${
v3.6.2
Compare Source
v3.6.1
Compare Source
Generic.Files.ExecutableFile
Generic.Files.LowercasedFilename
Generic.Files.LineEndings
Generic.Files.EndFileNewline
Generic.Files.EndFileNoNewline
Generic.PHP.ClosingPHPTag
Generic.PHP.Syntax
Generic.VersionControl.GitMergeConflict
Generic.WhiteSpace.DisallowSpaceIndent
Generic.WhiteSpace.DisallowTabIndent
T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG
andT_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG
are unsuedT_BITWISE_AND
for all PHP versionsFile::getMethodParameters()
no longer incorrectly returns argument attributes in the type hint array indexhas_attributes
array index is available and set toTRUE
if the argument has attributes definedGeneric.NamingConventions.ConstructorName
no longer throws deprecation notices on PHP 8.1Squiz.Commenting.BlockComment
now correctly applies rules for block comments after a short echo tagPEAR.Commenting.FunctionComment
Squiz.Commenting.InlineComment
Squiz.Commenting.BlockComment
Squiz.Commenting.VariableComment
Squiz.WhiteSpace.MemberVarSpacing
v3.6.0
Compare Source
PHP 8 Language Feature Support
PHP_CodeSniffer has run under PHP 8 for some time, but it has not supported all new language features until this release. Version 3.6.0 adds support for all new PHP 8 language features, including:
Changelog
T_TYPE_UNION
token is available to represent the pipe characterFile::getMethodParameters()
,getMethodProperties()
, andgetMemberProperties()
will now return union typesT_PARAM_NAME
token is available to represent the label with the name of the function argument in itT_ATTRIBUTE
token marks the start of an attributeT_ATTRIBUTE_END
token is available to mark the end of an attributeattribute_owner
andattribute_closer
indexes are available in the tokens array for all tokens inside an attributePEAR.Commenting.ClassComment
PEAR.Commenting.FileComment
PSR1.Files.SideEffects
PSR12.Files.FileHeader
Squiz.Commenting.ClassComment
Squiz.Commenting.FileComment
Squiz.WhiteSpace.FunctionSpacing
T_MATCH
token to process match expressionsT_MATCH_ARROW
token is available to represent the arrows in match expressionsT_MATCH_DEFAULT
token is available to represent the default keyword in match expressionsGeneric.CodeAnalysis.AssignmentInCondition
Generic.CodeAnalysis.EmptyPHPStatement
Generic.CodeAnalysis.EmptyStatement
Generic.PHP.LowerCaseKeyword
PEAR.ControlStructures.ControlSignature
PSR12.ControlStructures.BooleanOperatorPlacement
Squiz.Commenting.LongConditionClosingComment
Squiz.Commenting.PostStatementComment
Squiz.ControlStructures.LowercaseDeclaration
Squiz.ControlStructures.ControlSignature
Squiz.Formatting.OperatorBracket
Squiz.PHP.DisallowMultipleAssignments
Squiz.Objects.ObjectInstantiation
Squiz.WhiteSpace.ControlStructureSpacing
T_FN_ARROW
token has changed from "T_FN_ARROW" to "PHPCS_T_FN_ARROW" to avoid package conflictsT_FN_ARROW
constantFile::findStartOfStatement()
now works correctly when passed the last token in a statementFile::getMethodParameters()
now supports PHP 8.0 constructor property promotionproperty_visibility
andvisibility_token
index if property promotion is detectedFile::getMethodProperties()
now includes areturn_type_end_token
index in the return value--stdin-path
--stdin-path
to set the file pathGeneric.NamingConventions.AbstractClassNamePrefix
to enforce that class names are prefixed with "Abstract"Generic.NamingConventions.InterfaceNameSuffix
to enforce that interface names are suffixed with "Interface"Generic.NamingConventions.TraitNameSuffix
to enforce that trait names are suffixed with "Trait"Generic.CodeAnalysis.UnusedFunctionParameter
can now be configured to ignore variable usage for specific type hintsignoreTypeHints
array property to a list of type hints to ignoreGeneric.Formatting.MultipleStatementAlignment
can now align statements at the start of the assignment tokenalignAtEnd
sniff property tofalse
to align the assignment tokenstrue
, so the assigned values are alignedGeneric.PHP.LowerCaseType
now supports checking of typed propertiesGeneric.PHP.LowerCaseType
now supports checking of union typesPEAR.Commenting.FunctionComment
andSquiz.Commenting.FunctionComment
sniffs can now ignore private and protected methodsminimumVisibility
sniff property toprotected
to ignore private methodsminimumVisibility
sniff property topublic
to ignore both private and protected methodsprivate
, so all methods are checkedPEAR.Commenting.FunctionComment
andSquiz.Commenting.FunctionComment
sniffs can now ignore return tags in any method__construct
and__destruct
were ignoredspecialMethods
sniff property__construct
and__destruct
onlyPSR2.ControlStructures.SwitchDeclaration
now supports nested switch statements where every branch terminatesCASE
only contained aSWITCH
and no direct terminating statement, a fall-through error was displayedSWITCH
has a terminating statementPSR2.Methods.FunctionCallSignature.SpaceBeforeCloseBracket
error message is now reported on the closing parenthesis tokenSquiz.Commenting.FunctionComment
is now able to ignore function comments that are only inheritdoc statementsskipIfInheritdoc
sniff property totrue
to skip checking function comments if the content is only{@​inhertidoc}
false
, so these comments will continue to report errorsSquiz.Commenting.FunctionComment
now supports the PHP 8 mixed typeSquiz.PHP.NonExecutableCode
now has improved handling of syntax errorsSquiz.WhiteSpace.ScopeKeywordSpacing
now checks spacing when using PHP 8.0 constructor property promotionis_readable()
Squiz.PHP.DisallowMultipleAssignments
sniffv3.5.8
Compare Source
v3.5.7
Compare Source
T_NULLSAFE_OBJECT_OPERATOR
token has been made available for older versionsT_OBJECT_OPERATOR
have been modified to apply the same rules for the nullsafe object operatorPSR12.ControlStructures.BooleanOperatorPlacement.FoundMixed
error message is now more accurate when using the allowOnly settingPSR12.Functions.NullableTypeDeclaration
now supports the PHP8 static return typeSquiz.Formatting.OperatorBracket
false positive when exiting with a negative numberSquiz.PHP.DisallowComparisonAssignment
false positive for methods called on an objectv3.5.6
Compare Source
File::getMethodProperties()
now detects the PHP 8.0 static return typeGeneric.NamingConventions.CamelCapsFunctionName
no longer reports__serialize
and__unserialize
as invalid namesPEAR.NamingConventions.ValidFunctionName
no longer reports__serialize
and__unserialize
as invalid namesSquiz.Scope.StaticThisUsage
now detects usage of$this
inside closures and arrow functionsConfiguration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Mend Renovate. View repository job log here.