Update squizlabs/php_codesniffer in composer.json from ^2.5.1 to 3.3.1 #54
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.
Overview
The following dependencies have been updated by dependencies.io:
squizlabs/php_codesniffer
incomposer.json
from "^2.5.1" to "3.3.1"Details
squizlabs/php_codesniffer
This dependency is located in
composer.json
and was updated from "^2.5.1" to "3.3.1".3.0.0
This is the first stable release of the 3.0 branch, and is a large refactoring of the code base. It breaks backwards compatibility for all custom sniffs and custom reports. An upgrade guide for sniff and report developers is available here: https://github.com/squizlabs/PHP_CodeSniffer/wiki/Version-3.0-Upgrade-Guide
There are no future planned releases for the 2.x branch, but there may still be additional 2.9.x versions released for a time due to the number of changes required to upgrade custom sniffs for 3.0. The intention is to limit 2.9.x releases to serious bug and security fixes only.
Changes since 3.0.0RC4
Changes since 2.x
For a full list of changes from the 2.x version, please review the following changelogs:
https://github.com/squizlabs/PHP_CodeSniffer/releases/tag/3.0.0a1
https://github.com/squizlabs/PHP_CodeSniffer/releases/tag/3.0.0RC1
https://github.com/squizlabs/PHP_CodeSniffer/releases/tag/3.0.0RC2
https://github.com/squizlabs/PHP_CodeSniffer/releases/tag/3.0.0RC3
https://github.com/squizlabs/PHP_CodeSniffer/releases/tag/3.0.0RC4
3.0.1
Security Advisory
--filter=gitmodified
command line optionOther Changes
--stdin-path
CLI option to--help
--file-list
and--bootstrap
CLI options to--help
Runner::runPHPCS()
andRunner::runPHPCBF()
now return an exit code instead of exiting directly (request #1484)class_alias()
\Sniffs\
)MyProject\CS\Standard\Sniffs\Category
set the namespace toMyProject\CS\Standard
<ruleset name="My Coding Standard" namespace="MyProject\CS\Standard">
$config->unknown
3.0.2
--cache=/path/to/cachefile
CLI argument was not workingRunner::runPHPCS()
orRunner::runPHPCBF()
directly, you will get back the full range of exit codesDeepExitException
to get the error message ($e->getMessage()
) and exit code ($e->getCode()
)--suffix
argument// comment
before PHP close tag3.1.0
Unit Test Changes
phpunit --bootstrap=/path/to/phpcs/tests/bootstrap.php
Other Changes
phpcs.xml
orphpcs.xml.dist
file now takes precedence over the default_standard config settingphpcs.xml
andphpcs.xml.dist
files can now be prefixed with a dot (request #1566).phpcs.xml
,.phpcs.xml.dist
,phpcs.xml
,phpcs.xml.dist
OR
logic instead ofAND
logic--config-show
,--config-set
, and--config-delete
now includes the path to the loaded config file/**
are now always tokenized as docblocksT_YIELD
andT_YIELD_FROM
tokens have been replicated for older PHP versionsGeneric.CodeAnalysis.AssignmentInCondition
sniff to warn about variable assignments inside conditionsGeneric.Files.OneObjectStructurePerFile
sniff to ensure there is a single class/interface/trait per fileGeneric.Functions.FunctionCallArgumentSpacing
,PEAR.Functions.FunctionCallSignature
, andPSR2.Methods.FunctionCallSignature
Generic.Files.LineLength
can now be configured to ignore all comment lines, no matter their lengthignoreComments
property toTRUE
(default isFALSE
) in yourruleset.xml
file to enable thisGeneric.PHP.LowerCaseKeyword
now checks self, parent, yield, yield from, and closure (function) keywordsPEAR.Functions.FunctionDeclaration
now removes a blank line if it creates one by moving the curly brace during fixingSquiz.Commenting.FunctionCommentThrowTag
now supports PHP 7.1 multi catch exceptionsSquiz.Formatting.OperatorBracket
no longer throws errors for PHP 7.1 multi catch exceptionsSquiz.Commenting.LongConditionClosingComment
now supports finally statementsSquiz.Formatting.OperatorBracket
now correctly fixes pipe separated flagsSquiz.Formatting.OperatorBracket
now correctly fixes statements containing short array syntaxSquiz.PHP.EmbeddedPhp
now properly fixes cases where the only content in an embedded PHP block is a commentSquiz.WhiteSpace.ControlStructureSpacing
now ignores comments when checking blank lines at the top of control structuresSquiz.WhiteSpace.ObjectOperatorSpacing
now detects and fixes spaces around double colonsSquiz.WhiteSpace.MemberVarSpacing
can now be configured to check any number of blank lines between member varsspacing
property (default is1
) in yourruleset.xml
file to set the spacingSquiz.WhiteSpace.MemberVarSpacing
can now be configured to check a different number of blank lines before the first member varspacingBeforeFirst
property (default is1
) in yourruleset.xml
file to set the spacingPHP_CodeSniffer\Util\Tokens::$ooScopeTokens
static member var for quickly checking object scopeT_CLASS
,T_ANON_CLASS
,T_INTERFACE
, andT_TRAIT
PHP_CodeSniffer\Files\File::findExtendedClassName()
now supports extended interfaces3.2.0
Comment Syntax Changes
This release deprecates the
@codingStandards
comment syntax used for sending commands to PHP_CodeSniffer. The existing syntax will continue to work in all version 3 releases, but will be removed in version 4The comment formats have been replaced by a shorter syntax:
@codingStandardsIgnoreFile
becomesphpcs:ignoreFile
@codingStandardsIgnoreStart
becomesphpcs:disable
@codingStandardsIgnoreEnd
becomesphpcs:enable
@codingStandardsIgnoreLine
becomesphpcs:ignore
@codingStandardsChangeSetting
becomesphpcs:set
The new syntax allows for additional developer comments to be added after a
--
separator. This is useful for describing why a code block is being ignored, or why a setting is being changed. E.g.,// phpcs:disable -- This code block must be left as-is.
Comments using the new syntax are assigned new comment token types to allow them to be detected:
phpcs:ignoreFile
has the tokenT_PHPCS_IGNORE_FILE
phpcs:disable
has the tokenT_PHPCS_DISABLE
phpcs:enable
has the tokenT_PHPCS_ENABLE
phpcs:ignore
has the tokenT_PHPCS_IGNORE
phpcs:set
has the tokenT_PHPCS_SET
Other Changes
phpcs:disable
andphpcs:ignore
comments can now selectively ignore specific sniffs (request #604)// phpcs:disable Generic.Commenting.Todo.Found
for a specific message// phpcs:disable Generic.Commenting.Todo
for a whole sniff// phpcs:disable Generic.Commenting
for a whole category of sniffs// phpcs:disable Generic
for a whole standard// phpcs:disable Generic.Commenting.Todo,PSR1.Files
@codingStandardsIgnoreLine
comments now only ignore the following line if they are on a line by themselvesPSR1.Files.SideEffects
now respects the newphpcs:disable
comment syntaxphpcs:disable
andphpcs:enable
commentsphpcs:ignore
; you must wrap code structures with disable/enable commentsphpcs.xsd
to allow validation of ruleset XML files--stdin-path
can now point to fake file locations (request #1488)--basepath=
) on the CLI will now clear a basepath set directly in a rulesetAbstractVariableSniff
abstract sniff now supports anonymous classes and nested functionsSquiz.Scope.MemberVarScope
where member vars of anonymous classes were not being checkedAbstractArraySniff
to make it easier to create sniffs that check array formattingGeneric.Arrays.ArrayIndent
to enforce a single tab stop indent for array keys in multi-line arraysindent
property of the sniffGeneric.PHP.DiscourageGoto
to warn about the use of the GOTO language constructGeneric.Debug.ClosureLinter
was not running thegjslint
commandGeneric.WhiteSpace.DisallowSpaceIndent
now fixes space indents in multi-line block commentsGeneric.WhiteSpace.DisallowSpaceIndent
now fixes mixed space/tab indents more accuratelyGeneric.WhiteSpace.DisallowTabIndent
now fixes tab indents in multi-line block commentsPEAR.Functions.FunctionDeclaration
no longer errors when a function declaration is the first content in a JS filePEAR.Functions.FunctionCallSignature
now requires the function name to be indented to an exact tab stopPEAR.Functions.FunctionCallSignature.OpeningIndent
for this errorSquiz.Functions.FunctionDeclarationArgumentSpacing
is no longer confused about comments in function declarationsSquiz.PHP.NonExecutableCode
error messages now indicate which line the code block ending is onSquiz.Commenting.FunctionComment
now supports nullable type hintsSquiz.Commenting.FunctionCommentThrowTag
no longer assigns throw tags inside anon classes to the enclosing functionSquiz.WhiteSpace.SemicolonSpacing
now ignores semicolons used for empty statements inside FOR conditionsSquiz.ControlStructures.ControlSignature
now allows configuring the number of spaces before the colon in alternative syntaxrequiredSpacesBeforeColon
setting in a ruleset.xml file to change1
We didn't find any content for 3.1.1, 3.2.1, 3.2.2, 3.2.3, 3.3.0, or 3.3.1. Feel free to open an issue at https://github.com/dependencies-io/support to suggest any improvements.