PHPCompatibility v7.0.7 Release Notes

Release Date: 2016-10-20 // over 7 years ago
  • ๐Ÿ‘€ See all related issues and PRs in the [7.0.7 milestone].

    โž• Added

    • ๐Ÿ›  :star2: New ForbiddenBreakContinueOutsideLoop sniff: verify that break/continue is not used outside of a loop structure. This will cause fatal errors since PHP 7.0. #278. Fixes #275
    • ๐Ÿ›  :star2: New NewConstVisibility sniff: detect visibility indicators for class and interface constants as introduced in PHP 7.1. #280. Fixes #249
    • :star2: New NewHashAlgorithms sniff to check used hash algorithms against the PHP version in which they were introduced. #242
    • ๐Ÿ›  :star2: New NewMultiCatch sniff: detect catch statements catching multiple Exceptions as introduced in PHP 7.1. #281. Fixes #251
    • ๐Ÿ›  :star2: New NewNullableTypes sniff: detect nullable parameter and return type hints (only supported in PHPCS >= 2.3.4) as introduced in PHP 7.1. #282. Fixes #247
    • ๐Ÿšš :star: DeprecatedIniDirectives sniff: recognize PHP 7.1 removed session ini directives. #256
    • :star: NewFunctions sniff: recognize new socket_export_stream() function as introduced in PHP 7.0.7. #264
    • :star: NewFunctions sniff: recognize new curl_...(), is_iterable(), pcntl_async_signals(), session_create_id(), session_gc() functions as introduced in PHP 7.1. #273
    • :star: NewFunctionParameters sniff: recognize new OpenSSL function parameters as introduced in PHP 7.1. #258
    • :star: NewIniDirectives sniff: recognize new session ini directives as introduced in PHP 7.1. #259
    • :star: NewScalarReturnTypeDeclarations sniff: recognize PHP 7.1 void return type hint. #250
    • :star: NewScalarTypeDeclarations sniff: recognize PHP 7.1 iterable type hint. #255
    • ๐Ÿšš :star: Recognize the PHP 7.1 deprecated mcrypt functionality in the RemovedExtensions, DeprecatedFunctions and DeprecatedIniDirectives sniffs. #257

    ๐Ÿ”„ Changed

    • ๐Ÿšš :pushpin: LongArrays sniff used to only throw warnings. It will now throw errors for PHP versions in which the long superglobals have been removed. #270
    • โš  :pushpin: The NewIniDirectives sniff used to always throw an warning. Now it will throw an error when a new ini directive is used in combination with ini_set(). #246.
    • ๐Ÿšš :pushpin: RemovedHashAlgorithms sniff: also recognize removed algorithms when used with the PHP 5.5+ hash_pbkdf2() function. #240
    • :pushpin: Properly recognize nullable type hints in the getMethodParameters() utility method. #282
    • ๐Ÿ’… :pencil2: DeprecatedPHP4StyleConstructors sniff: minor error message text fix. #236
    • :pencil2: NewIniDirectives sniff: improved precision for the introduction version numbers being reported. #246
    • ๐ŸŽ :recycle: Various (minor) refactoring for improved performance and sniff accuracy. #238, #244, #240, #276
    • โœ… :umbrella: Re-activate the unit tests for the NewScalarReturnTypeDeclarations sniff. #250

    ๐Ÿ›  Fixed

    • ๐Ÿ’… :bug: The DeprecatedPHP4StyleConstructors sniff would not report errors when the case of the class name and the PHP4 constructor function name did not match. #236
    • ๐Ÿšš :bug: LongArrays sniff would report false positives for class properties shadowing removed PHP superglobals. #270. Fixes #268.
    • :bug: The NewClasses sniff would not report errors when the case of the class name used and "official" class name did not match. #237
    • :bug: The NewIniDirectives sniff would report violations against the PHP version in which the ini directive was introduced. This should be the version below it. #246
    • ๐Ÿ›  :bug: PregReplaceEModifier sniff would report false positives for compound regex parameters with different quote types. #266. Fixes #265.
    • ๐Ÿšš :bug: RemovedGlobalVariables sniff would report false positives for lowercase/mixed cased variables shadowing superglobals. #245.
    • ๐Ÿšš :bug: The RemovedHashAlgorithms sniff would not report errors when the case of the hash function name used and "official" class name did not match. #240
    • :bug: The ShortArray sniff would report all violations on the line of the PHP open tag, not on the lines of the short array open/close tags. #238

    Credits

    Thanks go out to [Juliette Reinders Folmer] for her contributions to this version. :clap: