Update dependency squizlabs/php_codesniffer to v3.5.0 #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.4.2
->3.5.0
Release Notes
squizlabs/PHP_CodeSniffer
v3.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 if you modify the PR title to begin with "
rebase!
".🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Renovate Bot. View repository job log here.