Update dependency wimg/php-compatibility to v9 #29
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:
^8
->^9
Release Notes
PHPCompatibility/PHPCompatibility (wimg/php-compatibility)
v9.3.5
Compare Source
See all related issues and PRs in the [9.3.5 milestone].
Added
PHPCompatibility.Classes.NewClasses
sniff: recognize the newFFI
extension related classes as introduced in PHP 7.4. #949PHPCompatibility.IniDirectives.NewIniDirectives
sniff: detect use of the newFFI
extension related ini directives as introduced in PHP 7.4. #949Changed
PHPCompatibility.Syntax.NewShortArray
: improved clarity of the error message and made it consistent with other error messages in this standard. #934PHPCompatibility.Interfaces.NewInterfaces
: updated the URL which is mentioned in select error messages. #942For running the sniffs on PHP 7.4, it is recommended to use PHP_CodeSniffer 3.5.0+ as PHP_CodeSniffer itself is
not compatible with PHP 7.4 until version 3.5.0.
Fixed
PHPCompatibility.Classes.NewClasses
: two new PHP 7.4 classes were being checked as if they were Exceptions. #945Credits
Thanks go out to [William Entriken] for their contribution to this version. 👏
v9.3.4
Compare Source
See all related issues and PRs in the [9.3.4 milestone].
Fixed
PHPCompatibility.Keywords.ForbiddenNames
: false positive for list when used in aforeach()
condition. #930. Fixes #928, #929Credits
Thanks go out to [Sergii Bondarenko] for their contribution to this version. 👏
v9.3.3
Compare Source
See all related issues and PRs in the [9.3.3 milestone].
Added
PHPCompatibility.Constants.NewConstants
sniff: detection of yet more (undocumented) PHP 7.2 Sodium constants. #924PHPCompatibility.Keywords.ForbiddenNames
sniff: detect the use of more reserved keywords which are not allowed to be used to name certain constructs. #923. Fixes #922Fixed
PHPCompatibility.FunctionNameRestrictions.RemovedPHP4StyleConstructors
: false positive detecting PHP4-style constructors when declared in interfaces. The class implementing the interface will not have the same name as the interface, so the actual method would not be regarded as a PHP4 style constructor. #921Credits
Thanks go out to [Nikhil] for their contribution to this version. 👏
v9.3.2
Compare Source
See all related issues and PRs in the [9.3.2 milestone].
Added
PHPCompatibility.Constants.NewConstants
sniff: detection of the PHP 7.2SODIUM_CRYPTO_PWHASH_ALG_ARGON2ID13
constant. #915Changed
PHPCompatibility.FunctionNameRestrictions.RemovedPHP4StyleConstructors
: minor efficiency fix to make the sniff faster. #912PHPCompatibility.FunctionNameRestrictions.ReservedFunctionNames
: functions marked as@deprecated
in the function docblock will now be ignored by this sniff. #917. Fixes #911PHPCompatibility.FunctionDeclarations.ForbiddenToStringParameters
: the$ooScopeTokens
property is nowprotected
, it should never have beenpublic
in the first place. #907Fixed
PHPCompatibility.FunctionUse.OptionalToRequiredFunctionParameters
: false positive when a class is instantiated which has the same name as one of the affected functions. #914. Fixes #913PHPCompatibility.FunctionUse.RequiredToOptionalFunctionParameters
: false positive when a class is instantiated which has the same name as one of the affected functions. #914PHPCompatibility.MethodUse.NewDirectCallsToClone
: false positive on calling__clone()
from within the class being cloned #910. Fixes #629 (comment)PHPCompatibility.Miscellaneous.ValidIntegers
: binary numbers using an uppercaseB
were not always recognized correctly. #909v9.3.1
Compare Source
See all related issues and PRs in the [9.3.1 milestone].
Changed
Fixed
PHPCompatibility.ParameterValues.RemovedImplodeFlexibleParamOrder
: false positive when an array item in the second parameter contained a ternary. #891. Fixes #890PHPCompatibility.ParameterValues.RemovedImplodeFlexibleParamOrder
: will now take array casts into account when determining which parameter is$pieces
. #891.PHPCompatibility.ParameterValues.RemovedImplodeFlexibleParamOrder
: hardening of the logic to not examine the second parameter when the first is just and only a text string ($glue
). #891.v9.3.0
Compare Source
See all related issues and PRs in the [9.3.0 milestone].
To keep informed of the progress of covering "everything PHP 7.4" in PHPCompatibility, please subscribe to issue #808.
Changes expected in PHPCompatibility 10.0.0
The next version of PHPCompatibility is expected to include a new external dependency.
In this same release, support for PHP < 5.4 and PHP_CodeSniffer < 2.6.0 will be dropped.
The
10.0.0
release is expected around the same time as the release of PHP 7.4 - end of November/beginning of December 2019.Added
PHPCompatibility.Miscellaneous.NewPHPOpenTagEOF
sniff to detect a stand-alone PHP open tag at the end of a file, without trailing newline, as will be supported as of PHP 7.4. #843PHPCompatibility.ParameterValues.ForbiddenStripTagsSelfClosingXHTML
sniff to detect calls tostrip_tags()
passing self-closing XHTML tags in the$allowable_tags
parameter. This has not been supported since PHP 5.3.4. #866PHPCompatibility.ParameterValues.NewHTMLEntitiesEncodingDefault
sniff to detect calls tohtml_entity_decode()
,htmlentities()
andhtmlspecialchars()
which are impacted by the change to the default value of the$encoding
parameter in PHP 5.4. #862PHPCompatibility.ParameterValues.NewIconvMbstringCharsetDefault
sniff to detect code impacted by the change in thedefault_charset
value in PHP 5.6. #864 Fixes #839PHPCompatibility.ParameterValues.NewIDNVariantDefault
sniff to detect calls toidn_to_ascii()
andidn_to_utf8()
impacted by the PHP 7.4 change in the default value for the$variant
parameter. #861PHPCompatibility.ParameterValues.NewPasswordAlgoConstantValues
sniff to detect calls topassword_hash()
andpassword_needs_rehash()
impacted by the changed value of thePASSWORD_DEFAULT
,PASSWORD_BCRYPT
,PASSWORD_ARGON2I
andPASSWORD_ARGON2ID
constants in PHP 7.4. #865PHPCompatibility.ParameterValues.NewProcOpenCmdArray
sniff to detect calls toproc_open()
passing an array for the$cmd
parameter as supported as of PHP 7.4. #869PHPCompatibility.ParameterValues.NewStripTagsAllowableTagsArray
sniff to detect calls tostrip_tags()
passing an array for the$allowable_tags
parameter as will be supported as of PHP 7.4. #867PHPCompatibility.ParameterValues.RemovedImplodeFlexibleParamOrder
sniff to detectimplode()
being called with$glue
and$pieces
in reverse order from the documented argument order. This was previously allowed for historical reasons, but will be deprecated in PHP 7.4. #846PHPCompatibility.ParameterValues.RemovedMbStrrposEncodingThirdParam
sniff to detect the$encoding
being passed as the third, instead of the fourth parameter, tomb_strrpos()
as has been soft deprecated since PHP 5.2 and will be hard deprecated as of PHP 7.4. #860PHPCompatibility.Syntax.RemovedCurlyBraceArrayAccess
sniff to detect array and string offset access using curly braces as will be deprecated as of PHP 7.4. #855PHPCompatibility.TextStrings.NewUnicodeEscapeSequence
sniff to detect use of the PHP 7.0+ unicode codepoint escape sequences and issues with invalid sequences. #856PHPCompatibility.Upgrade.LowPHP
sniff to give users of old PHP versions advance warning when support will be dropped in the near future. #838At this moment, the intention is to drop support for PHP 5.3 by the end of this year.
PHPCompatibility.Classes.NewClasses
sniff: recognize the newWeakReference
class as introduced in PHP 7.4. #857PHPCompatibility.Constants.NewConstants
sniff: detection of new Curl constants as introduced in PHP 7.3.5. #878PHPCompatibility.Constants.NewConstants
sniff: detection of the revivedT_BAD_CHARACTER
constant as re-introduced in PHP 7.4. #882PHPCompatibility.Constants.NewConstants
sniff: detection of the newIMG_FILTER_SCATTER
andPASSWORD_ARGON2_PROVIDER
constants as introduced in PHP 7.4. #887PHPCompatibility.Constants.RemovedConstants
sniff: detection of use of theCURLPIPE_HTTP1
constant which will be deprecated in PHP 7.4. #879PHPCompatibility.Constants.RemovedConstants
sniff: detection of use of theFILTER_SANITIZE_MAGIC_QUOTES
constant which will be deprecated in PHP 7.4. #845PHPCompatibility.Constants.RemovedConstants
sniff: detection of use of theT_CHARACTER
andT_BAD_CHARACTER
constants which were removed in PHP 7.0. #882PHPCompatibility.FunctionDeclarations.NewMagicMethods
sniff: recognize the new__serialize()
and__unserialize()
magic methods as introduced in PHP 7.4. #868PHPCompatibility.FunctionDeclarations.NewMagicMethods
sniff: recognize the PHP 5.0__construct()
and__destruct()
magic methods. #884PHPCompatibility.FunctionDeclarations.NonStaticMagicMethods
sniff: recognize the new__serialize()
and__unserialize()
magic methods as introduced in PHP 7.4. #868PHPCompatibility.FunctionUse.NewFunctions
sniff: recognize the new PHP 7.4 functionimagecreatefromtga()
. #873PHPCompatibility.FunctionUse.RemovedFunctionParameters
sniff: recognize the deprecation of the$age
parameter of thecurl_version()
function. #874PHPCompatibility.FunctionUse.RemovedFunctions
sniff: recognize the PHP 7.4 deprecatedconvert_cyr_string()()
,ezmlm_hash()
,get_magic_quotes_gpc()
,get_magic_quotes_runtime()
,hebrevc()
,is_real()
,money_format()
andrestore_include_path()
functions. #847PHPCompatibility.IniDirectives.NewIniDirectives
sniff: detect use of the new PHP 7.4zend.exception_ignore_args
ini directive. #871PHPCompatibility.IniDirectives.RemovedIniDirectives
sniff: detect use of theallow_url_include
ini directive which is deprecated as of PHP 7.4. #870PHPCompatibility.IniDirectives.RemovedIniDirectives
sniff: detection of use of theopcache.load_comments
directive which was removed in PHP 7.0. #883PHPCompatibility.ParameterValues.NewHashAlgorithms
: recognize use of the new PHP 7.4crc32c
hash algorithm. #872PHPCompatibility.TypeCasts.RemovedTypeCasts
sniff: detect usage of the(real)
type cast which will be deprecated in PHP 7.4. #844recode
extension functionality which will be removed in PHP 7.4 (moved to PECL) in theRemovedExtensions
andRemovedFunctions
sniffs. #841OPcache
extension functionality which was be introduced in PHP 5.5, but not yet fully accounted for in theNewFunctions
andNewIniDirectives
sniffs. #883getCompleteTextString()
utility method to thePHPCompatibility\Sniff
class. #856PHPCompatibility.Upgrade.LowPHPCS
sniff.PHPCompatibility.ParameterValues.NewNegativeStringOffset
,PHPCompatibility.ParameterValues.RemovedMbStringModifiers
and sniffs. #876, #877CONTRIBUTING.md
: Added a list of typical sources for information about changes to PHP. #875Changed
PHPCompatibility.FunctionDeclarations.NewExceptionsFromToString
sniff: the sniff will now also examine the function docblock, if available, and will throw an error when a@throws
tag is found in the docblock. #880. Fixes #863PHPCompatibility.FunctionDeclarations.NonStaticMagicMethods
sniff: will now also check the visibility andstatic
(or not) requirements of the magic__construct()
,__destruct()
,__clone()
,__debugInfo()
,__invoke()
and__set_state()
methods. #885PHPCompatibility.Syntax.NewArrayStringDereferencing
sniff: the sniff will now also recognize array string dereferencing using curly braces as was (silently) supported since PHP 7.0. #851PHPCompatibility.Syntax.NewClassMemberAccess
sniff: the sniff will now also recognize class member access on instantiation and cloning using curly braces as was (silently) supported since PHP 7.0. #852PHPCompatibility.Syntax.NewFunctionArrayDereferencing
sniff: the sniff will now also recognize function array dereferencing using curly braces as was (silently) supported since PHP 7.0. #853Fixed
PHPCompatibility.FunctionDeclarations.ForbiddenParametersWithSameName
sniff: variable names are case-sensitive, so recognition of same named parameters should be done in a case-sensitive manner. #848PHPCompatibility.FunctionDeclarations.NewExceptionsFromToString
sniff: Exceptions thrown within atry
should not trigger the sniff. #880. Fixes #863PHPCompatibility.FunctionDeclarations.NewExceptionsFromToString
sniff: the$ooScopeTokens
property should never have been a public property. #880.PHPCompatibility.Operators.RemovedTernaryAssociativity
sniff were not being run. #836v9.2.0
Compare Source
See all related issues and PRs in the [9.2.0 milestone].
To keep informed of the progress of covering "everything PHP 7.4" in PHPCompatibility, please subscribe to issue #808.
Added
PHPCompatibility.Classes.ForbiddenAbstractPrivateMethods
sniff to detect methods declared as bothprivate
as well asabstract
. This was allowed between PHP 5.0.0 and 5.0.4, but disallowed in PHP 5.1 as the behaviour ofprivate
andabstract
are mutually exclusive. #822PHPCompatibility.Classes.NewTypedProperties
sniff to detect PHP 7.4 typed property declarations. #801, #829PHPCompatibility.Classes.RemovedOrphanedParent
sniff to detect the use of theparent
keyword in classes without a parent (non-extended classes). This code pattern is deprecated in PHP 7.4 and will become a compile-error in PHP 8.0. #818PHPCompatibility.FunctionDeclarations.NewExceptionsFromToString
sniff to detect throwing exceptions from__toString()
methods. This would previously result in a fatal error, but will be allowed as of PHP 7.4. #814PHPCompatibility.FunctionDeclarations.ForbiddenToStringParameters
sniff to detect__toString()
function declarations expecting parameters. This was disallowed in PHP 5.3. #815PHPCompatibility.MethodUse.ForbiddenToStringParameters
sniff to detect direct calls to__toString()
magic methods passing parameters. This was disallowed in PHP 5.3. #830PHPCompatibility.Operators.ChangedConcatOperatorPrecedence
sniff to detect code affected by the upcoming change in operator precedence for the concatenation operator. The concatenation operator precedence will be lowered in PHP 8.0, with deprecation notices for code affected being thrown in PHP 7.4. #805PHPCompatibility.Operators.RemovedTernaryAssociativity
sniff to detect code relying on left-associativity of the ternary operator. This behaviour will be deprecated in PHP 7.4 and removed in PHP 8.0. #810PHPCompatibility.Syntax.NewArrayUnpacking
sniff to detect the use of the spread operator to unpack arrays when declaring a new array, as introduced in PHP 7.4. #804PHPCompatibility.Classes.NewClasses
sniff: recognize the newReflectionReference
class as introduced in PHP 7.4. #820PHPCompatibility.Constants.NewConstants
sniff: detection of the new PHP 7.4 Core (Standard), MBString, Socket and Tidy constants. #821PHPCompatibility.FunctionUse.NewFunctions
sniff: detect usage of the new PHP 7.4get_mangled_object_vars()
,mb_str_split()
,openssl_x509_verify()
,password_algos()
,pcntl_unshare()
,sapi_windows_set_ctrl_handler()
andsapi_windows_generate_ctrl_event()
functions. #811, #819, #827PHPCompatibility.FunctionUse.NewFunctions
sniff: recognize the new OCI functions as introduced in PHP 7.2.14 and PHP 7.3.1. #786PHPCompatibility.FunctionUse.RemovedFunctions
sniff: recognize the PHP 7.4 deprecatedldap_control_paged_result_response()
andldap_control_paged_result()
functions. #831PHPCompatibility.FunctionUse.RemovedFunctions
sniff: recognize thePayflow Pro/pfpro
functions as removed in PHP 5.1. #823PHPCompatibility.FunctionUse.RequiredToOptionalFunctionParameters
sniff: account for the parameters forarray_merge()
andarray_merge_recursive()
becoming optional in PHP 7.4. #817PHPCompatibility.IniDirectives.RemovedIniDirectives
sniff: recognize thePayflow Pro/pfpro
ini directives as removed in PHP 5.1. #823interbase/Firebird
extension functionality which will be removed in PHP 7.4 (moved to PECL) in theRemovedConstants
,RemovedExtensions
,RemovedFunctions
andRemovedIniDirectives
sniffs. #807wddx
extension functionality which will be removed in PHP 7.4 (moved to PECL) in theRemovedExtensions
andRemovedFunctions
sniffs. #826isShortTernary()
andisUnaryPlusMinus()
utility methods to thePHPCompatibility\Sniff
class. #810, #805Changed
PHPCompatibility.Extensions.RemovedExtensions
sniff will now only report on the removedPayflow Pro
extension when a function usespfpro_
as a prefix. Previously, it used thepfpro
prefix (without underscore) for detection. #812T_ELLIPSIS
token, i.e. the spread operator, is detected. #803PHP 7.4 adds a third use-case for the spread operator. The adjusted error message accounts for this.
PHPCompatibility.FunctionDeclarations.NewParamTypeDeclarations
is now also tested with parameters using the splat operator. #802PHP_CodeSniffer
as the canonical entry point forPHP_CodeSniffer
. Previously, it would point to the PEAR package. #788PHPCompatibility/PHPCompatibility
repo and no longer to the (deprecated)wimg/PHPCompatibility
repo. #828Note: the builds are currently not (yet) tested against PHP 8.0 (unstable) as there is no compatible PHPUnit version available (yet).
DealerDirect/phpcodesniffer-composer-installer
Composer plugin has been upped to0.5.0
. #791Fixed
PHPCompatibility.Extensions.RemovedExtensions
sniff contained a typo in the alternative recommended for the removedmcve
extension. #806PHPCompatibility.Extensions.RemovedExtensions
sniff listed the wrong removal version number for thePayflow Pro/pfpro
extension (PHP 5.3 instead of the correct 5.1). #823Credits
Thanks go out to [Yılmaz] and [Tim Millwood] for their contribution to this version. 👏
v9.1.1
Compare Source
See all related issues and PRs in the [9.1.1 milestone].
Fixed
ForbiddenThisUseContexts
: false positive for unsetting$this['key']
on objects implementingArrayAccess
. #781. Fixes #780v9.1.0
Compare Source
See all related issues and PRs in the [9.1.0 milestone].
Added
PHPCompatibility.FunctionUse.ArgumentFunctionsReportCurrentValue
sniff to detect code which could be affected by the PHP 7.0 change in the values reported byfunc_get_arg()
,func_get_args()
,debug_backtrace()
and exception backtraces. #750. Fixes #585.PHPCompatibility.MethodUse.NewDirectCallsToClone
sniff to detect direct call to a__clone()
magic method which wasn't allowed prior to PHP 7.0. #743. Fixes #629.PHPCompatibility.Variables.ForbiddenThisUseContext
sniff to detect most of the inconsistencies surrounding the use of the$this
variable, which were removed in PHP 7.1. #762, #771. Fixes #262 and #740.NewClasses
: detection of more native PHP Exceptions. #743, #753NewConstants
: detection of the new PHP 7.3 Curl, Stream Crypto and LDAP constants and some more PHP 7.0 Tokenizer constants. #752, #767, #778NewFunctions
sniff: recognize (more) new LDAP functions as introduced in PHP 7.3. #768NewFunctionParameters
sniff: recognize the new$serverctrls
parameter which was added to a number of LDAP functions in PHP 7.3. #769NewIniDirectives
sniff: recognize the newimap.enable_insecure_rsh
ini directive as introduced in PHP 7.1.25, 7.2.13 and 7.3.0. #770NewInterfaces
sniff: recognize two more Session related interfaces which were introduced in PHP 5.5.1 and 7.0 respectively. #748findStartOfStatement()
method to thePHPCompatibility\PHPCSHelper
class to allow for PHPCS cross-version usage of that method. #750Changed
RemovedPHP4StyleConstructors
: will now also detect PHP4-style constructors when declared in interfaces. #751Sniff::validDirectScope()
: the return value of this method has changed. Previously it would always be a boolean. It will stil returnfalse
when no valid direct scope has been found, but it will now return thestackPtr
to the scope token if a valid direct scope was encountered. #758NewOperators
: updated the version number forT_COALESCE_EQUAL
. #746Note: full PHP 7.3 support is only available in combination with PHP_CodeSniffer 2.9.2 or 3.3.1+ due to an incompatibility within PHP_CodeSniffer itself.
Fixed
Tokenizer
regarding binary type casts. #760InternalInterfaces
: false negative for implemented/extended interfaces prefixed with a namespace separator. #775NewClasses
: the introduction version of various native PHP Exceptions has been corrected. #743, #753NewInterfaces
: false negative for implemented/extended interfaces prefixed with a namespace separator. #775RemovedPHP4StyleConstructors
: the sniff would examine methods in nested anonymous classes as if they were methods of the higher level class. #751RemovedPHP4StyleConstructors
: the sniff will no longer throw false positives for the first method in an anonymous class when used in combination with PHPCS 2.3.x. #751ReservedFunctionNames
: fixed incorrect error message text for methods in anonymous classes when used in combination with PHPCS 2.3.x. #755ReservedFunctionNames
: prevent duplicate errors being thrown for methods in nested anonymous classes. #755PHPCSHelper::findEndOfStatement()
: minor bug fix. #749Sniff::isClassProperty()
: class properties for classes nested in conditions or function calls were not always recognized as class properties. #758Credits
Thanks go out to [Jonathan Champ] for his contribution to this version. 👏
v9.0.0
Compare Source
IMPORTANT: This release contains breaking changes. Please read the below information carefully before upgrading!
All sniffs have been placed in meaningful categories and a number of sniffs have been renamed to have more consistent, meaningful and future-proof names.
Both the
PHPCompatibilityJoomla
[GH | Packagist] as well as thePHPCompatibilityWP
[GH|Packagist] rulesets have already been adjusted for this change and have released a new version which is compatible with this version of PHPCompatibility.Aside from those CMS-based rulesets, this project now also offers a number of polyfill-library specific rulesets, such as
PHPCompatibilityPasswordCompat
[GH | Packagist] for @ircmaxell'spassword_compat
libary,PHPCompatibilityParagonieRandomCompat
andPHPCompatibilityParagonieSodiumCompat
[GH|Packagist] for the Paragonie polyfills and a number of rulesets related to various polyfills offered by the Symfony project [GH|Packagist].If your project uses one of these polyfills, please consider using these special polyfill rulesets to prevent false positives.
Also as of this version, [Juliette Reinders Folmer] is now officially a co-maintainer of this package.
Upgrade instructions
<exclude name="..."/>
directives in your own project's custom ruleset which relate to sniffs from the PHPCompatibility library, you will need to update your ruleset to use the new sniff names.// phpcs:ignore Standard.Category.SniffName
, in combination with PHPCompatibility sniff names, you will need to update these annotations.Overview of all the sniff renames:
Old Category.SniffName | New Category.SniffName
--- | ---
PHP.ArgumentFunctionsUsage | FunctionUse.ArgumentFunctionsUsage
PHP.CaseSensitiveKeywords | Keywords.CaseSensitiveKeywords
PHP.ConstantArraysUsingConst | InitialValue.NewConstantArraysUsingConst
PHP.ConstantArraysUsingDefine | InitialValue.NewConstantArraysUsingDefine
PHP.DeprecatedFunctions | FunctionUse.RemovedFunctions
PHP.DeprecatedIniDirectives | IniDirectives.RemovedIniDirectives
PHP.DeprecatedMagicAutoload | FunctionNameRestrictions.RemovedMagicAutoload
PHP.DeprecatedNewReference | Syntax.RemovedNewReference
PHP.DeprecatedPHP4StyleConstructors | FunctionNameRestrictions.RemovedPHP4StyleConstructors
PHP.DeprecatedTypeCasts | TypeCasts.RemovedTypeCasts
PHP.DiscouragedSwitchContinue | ControlStructures.DiscouragedSwitchContinue
PHP.DynamicAccessToStatic | Syntax.NewDynamicAccessToStatic
PHP.EmptyNonVariable | LanguageConstructs.NewEmptyNonVariable
PHP.ForbiddenBreakContinueOutsideLoop | ControlStructures.ForbiddenBreakContinueOutsideLoop
PHP.ForbiddenBreakContinueVariableArguments | ControlStructures.ForbiddenBreakContinueVariableArguments
PHP.ForbiddenCallTimePassByReference | Syntax.ForbiddenCallTimePassByReference
PHP.ForbiddenClosureUseVariableNames | FunctionDeclarations.ForbiddenVariableNamesInClosureUse
PHP.ForbiddenEmptyListAssignment | Lists.ForbiddenEmptyListAssignment
PHP.ForbiddenFunctionParametersWithSameName | FunctionDeclarations.ForbiddenParametersWithSameName
PHP.ForbiddenGlobalVariableVariable | Variables.ForbiddenGlobalVariableVariable
PHP.ForbiddenNames | Keywords.ForbiddenNames
PHP.ForbiddenNamesAsDeclared | Keywords.ForbiddenNamesAsDeclared
PHP.ForbiddenNamesAsInvokedFunctions | Keywords.ForbiddenNamesAsInvokedFunctions
PHP.ForbiddenNegativeBitshift | Operators.ForbiddenNegativeBitshift
PHP.ForbiddenSwitchWithMultipleDefaultBlocks | ControlStructures.ForbiddenSwitchWithMultipleDefaultBlocks
PHP.InternalInterfaces | Interfaces.InternalInterfaces
PHP.LateStaticBinding | Classes.NewLateStaticBinding
PHP.MbstringReplaceEModifier | ParameterValues.RemovedMbstringModifiers
PHP.NewAnonymousClasses | Classes.NewAnonymousClasses
PHP.NewArrayStringDereferencing | Syntax.NewArrayStringDereferencing
PHP.NewClasses | Classes.NewClasses
PHP.NewClassMemberAccess | Syntax.NewClassMemberAccess
PHP.NewClosure | FunctionDeclarations.NewClosure
PHP.NewConstants | Constants.NewConstants
PHP.NewConstantScalarExpressions | InitialValue.NewConstantScalarExpressions
PHP.NewConstVisibility | Classes.NewConstVisibility
PHP.NewExecutionDirectives | ControlStructures.NewExecutionDirectives
PHP.NewFunctionArrayDereferencing | Syntax.NewFunctionArrayDereferencing
PHP.NewFunctionParameters | FunctionUse.NewFunctionParameters
PHP.NewFunctions | FunctionUse.NewFunctions
PHP.NewGeneratorReturn | Generators.NewGeneratorReturn
PHP.NewGroupUseDeclarations | UseDeclarations.NewGroupUseDeclarations
PHP.NewHashAlgorithms | ParameterValues.NewHashAlgorithms
PHP.NewHeredocInitialize | InitialValue.NewHeredoc
PHP.NewIniDirectives | IniDirectives.NewIniDirectives
PHP.NewInterfaces | Interfaces.NewInterfaces
PHP.NewKeywords | Keywords.NewKeywords
PHP.NewLanguageConstructs | LanguageConstructs.NewLanguageConstructs
PHP.NewMagicClassConstant | Constants.NewMagicClassConstant
PHP.NewMagicMethods | FunctionNameRestrictions.NewMagicMethods
PHP.NewMultiCatch | ControlStructures.NewMultiCatch
PHP.NewNullableTypes | FunctionDeclarations.NewNullableTypes
PHP.NewReturnTypeDeclarations | FunctionDeclarations.NewReturnTypeDeclarations
PHP.NewScalarTypeDeclarations | FunctionDeclarations.NewParamTypeDeclarations
PHP.NewTrailingComma | Syntax.NewFunctionCallTrailingComma
PHP.NewTypeCasts | TypeCasts.NewTypeCasts
PHP.NewUseConstFunction | UseDeclarations.NewUseConstFunction
PHP.NonStaticMagicMethods | FunctionDeclarations.NonStaticMagicMethods
PHP.OptionalRequiredFunctionParameters | FunctionUse.OptionalToRequiredFunctionParameters
PHP.ParameterShadowSuperGlobals | FunctionDeclarations.ForbiddenParameterShadowSuperGlobals
PHP.PCRENewModifiers | ParameterValues.NewPCREModifiers
PHP.PregReplaceEModifier | ParameterValues.RemovedPCREModifiers
PHP.RemovedAlternativePHPTags | Miscellaneous.RemovedAlternativePHPTags
PHP.RemovedConstants | Constants.RemovedConstants
PHP.RemovedExtensions | Extensions.RemovedExtensions
PHP.RemovedFunctionParameters | FunctionUse.RemovedFunctionParameters
PHP.RemovedGlobalVariables | Variables.RemovedPredefinedGlobalVariables
PHP.RemovedHashAlgorithms | ParameterValues.RemovedHashAlgorithms
PHP.ReservedFunctionNames | FunctionNameRestrictions.ReservedFunctionNames
PHP.RequiredOptionalFunctionParameters | FunctionUse.RequiredToOptionalFunctionParameters
PHP.ShortArray | Syntax.NewShortArray
PHP.TernaryOperators | Operators.NewShortTernary
PHP.ValidIntegers | Miscellaneous.ValidIntegers
PHP.VariableVariables | Variables.NewUniformVariableSyntax
Changelog for version 9.0.0
See all related issues and PRs in the [9.0.0 milestone].
Added
PHPCompatibility.ControlStructures.NewForeachExpressionReferencing
sniff to detect referencing of$value
within aforeach()
when the iterated array is not a variable. This was not supported prior to PHP 5.5. #664PHPCompatibility.ControlStructures.NewListInForeach
sniff to detect unpacking nested arrays into separate variables via thelist()
construct in aforeach()
statement. This was not supported prior to PHP 5.5. #657PHPCompatibility.FunctionNameRestrictions.RemovedNamespacedAssert
sniff to detect declaring a function calledassert()
within a namespace. This has been deprecated as of PHP 7.3. #735. Partially fixes #718.PHPCompatibility.Lists.AssignmentOrder
sniff to detectlist()
constructs affected by the change in assignment order in PHP 7.0. #656PHPCompatibility.Lists.NewKeyedList
sniff to detect usage of keys inlist()
, support for which was added in PHP 7.1. #655. Fixes #252.PHPCompatibility.Lists.NewListReferenceAssignment
sniff to detect reference assignments being used inlist()
constructs, support for which has been added in PHP 7.3. #731PHPCompatibility.Lists.NewShortList
sniff to detect the shorthand array syntax[]
being used for symmetric array destructuring as introduced in PHP 7.1. #654. Fixes #248.PHPCompatibility.Operators.NewOperators
sniff which checks for usage of the pow, pow equals, spaceship and coalesce (equals) operators. #738These checks were previously contained within the
PHPCompatibility.LanguageConstructs.NewLanguageConstructs
sniff.PHPCompatibility.ParameterValues.ForbiddenGetClassNull
sniff to detectnull
being passed toget_class()
, support for which has been removed in PHP 7.2 #659. Fixes #557.PHPCompatibility.ParameterValues.NewArrayReduceInitialType
sniff to detect non-integers being passed as the$initial
parameter to thearray_reduce()
function, which was not supported before PHP 5.3. #666. Fixes #649PHPCompatibility.ParameterValues.NewFopenModes
sniff to examine the$mode
parameter passed tofopen()
for modes not available in older PHP versions. #658PHPCompatibility.ParameterValues.NewNegativeStringOffset
sniff to detect negative string offsets being passed to string manipulation functions which was not supported before PHP 7.1. #662. Partially fixes #253.PHPCompatibility.ParameterValues.NewPackFormats
sniff to examine the$format
parameter passed topack()
for formats not available in older PHP versions. #665PHPCompatibility.ParameterValues.RemovedIconvEncoding
sniff to detect the PHP 5.6 deprecated encoding$type
s being passed toiconv_set_encoding()
. #660. Fixes #475.PHPCompatibility.ParameterValues.RemovedNonCryptoHashes
sniff to detect non-cryptographic hash algorithms being passed to varioushash_*()
functions. This is no longer accepted as of PHP 7.2. #663. Fixes #559PHPCompatibility.ParameterValues.RemovedSetlocaleString
sniff to detect string literals being passed to the$category
parameter of thesetlocale()
function. This behaviour was deprecated in PHP 4.2 and support has been removed in PHP 7.0. #661PHPCompatibility.Syntax.NewFlexibleHeredocNowdoc
sniff to detect the new heredoc/nowdoc format as allowed as of PHP 7.3. #736. Fixes #705.Note: This sniff is only supported in combination with PHP_CodeSniffer 2.6.0 and higher.
PHPCompatibility.Classes.NewClasses
sniff: recognize the newCompileError
andJsonException
classes as introduced in PHP 7.3. #676PHPCompatibility.Constants.NewConstants
sniff: recognize new constants which are being introduced in PHP 7.3. #678PHPCompatibility.Constants.RemovedConstants
sniff: recognize constants which have been deprecated or removed in PHP 7.3. #710. Partially fixes #718.PHPCompatibility.FunctionUse.NewFunctions
sniff: recognize various new functions being introduced in PHP 7.3. #679PHPCompatibility.FunctionUse.NewFunctions
sniff: recognize thesapi_windows_*()
,hash_hkdf()
andpcntl_signal_get_handler()
functions as introduced in PHP 7.1. #728PHPCompatibility.FunctionUse.RemovedFunctionParameters
sniff: recognize the deprecation of the$case_insensitive
parameter for thedefine()
function in PHP 7.3. #706PHPCompatibility.FunctionUse.RemovedFunctions
sniff: recognize the PHP 7.3 deprecation of theimage2wbmp()
,fgetss()
andgzgetss()
functions, as well as the deprecation of undocumented Mbstring function aliases. [#681](https://togithub.com/PHPCompatibilityConfiguration
📅 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.