All Versions
31
Latest Version
Avg Release Cycle
52 days
Latest Release
917 days ago

Changelog History
Page 1

  • v9.3.5 Changes

    December 27, 2019

    ๐Ÿ‘€ See all related issues and PRs in the 9.3.5 milestone.

    โž• Added

    • ๐Ÿฑ โญ๏ธ PHPCompatibility.Classes.NewClasses sniff: recognize the new FFI extension related classes as introduced in PHP 7.4. #949
    • ๐Ÿฑ โญ๏ธ PHPCompatibility.IniDirectives.NewIniDirectives sniff: detect use of the new FFI extension related ini directives as introduced in PHP 7.4. #949

    ๐Ÿ”„ Changed

    • ๐Ÿฑ ๐Ÿ“ PHPCompatibility.Syntax.NewShortArray: improved clarity of the error message and made it consistent with other error messages in this standard. #934
    • โšก๏ธ ๐Ÿ“ PHPCompatibility.Interfaces.NewInterfaces: updated the URL which is mentioned in select error messages. #942
    • ๐Ÿ“š โ™ป๏ธ Another slew of code documentation fixes. #937, #939, #940, #941, #943, #944, #951, #950. Fixes #734.
    • ๐Ÿ— ๐Ÿ’š Travis: various tweaks. The builds against PHP 7.4 are no longer allowed to fail. #935, #938
      For 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. #945

    Credits

    ๐Ÿฑ Thanks go out to William Entriken for their contribution to this version. ๐Ÿ‘

  • v9.3.4 Changes

    November 15, 2019

    ๐Ÿ‘€ See all related issues and PRs in the 9.3.4 milestone.

    ๐Ÿ›  Fixed

    • ๐Ÿฑ ๐Ÿ› PHPCompatibility.Keywords.ForbiddenNames: false positive for list when used in a foreach() condition. #930. Fixes #928, #929

    Credits

    ๐Ÿฑ Thanks go out to Sergii Bondarenko for their contribution to this version. ๐Ÿ‘

  • v9.3.3 Changes

    November 11, 2019

    ๐Ÿ‘€ 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. #924
    • ๐Ÿฑ โญ๏ธ PHPCompatibility.Keywords.ForbiddenNames sniff: detect the use of more reserved keywords which are not allowed to be used to name certain constructs. #923. Fixes #922

    ๐Ÿ›  Fixed

    • ๐Ÿ’… ๐Ÿ› 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. #921

    Credits

    ๐Ÿฑ Thanks go out to Nikhil for their contribution to this version. ๐Ÿ‘

  • v9.3.2 Changes

    October 16, 2019

    ๐Ÿ‘€ See all related issues and PRs in the [9.3.2 milestone].

    โž• Added

    • โญ๏ธ PHPCompatibility.Constants.NewConstants sniff: detection of the PHP 7.2 SODIUM_CRYPTO_PWHASH_ALG_ARGON2ID13 constant. #915
    • ๐Ÿ— ๐Ÿ“š Readme: a list of projects which are build upon or extend PHPCompatibility. #904

    ๐Ÿ”„ Changed

    • ๐Ÿ’… ๐Ÿ“Œ PHPCompatibility.FunctionNameRestrictions.RemovedPHP4StyleConstructors: minor efficiency fix to make the sniff faster. #912
    • ๐Ÿฑ ๐Ÿ“Œ PHPCompatibility.FunctionNameRestrictions.ReservedFunctionNames: functions marked as @deprecated in the function docblock will now be ignored by this sniff. #917. Fixes #911
    • ๐Ÿฑ ๐Ÿ“ PHPCompatibility.FunctionDeclarations.ForbiddenToStringParameters: the $ooScopeTokens property is now protected, it should never have been public in the first place. #907
    • ๐Ÿ“š โ™ป๏ธ More code documentation fixes. #903, #916
    • ๐Ÿฑ ๐Ÿ“š Readme/Contributing: various tweaks. #904, #905

    ๐Ÿ›  Fixed

    • ๐Ÿฑ ๐Ÿ› PHPCompatibility.FunctionUse.OptionalToRequiredFunctionParameters: false positive when a class is instantiated which has the same name as one of the affected functions. #914. Fixes #913
    • ๐Ÿฑ ๐Ÿ› PHPCompatibility.FunctionUse.RequiredToOptionalFunctionParameters: false positive when a class is instantiated which has the same name as one of the affected functions. #914
    • ๐Ÿฑ ๐Ÿ› PHPCompatibility.MethodUse.NewDirectCallsToClone: false positive on calling __clone() from within the class being cloned #910. Fixes #629 (comment)
    • ๐Ÿฑ ๐Ÿ› PHPCompatibility.Miscellaneous.ValidIntegers: binary numbers using an uppercase B were not always recognized correctly. #909
  • v9.3.1 Changes

    September 06, 2019

    ๐Ÿ‘€ See all related issues and PRs in the 9.3.1 milestone.

    ๐Ÿ”„ Changed

    • ๐Ÿ“š โ™ป๏ธ A whole slew of code documentation fixes. #892, #895, #896, #897, #898, #899, #900
    • ๐Ÿ— ๐Ÿ”ง Travis: minor tweaks to the build script. #893

    ๐Ÿ›  Fixed

    • ๐Ÿฑ ๐Ÿ› PHPCompatibility.ParameterValues.RemovedImplodeFlexibleParamOrder: false positive when an array item in the second parameter contained a ternary. #891. Fixes #890
    • ๐Ÿฑ ๐Ÿ› PHPCompatibility.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 Changes

    August 29, 2019

    ๐Ÿ‘€ 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

    • ๐Ÿฑ ๐ŸŒŸ New 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. #843
    • ๐Ÿท ๐ŸŒŸ New PHPCompatibility.ParameterValues.ForbiddenStripTagsSelfClosingXHTML sniff to detect calls to strip_tags() passing self-closing XHTML tags in the $allowable_tags parameter. This has not been supported since PHP 5.3.4. #866
    • ๐ŸŒŸ New PHPCompatibility.ParameterValues.NewHTMLEntitiesEncodingDefault sniff to detect calls to html_entity_decode(), htmlentities() and htmlspecialchars() which are impacted by the change to the default value of the $encoding parameter in PHP 5.4. #862
    • ๐Ÿฑ ๐ŸŒŸ New PHPCompatibility.ParameterValues.NewIconvMbstringCharsetDefault sniff to detect code impacted by the change in the default_charset value in PHP 5.6. #864 Fixes #839
    • ๐ŸŒŸ New PHPCompatibility.ParameterValues.NewIDNVariantDefault sniff to detect calls to idn_to_ascii() and idn_to_utf8() impacted by the PHP 7.4 change in the default value for the $variant parameter. #861
    • ๐ŸŒŸ New PHPCompatibility.ParameterValues.NewPasswordAlgoConstantValues sniff to detect calls to password_hash() and password_needs_rehash() impacted by the changed value of the PASSWORD_DEFAULT, PASSWORD_BCRYPT, PASSWORD_ARGON2I and PASSWORD_ARGON2ID constants in PHP 7.4. #865
    • ๐Ÿฑ ๐ŸŒŸ New PHPCompatibility.ParameterValues.NewProcOpenCmdArray sniff to detect calls to proc_open() passing an array for the $cmd parameter as supported as of PHP 7.4. #869
    • ๐Ÿท ๐ŸŒŸ New PHPCompatibility.ParameterValues.NewStripTagsAllowableTagsArray sniff to detect calls to strip_tags() passing an array for the $allowable_tags parameter as will be supported as of PHP 7.4. #867
    • ๐Ÿฑ ๐ŸŒŸ New PHPCompatibility.ParameterValues.RemovedImplodeFlexibleParamOrder sniff to detect implode() 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. #846
    • ๐Ÿฑ ๐ŸŒŸ New PHPCompatibility.ParameterValues.RemovedMbStrrposEncodingThirdParam sniff to detect the $encoding being passed as the third, instead of the fourth parameter, to mb_strrpos() as has been soft deprecated since PHP 5.2 and will be hard deprecated as of PHP 7.4. #860
    • ๐Ÿฑ ๐ŸŒŸ New PHPCompatibility.Syntax.RemovedCurlyBraceArrayAccess sniff to detect array and string offset access using curly braces as will be deprecated as of PHP 7.4. #855
      • In contrast to any other sniff in the PHPCompatibility standard, this sniff contains an auto-fixer.
    • ๐Ÿฑ ๐ŸŒŸ New PHPCompatibility.TextStrings.NewUnicodeEscapeSequence sniff to detect use of the PHP 7.0+ unicode codepoint escape sequences and issues with invalid sequences. #856
    • โฌ†๏ธ ๐ŸŒŸ New PHPCompatibility.Upgrade.LowPHP sniff to give users of old PHP versions advance warning when support will be dropped in the near future. #838
      ๐Ÿ‘ At this moment, the intention is to drop support for PHP 5.3 by the end of this year.
    • ๐Ÿฑ โญ๏ธ PHPCompatibility.Classes.NewClasses sniff: recognize the new WeakReference class as introduced in PHP 7.4. #857
    • ๐Ÿฑ โญ๏ธ PHPCompatibility.Constants.NewConstants sniff: detection of new Curl constants as introduced in PHP 7.3.5. #878
    • โญ๏ธ PHPCompatibility.Constants.NewConstants sniff: detection of the revived T_BAD_CHARACTER constant as re-introduced in PHP 7.4. #882
    • โญ๏ธ PHPCompatibility.Constants.NewConstants sniff: detection of the new IMG_FILTER_SCATTER and PASSWORD_ARGON2_PROVIDER constants as introduced in PHP 7.4. #887
    • ๐Ÿฑ โญ๏ธ PHPCompatibility.Constants.RemovedConstants sniff: detection of use of the CURLPIPE_HTTP1 constant which will be deprecated in PHP 7.4. #879
    • โญ๏ธ PHPCompatibility.Constants.RemovedConstants sniff: detection of use of the FILTER_SANITIZE_MAGIC_QUOTES constant which will be deprecated in PHP 7.4. #845
    • โญ๏ธ PHPCompatibility.Constants.RemovedConstants sniff: detection of use of the T_CHARACTER and T_BAD_CHARACTER constants which were removed in PHP 7.0. #882
    • โญ๏ธ PHPCompatibility.FunctionDeclarations.NewMagicMethods sniff: recognize the new __serialize() and __unserialize() magic methods as introduced in PHP 7.4. #868
    • โญ๏ธ PHPCompatibility.FunctionDeclarations.NewMagicMethods sniff: recognize the PHP 5.0 __construct() and __destruct() magic methods. #884
    • โญ๏ธ PHPCompatibility.FunctionDeclarations.NonStaticMagicMethods sniff: recognize the new __serialize() and __unserialize() magic methods as introduced in PHP 7.4. #868
    • ๐Ÿฑ โญ๏ธ PHPCompatibility.FunctionUse.NewFunctions sniff: recognize the new PHP 7.4 function imagecreatefromtga(). #873
    • ๐Ÿฑ โญ๏ธ PHPCompatibility.FunctionUse.RemovedFunctionParameters sniff: recognize the deprecation of the $age parameter of the curl_version() function. #874
    • โญ๏ธ PHPCompatibility.FunctionUse.RemovedFunctions sniff: recognize the PHP 7.4 deprecated convert_cyr_string()(), ezmlm_hash(), get_magic_quotes_gpc(), get_magic_quotes_runtime(), hebrevc(), is_real(), money_format() and restore_include_path() functions. #847
    • โญ๏ธ PHPCompatibility.IniDirectives.NewIniDirectives sniff: detect use of the new PHP 7.4 zend.exception_ignore_args ini directive. #871
    • โญ๏ธ PHPCompatibility.IniDirectives.RemovedIniDirectives sniff: detect use of the allow_url_include ini directive which is deprecated as of PHP 7.4. #870
    • ๐Ÿฑ โญ๏ธ PHPCompatibility.IniDirectives.RemovedIniDirectives sniff: detection of use of the opcache.load_comments directive which was removed in PHP 7.0. #v
    • ๐Ÿฑ โญ๏ธ PHPCompatibility.ParameterValues.NewHashAlgorithms: recognize use of the new PHP 7.4 crc32c hash algorithm. #872
    • ๐Ÿฑ โญ๏ธ PHPCompatibility.TypeCasts.RemovedTypeCasts sniff: detect usage of the (real) type cast which will be deprecated in PHP 7.4. #844
    • ๐Ÿฑ โญ๏ธ Recognize the recode extension functionality which will be removed in PHP 7.4 (moved to PECL) in the RemovedExtensions and RemovedFunctions sniffs. #841
    • ๐Ÿฑ โญ๏ธ Recognize the OPcache extension functionality which was be introduced in PHP 5.5, but not yet fully accounted for in the NewFunctions and NewIniDirectives sniffs. #883
    • ๐Ÿฑ โญ๏ธ New getCompleteTextString() utility method to the PHPCompatibility\Sniff class. #856
    • โฌ†๏ธ โ˜”๏ธ Unit test for the PHPCompatibility.Upgrade.LowPHPCS sniff.
    • ๐Ÿฑ โ˜”๏ธ Some extra unit tests for the PHPCompatibility.ParameterValues.NewNegativeStringOffset, PHPCompatibility.ParameterValues.RemovedMbStringModifiers and sniffs. #876, #877
    • ๐Ÿฑ ๐Ÿ“š CONTRIBUTING.md: Added a list of typical sources for information about changes to PHP. #875

    ๐Ÿ”„ Changed

    • ๐Ÿฑ ๐Ÿ“Œ 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 #863
    • ๐Ÿ“Œ PHPCompatibility.FunctionDeclarations.NonStaticMagicMethods sniff: will now also check the visibility and static (or not) requirements of the magic __construct(), __destruct(), __clone(), __debugInfo(), __invoke() and __set_state() methods. #885
    • ๐Ÿฑ ๐Ÿ“Œ PHPCompatibility.Syntax.NewArrayStringDereferencing sniff: the sniff will now also recognize array string dereferencing using curly braces as was (silently) supported since PHP 7.0. #851
      • The sniff will now also throw errors for each dereference found on the array/string, not just the first one.
    • ๐Ÿฑ ๐Ÿ“Œ PHPCompatibility.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. #852
      • The sniff will now also throw errors for each access detected, not just the first one.
      • The line number on which the error is thrown in now set more precisely.
    • ๐Ÿฑ ๐Ÿ“Œ PHPCompatibility.Syntax.NewFunctionArrayDereferencing sniff: the sniff will now also recognize function array dereferencing using curly braces as was (silently) supported since PHP 7.0. #853
      • The sniff will now also throw errors for each access detected, not just the first one.
      • The line number on which the error is thrown in now set more precisely.
    • ๐Ÿฑ โ™ป๏ธ Various code clean-up and improvements. #849, #850
    • ๐Ÿ“š โ™ป๏ธ Various minor inline documentation fixes. #854, #886
    • ๐Ÿ— ๐Ÿ”ง Travis: various tweaks to the build script. #834, #842

    ๐Ÿ›  Fixed

    • ๐Ÿฑ ๐Ÿ› PHPCompatibility.FunctionDeclarations.ForbiddenParametersWithSameName sniff: variable names are case-sensitive, so recognition of same named parameters should be done in a case-sensitive manner. #848
    • ๐Ÿฑ ๐Ÿ› PHPCompatibility.FunctionDeclarations.NewExceptionsFromToString sniff: Exceptions thrown within a try should not trigger the sniff. #880. Fixes #863
    • ๐Ÿฑ ๐Ÿ› PHPCompatibility.FunctionDeclarations.NewExceptionsFromToString sniff: the $ooScopeTokens property should never have been a public property. #880.
    • ๐Ÿฑ โ˜”๏ธ Some of the unit tests for the PHPCompatibility.Operators.RemovedTernaryAssociativity sniff were not being run. #836
  • v9.2.0 Changes

    June 27, 2019

    ๐Ÿ‘€ 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

    • ๐Ÿฑ ๐ŸŒŸ New PHPCompatibility.Classes.ForbiddenAbstractPrivateMethods sniff to detect methods declared as both private as well as abstract. This was allowed between PHP 5.0.0 and 5.0.4, but disallowed in PHP 5.1 as the behaviour of private and abstract are mutually exclusive. #822
    • ๐Ÿฑ ๐ŸŒŸ New PHPCompatibility.Classes.NewTypedProperties sniff to detect PHP 7.4 typed property declarations. #801, #829
    • ๐Ÿฑ ๐ŸŒŸ New PHPCompatibility.Classes.RemovedOrphanedParent sniff to detect the use of the parent 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. #818
    • ๐Ÿฑ ๐ŸŒŸ New PHPCompatibility.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. #814
    • ๐Ÿฑ ๐ŸŒŸ New PHPCompatibility.FunctionDeclarations.ForbiddenToStringParameters sniff to detect __toString() function declarations expecting parameters. This was disallowed in PHP 5.3. #815
    • ๐Ÿฑ ๐ŸŒŸ New PHPCompatibility.MethodUse.ForbiddenToStringParameters sniff to detect direct calls to __toString() magic methods passing parameters. This was disallowed in PHP 5.3. #830
    • ๐Ÿฑ ๐ŸŒŸ New PHPCompatibility.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. #805
    • ๐Ÿฑ ๐ŸŒŸ New PHPCompatibility.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. #810
    • ๐Ÿฑ ๐ŸŒŸ New PHPCompatibility.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. #804
    • ๐Ÿฑ โญ๏ธ PHPCompatibility.Classes.NewClasses sniff: recognize the new ReflectionReference class as introduced in PHP 7.4. #820
    • ๐Ÿฑ โญ๏ธ PHPCompatibility.Constants.NewConstants sniff: detection of the new PHP 7.4 Core (Standard), MBString, Socket and Tidy constants. #821
    • โญ๏ธ PHPCompatibility.FunctionUse.NewFunctions sniff: detect usage of the new PHP 7.4 get_mangled_object_vars(), mb_str_split(), openssl_x509_verify(), password_algos(), pcntl_unshare(), sapi_windows_set_ctrl_handler() and sapi_windows_generate_ctrl_event() functions. #811, #819, #827
    • ๐Ÿฑ โญ๏ธ PHPCompatibility.FunctionUse.NewFunctions sniff: recognize the new OCI functions as introduced in PHP 7.2.14 and PHP 7.3.1. #786
    • โญ๏ธ PHPCompatibility.FunctionUse.RemovedFunctions sniff: recognize the PHP 7.4 deprecated ldap_control_paged_result_response() and ldap_control_paged_result() functions. #831
    • ๐Ÿฑ โญ๏ธ PHPCompatibility.FunctionUse.RemovedFunctions sniff: recognize the Payflow Pro/pfpro functions as removed in PHP 5.1. #823
    • ๐Ÿ”€ โญ๏ธ PHPCompatibility.FunctionUse.RequiredToOptionalFunctionParameters sniff: account for the parameters for array_merge() and array_merge_recursive() becoming optional in PHP 7.4. #817
    • ๐Ÿฑ โญ๏ธ PHPCompatibility.IniDirectives.RemovedIniDirectives sniff: recognize the Payflow Pro/pfpro ini directives as removed in PHP 5.1. #823
    • ๐Ÿฑ โญ๏ธ Recognize the interbase/Firebird extension functionality which will be removed in PHP 7.4 (moved to PECL) in the RemovedConstants, RemovedExtensions, RemovedFunctions and RemovedIniDirectives sniffs. #807
    • ๐Ÿฑ โญ๏ธ Recognize the wddx extension functionality which will be removed in PHP 7.4 (moved to PECL) in the RemovedExtensions and RemovedFunctions sniffs. #826
    • ๐Ÿฑ โญ๏ธ New isShortTernary() and isUnaryPlusMinus() utility methods to the PHPCompatibility\Sniff class. #810, #805

    ๐Ÿ”„ Changed

    • ๐Ÿฑ โœ๏ธ The PHPCompatibility.Extensions.RemovedExtensions sniff will now only report on the removed Payflow Pro extension when a function uses pfpro_ as a prefix. Previously, it used the pfpro prefix (without underscore) for detection. #812
    • ๐Ÿฑ โœ๏ธ The error message thrown when the T_ELLIPSIS token, i.e. the spread operator, is detected. #803
      PHP 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. #802
    • ๐Ÿ“š The documentation now uses the GitHub repo of PHP_CodeSniffer as the canonical entry point for PHP_CodeSniffer. Previously, it would point to the PEAR package. #788
    • ๐Ÿฑ ๐Ÿ“š The links in the changelog now all point to the PHPCompatibility/PHPCompatibility repo and no longer to the (deprecated) wimg/PHPCompatibility repo. #828
    • ๐Ÿ“š โ™ป๏ธ Various minor inline documentation improvements. #825
    • ๐ŸŽ ๐Ÿ”ง Various performance optimizations and code simplifications. #783, #784, #795, #813
    • ๐Ÿ— ๐Ÿ’š Travis: build tests are now being run against PHP 7.4 (unstable) as well. #790
      ๐Ÿ— Note: the builds are currently not (yet) tested against PHP 8.0 (unstable) as there is no compatible PHPUnit version available (yet).
    • ๐Ÿ”จ ๐Ÿ”ง Travis: The build script has been refactored to use stages to get the most relevant results faster. Additionally some more tweaks have been made to improve and/or simplify the build script. #798
    • ๐Ÿ— ๐Ÿ”ง Build/PHPCS: warnings are no longer allowed for the PHPCompatibility native code. #800
    • ๐Ÿ— ๐Ÿ”ง Build/PHPCS: added variable assignment alignment check and file include check to the PHPCompatibility native CS configuration. #824
    • ๐Ÿฑ ๐Ÿ”ง The minimum version for the recommended DealerDirect/phpcodesniffer-composer-installer Composer plugin has been upped to 0.5.0. #791

    ๐Ÿ›  Fixed

    • ๐Ÿฑ ๐Ÿ› The PHPCompatibility.Extensions.RemovedExtensions sniff contained a typo in the alternative recommended for the removed mcve extension. #806
    • ๐Ÿฑ ๐Ÿ› The PHPCompatibility.Extensions.RemovedExtensions sniff listed the wrong removal version number for the Payflow Pro/pfpro extension (PHP 5.3 instead of the correct 5.1). #823

    Credits

    ๐Ÿฑ Thanks go out to Yฤฑlmaz and Tim Millwood for their contribution to this version. ๐Ÿ‘

  • v9.1.1 Changes

    December 31, 2018

    ๐Ÿ‘€ See all related issues and PRs in the 9.1.1 milestone.

    ๐Ÿ›  Fixed

    • ๐Ÿฑ ๐Ÿ› ForbiddenThisUseContexts: false positive for unsetting $this['key'] on objects implementing ArrayAccess. #781. Fixes #780
  • v9.1.0 Changes

    December 16, 2018

    ๐Ÿ‘€ See all related issues and PRs in the 9.1.0 milestone.

    โž• Added

    • ๐ŸŒŸ New PHPCompatibility.FunctionUse.ArgumentFunctionsReportCurrentValue sniff to detect code which could be affected by the PHP 7.0 change in the values reported by func_get_arg(), func_get_args(), debug_backtrace() and exception backtraces. #750. Fixes #585.
    • ๐Ÿฑ ๐ŸŒŸ New 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.
    • ๐Ÿฑ ๐ŸŒŸ New 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, #753
    • ๐Ÿฑ โญ๏ธ NewConstants : detection of the new PHP 7.3 Curl, Stream Crypto and LDAP constants and some more PHP 7.0 Tokenizer constants. #752, #767, #778
    • ๐Ÿฑ โญ๏ธ NewFunctions sniff: recognize (more) new LDAP functions as introduced in PHP 7.3. #768
    • ๐Ÿฑ โญ๏ธ NewFunctionParameters sniff: recognize the new $serverctrls parameter which was added to a number of LDAP functions in PHP 7.3. #769
    • โญ๏ธ NewIniDirectives sniff: recognize the new imap.enable_insecure_rsh ini directive as introduced in PHP 7.1.25, 7.2.13 and 7.3.0. #770
    • ๐Ÿฑ โญ๏ธ NewInterfaces sniff: recognize two more Session related interfaces which were introduced in PHP 5.5.1 and 7.0 respectively. #748
    • ๐Ÿฑ โญ๏ธ Duplicate of upstream findStartOfStatement() method to the PHPCompatibility\PHPCSHelper class to allow for PHPCS cross-version usage of that method. #750

    ๐Ÿ”„ Changed

    • ๐Ÿ’… ๐Ÿ“Œ RemovedPHP4StyleConstructors: will now also detect PHP4-style constructors when declared in interfaces. #751
    • ๐Ÿ“Œ Sniff::validDirectScope(): the return value of this method has changed. Previously it would always be a boolean. It will stil return false when no valid direct scope has been found, but it will now return the stackPtr to the scope token if a valid direct scope was encountered. #758
    • โช NewOperators : updated the version number for T_COALESCE_EQUAL. #746
    • ๐Ÿฑ ๐Ÿ“ Minor improvement to an error message in the unit test suite. #742
    • ๐Ÿฑ โ™ป๏ธ Various code clean-up and improvements. #745, #756, #774
    • ๐Ÿ“š โ™ป๏ธ Various minor inline documentation fixes. #749, #757
    • ๐Ÿฑ โ˜”๏ธ Improved code coverage recording. #744, #776
    • ๐Ÿ— ๐Ÿ’š Travis: build tests are now being run against PHP 7.3 as well. #511
      Note: 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

    • โœ… Compatibility with the upcoming release of PHPCS 3.4.0. Deal with changed behaviour of the PHPCS Tokenizer regarding binary type casts. #760
    • ๐Ÿ‘• ๐Ÿ› InternalInterfaces: false negative for implemented/extended interfaces prefixed with a namespace separator. #775
    • ๐Ÿฑ ๐Ÿ› NewClasses: the introduction version of various native PHP Exceptions has been corrected. #743, #753
    • ๐Ÿฑ ๐Ÿ› NewInterfaces: false negative for implemented/extended interfaces prefixed with a namespace separator. #775
    • ๐Ÿ’… ๐Ÿ› RemovedPHP4StyleConstructors: the sniff would examine methods in nested anonymous classes as if they were methods of the higher level class. #751
    • ๐Ÿ’… โช RemovedPHP4StyleConstructors: 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. #751
    • ๐Ÿฑ โช ReservedFunctionNames: fixed incorrect error message text for methods in anonymous classes when used in combination with PHPCS 2.3.x. #755
    • ๐Ÿฑ ๐Ÿ› ReservedFunctionNames: prevent duplicate errors being thrown for methods in nested anonymous classes. #755
    • ๐Ÿฑ ๐Ÿ› PHPCSHelper::findEndOfStatement(): minor bug fix. #749
    • ๐Ÿฑ ๐Ÿ› Sniff::isClassProperty(): class properties for classes nested in conditions or function calls were not always recognized as class properties. #758

    Credits

    ๐Ÿฑ Thanks go out to Jonathan Champ for his contribution to this version. ๐Ÿ‘

  • v9.0.0 Changes

    October 07, 2018

    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 the PHPCompatibilityWP [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's password_compat libary, PHPCompatibilityParagonieRandomCompat and PHPCompatibilityParagonieSodiumCompat [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

    • โšก๏ธ If you have <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.
    • ๐Ÿš€ If you use the new PHPCS 3.2+ inline annotations, i.e. // phpcs:ignore Standard.Category.SniffName, in combination with PHPCompatibility sniff names, you will need to update these annotations.
    • โฌ†๏ธ If you use neither of the above, you should be fine and upgrading should be painless.

    Overview of all the sniff renames:

    Old Category.SniffName New Category.SniffName
    PHP.ArgumentFunctionsUsage FunctionUse.ArgumentFunctionsUsage
    PHP.CaseSensitiveKeywords Keywords.CaseSensitiveKeywords
    PHP.ConstantArraysUsingConst InitialValue. New ConstantArraysUsingConst
    PHP.ConstantArraysUsingDefine InitialValue. New ConstantArraysUsingDefine
    PHP. Deprecated Functions FunctionUse. Removed Functions
    PHP. Deprecated IniDirectives IniDirectives. Removed IniDirectives
    PHP. Deprecated MagicAutoload FunctionNameRestrictions. Removed MagicAutoload
    PHP. Deprecated NewReference Syntax. Removed NewReference
    PHP. Deprecated PHP4StyleConstructors FunctionNameRestrictions. Removed PHP4StyleConstructors
    PHP. Deprecated TypeCasts TypeCasts. Removed TypeCasts
    PHP.DiscouragedSwitchContinue ControlStructures.DiscouragedSwitchContinue
    PHP.DynamicAccessToStatic Syntax. New DynamicAccessToStatic
    PHP.EmptyNonVariable LanguageConstructs. New EmptyNonVariable
    PHP.ForbiddenBreakContinueOutsideLoop ControlStructures.ForbiddenBreakContinueOutsideLoop
    PHP.ForbiddenBreakContinueVariableArguments ControlStructures.ForbiddenBreakContinueVariableArguments
    PHP.ForbiddenCallTimePassByReference Syntax.ForbiddenCallTimePassByReference
    PHP.Forbidden ClosureUseVariableNames FunctionDeclarations.Forbidden VariableNamesInClosureUse
    PHP.ForbiddenEmptyListAssignment Lists.ForbiddenEmptyListAssignment
    PHP.Forbidden Function ParametersWithSameName 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. New LateStaticBinding
    PHP. MbstringReplaceE Modifier ParameterValues. RemovedMbstring Modifier s
    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.NewHeredoc Initialize 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.New Scalar TypeDeclarations FunctionDeclarations.New Param TypeDeclarations
    PHP.NewTrailingComma Syntax.New FunctionCall TrailingComma
    PHP.NewTypeCasts TypeCasts.NewTypeCasts
    PHP.NewUseConstFunction UseDeclarations.NewUseConstFunction
    PHP.NonStaticMagicMethods FunctionDeclarations.NonStaticMagicMethods
    PHP.OptionalRequiredFunctionParameters FunctionUse.Optional To RequiredFunctionParameters
    PHP.ParameterShadowSuperGlobals FunctionDeclarations. Forbidden ParameterShadowSuperGlobals
    PHP. PCRENew Modifiers ParameterValues. NewPCRE Modifiers
    PHP. PregReplaceE Modifier ParameterValues. RemovedPCRE Modifier s
    PHP.RemovedAlternativePHPTags Miscellaneous.RemovedAlternativePHPTags
    PHP.RemovedConstants Constants.RemovedConstants
    PHP.RemovedExtensions Extensions.RemovedExtensions
    PHP.RemovedFunctionParameters FunctionUse.RemovedFunctionParameters
    PHP.RemovedGlobalVariables Variables.Removed Predefined GlobalVariables
    PHP.RemovedHashAlgorithms ParameterValues.RemovedHashAlgorithms
    PHP.ReservedFunctionNames FunctionNameRestrictions.ReservedFunctionNames
    PHP.RequiredOptionalFunctionParameters FunctionUse.Required To OptionalFunctionParameters
    PHP.ShortArray Syntax. New ShortArray
    PHP.Ternary Operators Operators. NewShort Ternary
    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

    • ๐Ÿฑ ๐ŸŒŸ New PHPCompatibility.ControlStructures.NewForeachExpressionReferencing sniff to detect referencing of $value within a foreach() when the iterated array is not a variable. This was not supported prior to PHP 5.5. #664
    • ๐Ÿฑ ๐ŸŒŸ New PHPCompatibility.ControlStructures.NewListInForeach sniff to detect unpacking nested arrays into separate variables via the list() construct in a foreach() statement. This was not supported prior to PHP 5.5. #657
    • ๐Ÿฑ ๐ŸŒŸ New PHPCompatibility.FunctionNameRestrictions.RemovedNamespacedAssert sniff to detect declaring a function called assert() within a namespace. This has been deprecated as of PHP 7.3. #735. Partially fixes #718.
    • ๐Ÿฑ ๐ŸŒŸ New PHPCompatibility.Lists.AssignmentOrder sniff to detect list() constructs affected by the change in assignment order in PHP 7.0. #656
    • ๐Ÿฑ ๐ŸŒŸ New PHPCompatibility.Lists.NewKeyedList sniff to detect usage of keys in list(), support for which was added in PHP 7.1. #655. Fixes #252.
    • ๐Ÿฑ ๐ŸŒŸ New PHPCompatibility.Lists.NewListReferenceAssignment sniff to detect reference assignments being used in list() constructs, support for which has been added in PHP 7.3. #731
    • ๐Ÿฑ ๐ŸŒŸ New PHPCompatibility.Lists.NewShortList sniff to detect the shorthand array syntax [] being used for symmetric array destructuring as introduced in PHP 7.1. #654. Fixes #248.
    • ๐Ÿฑ ๐ŸŒŸ New PHPCompatibility.Operators.NewOperators sniff which checks for usage of the pow, pow equals, spaceship and coalesce (equals) operators. #738
      These checks were previously contained within the PHPCompatibility.LanguageConstructs.NewLanguageConstructs sniff.
    • ๐Ÿฑ ๐ŸŒŸ New PHPCompatibility.ParameterValues.ForbiddenGetClassNull sniff to detect null being passed to get_class(), support for which has been removed in PHP 7.2 #659. Fixes #557.
    • ๐Ÿฑ ๐ŸŒŸ New PHPCompatibility.ParameterValues.NewArrayReduceInitialType sniff to detect non-integers being passed as the $initial parameter to the array_reduce() function, which was not supported before PHP 5.3. #666. Fixes #649
    • ๐Ÿฑ ๐ŸŒŸ New PHPCompatibility.ParameterValues.NewFopenModes sniff to examine the $mode parameter passed to fopen() for modes not available in older PHP versions. #658
    • ๐Ÿฑ ๐ŸŒŸ New PHPCompatibility.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.
    • ๐Ÿฑ ๐ŸŒŸ New PHPCompatibility.ParameterValues.NewPackFormats sniff to examine the $format parameter passed to pack() for formats not available in older PHP versions. #665
    • ๐ŸŒŸ New PHPCompatibility.ParameterValues.RemovedIconvEncoding sniff to detect the PHP 5.6 deprecated encoding $types being passed to iconv_set_encoding(). #660. Fixes #475.
    • ๐Ÿฑ ๐ŸŒŸ New PHPCompatibility.ParameterValues.RemovedNonCryptoHashes sniff to detect non-cryptographic hash algorithms being passed to various hash_*() functions. This is no longer accepted as of PHP 7.2. #663. Fixes #559
    • ๐Ÿฑ ๐ŸŒŸ New PHPCompatibility.ParameterValues.RemovedSetlocaleString sniff to detect string literals being passed to the $category parameter of the setlocale() function. This behaviour was deprecated in PHP 4.2 and support has been removed in PHP 7.0. #661
    • ๐Ÿฑ ๐ŸŒŸ New PHPCompatibility.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 new CompileError and JsonException classes as introduced in PHP 7.3. #676
    • ๐Ÿฑ โญ๏ธ PHPCompatibility.Constants.NewConstants sniff: recognize new constants which are being introduced in PHP 7.3. #678
    • ๐Ÿฑ โญ๏ธ PHPCompatibility.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. #679
    • ๐Ÿ โญ๏ธ PHPCompatibility.FunctionUse.NewFunctions sniff: recognize the sapi_windows_*(), hash_hkdf() and pcntl_signal_get_handler() functions as introduced in PHP 7.1. #728
    • ๐Ÿฑ โญ๏ธ PHPCompatibility.FunctionUse.RemovedFunctionParameters sniff: recognize the deprecation of the $case_insensitive parameter for the define() function in PHP 7.3. #706
    • ๐Ÿฑ โญ๏ธ PHPCompatibility.FunctionUse.RemovedFunctions sniff: recognize the PHP 7.3 deprecation of the image2wbmp(), fgetss() and gzgetss() functions, as well as the deprecation of undocumented Mbstring function aliases. #681, #714, #720. Partially fixes #718.
    • โญ๏ธ PHPCompatibility.FunctionUse.RequiredToOptionalFunctionParameters sniff: account for the second parameter for array_push() and array_unshift() becoming optional in PHP 7.3, as well as for the $mode parameter for a range of ftp_*() functions becoming optional. #680
    • ๐Ÿฑ โญ๏ธ PHPCompatibility.IniDirectives.NewIniDirectives sniff: recognize new syslog and session ini directives as introduced in PHP 7.3. #702, #719, #730
    • ๐Ÿฑ โญ๏ธ PHPCompatibility.IniDirectives.NewIniDirectives sniff: recognize some more ini directives which were introduced in PHP 7.1. #727
    • ๐Ÿฑ โญ๏ธ PHPCompatibility.IniDirectives.RemovedIniDirectived sniff: recognize ini directives removed in PHP 7.3. #677, #717. Partially fixes #718.
    • ๐Ÿฑ โญ๏ธ New isNumericCalculation() and isVariable() utility methods to the PHPCompatibility\Sniff class. #664, #666
    • ๐Ÿฑ ๐Ÿ“š A section about the new sniff naming conventions to the Contributing file. #738

    ๐Ÿ”„ Changed

    • ๐Ÿฑ ๐Ÿ”ฅ 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. #738. Fixes #601, #692
      ๐Ÿ‘€ See the table at the top of this changelog for details of all the file renames.
    • ๐Ÿฑ โ˜”๏ธ The unit test files have been moved about as well. #738
      • The directory structure for these now mirrors the default directory structure used by PHPCS itself.
      • The file names of the unit test files have been adjusted for the changes made in the sniffs.
      • The unit test case files have been renamed and moved to the same directory as the actual test file they apply to.
      • The BaseSniffTest::sniffFile() method has been adjusted to match. The signature of this method has changed. Where it previously expected a relative path to the unit test case file, it now expects an absolute path.
      • The unit tests for the utility methods in the PHPCompatibility\Sniff class have been moved to a new PHPCompatibility\Util\Tests\Core subdirectory.
      • The bootstrap file used for PHPUnit has been moved to the project root directory and renamed phpunit-bootstrap.php.
    • ๐Ÿ”€ The PHPCompatibility.LanguageConstructs.NewLanguageConstructs sniff has been split into two sniffs. #738
      The PHPCompatibility.LanguageConstructs.NewLanguageConstructs sniff now contains just the checks for the namespace separator and the ellipsis.
      The new PHPCompatibility.Operators.NewOperators sniff now contains the checks regarding the pow, pow equals, spaceship and coalesce (equals) operators.
    • ๐Ÿฑ ๐Ÿ“Œ The PHPCompatibility.ParameterValues.RemovedMbstringModifiers sniff will now also recognize removed regex modifiers when used within a function call to one of the undocumented Mbstring function aliases for the Mbstring regex functions. #715
    • ๐Ÿฑ ๐Ÿ“Œ The PHPCompatibility\Sniff::getFunctionCallParameter() utility method now allows for closures called via a variable. #723
    • โฌ†๏ธ โœ๏ธ PHPCompatibility.Upgrade.LowPHPCS: the minimum supported PHPCS version is now 2.3.0. #699
    • ๐Ÿ“š โœ๏ธ Minor inline documentation improvements. #738
    • ๐Ÿฑ โ˜”๏ธ Minor improvements to the unit tests for the PHPCompatibility.FunctionNameRestrctions.RemovedMagicAutoload sniff. #716
    • ๐Ÿฑ โ™ป๏ธ Minor other optimizations. #698, #697
    • ๐Ÿ— ๐Ÿ”ง Minor improvements to the build tools. #701
    • ๐Ÿฑ ๐Ÿ”ง Removed some unnecessary inline annotations. #700
    • ๐Ÿฑ ๐Ÿ“š Replaced some of the badges in the Readme file. #721, #722
    • โšก๏ธ ๐Ÿ“š Composer: updated the list of package authors. #739

    โœ‚ Removed

    • ๐Ÿšซ Support for PHP_CodeSniffer 1.x and low 2.x versions. The new minimum version of PHP_CodeSniffer to be able to use this library is 2.3.0. #699. Fixes #691.
      The minimum recommended version of PHP_CodeSniffer remains the same, i.e. 2.6.0.
    • ๐Ÿšซ The \PHPCompatibility\Sniff::inUseScope() method has been removed as it is no longer needed now support for PHPCS 1.x has been dropped. #699
    • ๐Ÿšซ Composer: The autoload section has been removed from the composer.json file. #738. Fixes #568.
      0๏ธโƒฃ Autoloading for this library is done via the PHP_CodeSniffer default mechanism, enhanced with our own autoloader, so the Composer autoloader shouldn't be needed and was causing issues in a particular use-case.

    ๐Ÿ›  Fixed

    • ๐Ÿฑ ๐Ÿ› PHPCompatibility.FunctionUse.NewFunctionParameters sniff: The new $mode parameter of the php_uname() function was added in PHP 4.3, not in PHP 7.0 as was previously being reported.
      ๐Ÿ“š The previous implementation of this check was based on an error in the PHP documentation. The error in the PHP documentation has been rectified and the sniff has followed suit. #711
    • ๐Ÿฑ ๐Ÿ› PHPCompatibility.Generators.NewGeneratorReturn sniff: The sniff would throw false positives for return statements in nested constructs and did not correctly detect the scope which should be examined. #725. Fixes #724.
    • ๐Ÿ› PHPCompatibility.Keywords.NewKeywords sniff: PHP magic constants are case _in_sensitive. This sniff now accounts for this. #707
    • ๐Ÿฑ ๐Ÿ› Various bugs in the PHPCompatibility.Syntax.ForbiddenCallTimePassByReference sniff #723:
      • Closures called via a variable will now also be examined. (false negative)
      • References within arrays/closures passed as function call parameters would incorrectly trigger an error. (false positive)
    • ๐Ÿฑ ๐Ÿ’š Compatibility with PHPUnit 7.2. #712

    Credits

    ๐Ÿฑ Thanks go out to Jonathan Champ for his contribution to this version. ๐Ÿ‘