PHPCompatibility v7.1.3 Release Notes

Release Date: 2017-04-02 // about 7 years ago
  • ๐Ÿ‘€ See all related issues and PRs in the [7.1.3 milestone].

    โž• Added

    • โœ… :zap: The testVersion config parameter now allows for specifying unbounded ranges. For example: specifying -5.6 means: check for compatibility with all PHP versions up to and including PHP 5.6; Specifying 7.0- means: check for compatibility with all PHP versions from PHP 7.0 upwards. For more information about setting the testVersion, see Using the compatibility sniffs in the readme.
    • โœ… :umbrella: Unit test for multi-line short arrays for the ShortArray sniff. #347
    • โœ… :umbrella: Various additional unit tests against false positives. #345, #369
    • โœ… :umbrella: Unit tests for the supportsBelow(), supportsAbove() and getTestVersion() utility methods. #363
    • :books: Readme: information about installation of the standard using git check-out. #349
    • โœ… :books: Contributing.md file with information about reporting bugs, requesting features, making pull requests and running the unit tests. #350

    ๐Ÿ”„ Changed

    • :pushpin: The ForbiddenFunctionParametersWithSameName, NewScalarTypeDeclarations, ParameterShadowSuperGlobals sniff will now also sniff for and report violations in closures. #331
    • :twisted_rightwards_arrows: :rewind: The check for the PHP 5.3 nowdoc structure has been moved from the NewKeywords sniff to a new stand-alone NewNowdoc sniff which will now also recognize this structure when the sniffs are run on PHP 5.2. #335
    • :rewind: The ForbiddenNames sniff will now also correctly recognize reserved keywords used in a declared namespace when run on PHP 5.2. #362
    • ๐ŸŽ :recycle: Various (minor) refactoring for improved performance and sniff accuracy. #360
    • โœ… :recycle: The unit tests would previously run each test case file against all PHPCompatibility sniffs. Now, they will only be tested against the sniff which the test case file is intended to test. This allows for more test cases to be tested, more precise testing in combination with testVersion settings and makes the unit tests run ~6 x faster. Relevant additional unit tests have been added and others adjusted. #369
    • ๐Ÿ”จ :recycle: Refactoring/tidying up of some unit test code. #343, #345, #356, #355, #359
    • General housekeeping. #346
    • :books: Readme: Clarify minimum requirements and influence on the results. #348

    โœ‚ Removed

    • :twisted_rightwards_arrows: Removed the LongArrays sniff. The checks it contained have been moved into the RemovedGlobalVariables sniff. Both sniffs essentially did the same thing, just for different PHP native superglobals. #354

    ๐Ÿ›  Fixed

    • :bug: The PregReplaceEModifier sniff would throw a false positive if a quote character was used as the regex delimiter. #357
    • :bug: RemovedGlobalVariables sniff would report false positives for class properties shadowing the removed $HTTP_RAW_POST_DATA variables. #354.
    • :bug: The getFQClassNameFromNewToken() utility function could go into an infinite loop causing PHP to run out of memory when examining unfinished code (examination during live coding). #338, #342
    • :bug: The determineNamespace() utility method would in certain cases not break out a loop. #358
    • :wrench: Travis script: Minor tweak for PHP 5.2 compatibility. #341
    • โœ… :wrench: The unit test suite is now also compatible with PHPUnit 6. #365
    • :books: Readme: Typo in the composer instructions. #344

    Credits

    Thanks go out to [Arthur Edamov], [Juliette Reinders Folmer], [Mark Clements] and [Tadas Juozapaitis] for their contributions to this version. :clap: