Update dependency squizlabs/php_codesniffer to v3.5.4 #33
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.4.2
->3.5.4
Release Notes
squizlabs/PHP_CodeSniffer
v3.5.4
Compare Source
File::getCondition()
now accepts a 3rd argument that allows for the closest matching token to be returnedGeneric.PHP.DisallowRequestSuperglobal
to ban the use of the$_REQUEST
superglobalGeneric.ControlStructures.InlineControlStructure
no longer shows errors forwhile
andfor
statements without a bodyPSR12.ControlStructures.BooleanOperatorPlacement
can now be configured to enforce a specific operator positionallowOnly
property tofirst
to enforce all boolean operators to be at the start of a lineallowOnly
property tolast
to enforce all boolean operators to be at the end of a linePSR12.Files.ImportStatement
now auto-fixes import statements by removing the leading slashSquiz.ControlStructures.ForLoopDeclaration
now has a setting to ignore newline charactersFALSE
, so newlines are not allowed withinfor
definitionsignoreNewlines
setting in aruleset.xml
file to changeSquiz.PHP.InnerFunctions
now handles multiple nested anon classes correctlyv3.5.3
Compare Source
T_FN
token has been made available for older versionsT_FN
represents thefn
string used for arrow functionsT_FN_ARROW
token typefn
will have aT_FN token
for the function name, but have no scope information1_000
would tokenize asT_LNUMBER (1), T_STRING (_000)
T_LNUMBER (1_000)
File::getMethodParameters()
now supports arrow functionsFile::getMethodProperties()
now supports arrow functionsFixer::changeCodeBlockIndent()
to change the indent of a code block while auto-fixingGeneric.Files.ExecutableFile
sniffGeneric.CodeAnalysis.EmptyPhpStatement
now reports unnecessary semicolons after control structure closing bracesGeneric.PHP.LowerCaseKeyword
now enforces that thefn
keyword is lowercaseGeneric.WhiteSpace.ScopeIndent
now supports static arrow functionsPEAR.Functions.FunctionCallSignature
now adjusts the indent of function argument contents during auto-fixingPSR2.Methods.FunctionCallSignature
PSR2.ControlStructures.ControlStructureSpacing
now checks whitespace before the closing parenthesis of multi-line control structuresPSR12.Functions.ReturnTypeDeclaration
now checks the return type of arrow functionsPSR12.Traits.UseDeclaration
now ensures all trait import statements are grouped togetherSquiz.Functions.LowercaseFunctionKeywords
now enforces that thefn
keyword is lowercasev3.5.2
Compare Source
v3.5.1
Compare Source
--report=diff
and-vvv
command line argumentsPEAR.Functions.FunctionCallSignature.FirstArgumentPosition
PSR2.Methods.FunctionCallSignature.FirstArgumentPosition
PSR12.ControlStructures.BooleanOperatorPlacement
no longer complains when multiple expressions appear on the same linePSR12.Files.FileHeader
no longer ignores comments preceding ause
,namespace
, ordeclare
statementPSR12.Files.FileHeader
now allows a hashbang line at the top of the filev3.5.0
Compare Source
PSR-12 Standard Ready
PHP_CodeSniffer has included an in-progress PSR-12 standard since 3.3.0, but this release includes the completed standard. You can now check your code using the PSR-12 standard:
Most of the errors found can also be automatically fixed by PHPCBF:
Changelog
T_NULLABLE
inside property types, as it is elsewhereFile::getMemberProperties()
method, which now contains atype
array index?
type_token
array indextype_end_token
array indexnullable_type
array index will also be set toTRUE
--filter=gitstaged
to check these filesphpcs.xsd
schema now validatesphpcs-only
andphpcbf-only
attributes correctlyFile
class now throwRuntimeException
instead ofTokenizerException
RuntimeExpection
but now correctly throwTokenizerException
File::getMethodParameters()
method now returns more information, and supports closure USE groupstype_hint_end_token
array indexdefault_token
array indexdefault_equal_token
array indexcomma_token
array indexreference_token
array indexvariadic_token
array indexT_LIST
token and it's opening and closing parentheses now contain references to each other in the tokens arrayT_ANON_CLASS
token and it's opening and closing parentheses now contain references to each other in the tokens arrayT_BAD_CHARACTER
token has been made available for older versionsSquiz.WhiteSpace.FunctionSpacing
info
report to see blank lines before/after functionsSquiz.WhiteSpace.MemberVarSpacing
info
report to see blank lines before member varsGeneric.ControlStructures.DisallowYodaConditions
sniffGeneric.PHP.RequireStrictTypes
sniffGeneric.WhiteSpace.SpreadOperatorSpacingAfter
sniffPSR12.Classes.AnonClassDeclaration
sniffPSR12.Classes.ClosingBrace
sniffPSR12.ControlStructures.BooleanOperatorPlacement
sniffPSR12.ControlStructures.ControlStructureSpacing
sniffPSR12.Files.DeclareStatement
sniffPSR12.Files.FileHeader
sniffPSR12.Files.ImportStatement
sniffPSR12.Files.OpenTag
sniffPSR12.Functions.ReturnTypeDeclaration
sniffPSR12.Properties.ConstantVisibility
sniffPSR12.Traits.UseDeclaration
sniffGeneric.Files.LineLength
ignoreComments
property now ignores comments at the end of a lineGeneric.Files.LineLength
now only ignores unwrappable comments when the comment is on a line by itselfGeneric.Functions.FunctionCallArgumentSpacing
no longer checks spacing around assignment operators inside function callsSquiz.WhiteSpace.OperatorSpacing
sniff to enforce spacing around assignment operatorsGeneric.Functions.FunctionCallArgumentSpacing.NoSpaceBeforeEquals
error has been removedSquiz.WhiteSpace.OperatorSpacing.NoSpaceBefore
insteadGeneric.Functions.FunctionCallArgumentSpacing.NoSpaceAfterEquals
error has been removedSquiz.WhiteSpace.OperatorSpacing.NoSpaceAfter
insteadGeneric.WhiteSpace.ScopeIndent
no longer performs exact indents checking for chained method callsPEAR.WhiteSpace.ObjectOperatorIndent
now supports multi-level chained statementsmultilevel
setting toTRUE
in aruleset.xml
file to enable this behaviourPSR2.ControlStructures.ControlStructureSpacing
now allows whitespace after the opening parenthesis if followed by a commentPSR2.Classes.PropertyDeclaration
now enforces a single space after a property type keywordSquiz.Commenting.BlockComment
no longer requires blank line before comment if it's the first content after the PHP open tagSquiz.Functions.FunctionDeclarationArgumentSpacing
now has more accurate error messagesSpaceAfterDefault
error code toSpaceAfterEquals
, which reflects the real errorSquiz.Functions.FunctionDeclarationArgumentSpacing
now checks for no space after a reference operatorSpacingAfterReference
error message in a ruleset.xml fileSquiz.Functions.FunctionDeclarationArgumentSpacing
now checks for no space after a variadic operatorSpacingAfterVariadic
error message in aruleset.xml
fileSquiz.Functions.MultiLineFunctionDeclaration
now has improved fixing for theFirstParamSpacing
andUseFirstParamSpacing
errorsSquiz.Operators.IncrementDecrementUsage
now suggests pre-increment of variables instead of post-incrementSquiz.PHP.DisallowMultipleAssignments
now has a second error code for when assignments are found inside control structure conditionsSquiz.PHP.DisallowMultipleAssignments.FoundInControlStructure
Squiz.PHP.DisallowMultipleAssignments.Found
Squiz.WhiteSpace.FunctionSpacing
now appliesbeforeFirst
andafterLast
spacing rules to nested functionsSquiz.WhiteSpace.OperatorSpacing
now has improved handling of parse errorsSquiz.WhiteSpace.OperatorSpacing
now checks spacing around theinstanceof
operatorSquiz.WhiteSpace.OperatorSpacing
can now enforce a single space before assignment operatorsignoreSpacingBeforeAssignments
sniff property toFALSE
to enable checkingTRUE
, so spacing before assignments is not checked by defaultRenovate configuration
📅 Schedule: 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 WhiteSource Renovate. View repository job log here.