PHPCompatibility v7.0.5 Release Notes

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

    โž• Added

    • ๐Ÿ—„ :star2: New MbstringReplaceEModifier sniff to detect the use of the PHP 7.1 deprecated e modifier in Mbstring regex functions. #202
    • :star: The ForbiddenBreakContinueVariableArguments sniff will now also report on break 0/continue 0 which is not allowed since PHP 5.4. #209
    • :star: New getFunctionCallParameters(), getFunctionCallParameter() utility methods in the PHPCompatibility_Sniff base class. #170
    • :star: New tokenHasScope() utility method in the PHPCompatibility_Sniff base class. #189
    • โœ… :umbrella: Unit test for goto and callable detection and some other miscellanous extra unit tests for the NewKeywords sniff. #189
    • :books: Readme: Information for sniff developers about running unit tests for other sniff libraries using the PHPCS native test framework without running into conflicts with the PHPCompatibility specific unit test framework. #217

    ๐Ÿ”„ Changed

    • :pushpin: The ForbiddenNames sniff will now also check interface declarations for usage of reserved keywords. #200
    • ๐Ÿ— :pushpin: PregReplaceEModifier sniff: improved handling of regexes build up of a combination of variables, function calls and/or text strings. #201
    • :rewind: The NewKeywords sniff will now also correctly recognize new keywords when used in combination with older PHPCS versions and/or run on older PHP versions. #189
    • :pencil2: PregReplaceEModifier sniff: minor improvement to the error message text. #201
    • ๐ŸŽ :recycle: Various (minor) refactoring for improved performance and sniff accuracy. #170, #188, #189, #199, #200, #201, #208
    • ๐Ÿšš :wrench: The unit tests for the utility methods have been moved to their own subdirectory within Tests. #215
    • โœ… :green_heart: The sniffs are now also tested against PHP 7.1 for consistent results. #216

    โœ‚ Removed

    ๐Ÿ›  Fixed

    • :bug: ConstantArraysUsingDefine sniff: the version check logic was reversed causing the error not to be reported in certain circumstances. #199
    • ๐Ÿ—„ :bug: The DeprecatedIniDirectives and NewIniDirectives sniffs could potentially trigger on the ini value instead of the ini directive name. #170
    • โœ… :bug: ForbiddenNames sniff: Reserved keywords when used as the name of a constant declared using define() would always be reported independently of the testVersion set. #200
    • :bug: PregReplaceEModifier sniff would not report errors when the function name used was not in lowercase. #201
    • :bug: TernaryOperators sniff: the version check logic was reversed causing the error not to be reported in certain circumstances. #188
    • โš  :bug: The getFQClassNameFromNewToken() and getFQClassNameFromDoubleColonToken() utility methods would get confused when the class name was a variable instead of being hard-coded, resulting in a PHP warning being thown. #206. Fixes #205.
    • ๐Ÿ›  :bug: The getFunctionCallParameters() utility method would incorrectly identify an extra parameter if the last parameter passed to a function would have an - unnecessary - comma after it. The getFunctionCallParameters() utility method also did not handle parameters passed as short arrays correctly. #213. Fixes #211.
    • โœ… :umbrella: Unit tests for the NewFunctionArrayDereferencing sniff were not being run due to a naming error. #208
    • โœ… :books: Readme: Information about setting the testVersion from a custom ruleset was incorrect. #204
    • โœ… :wrench: Path to PHPCS in the unit tests breaking for non-Composer installs. #198

    Credits

    Thanks go out to [Juliette Reinders Folmer] and [Yoshiaki Yoshida] for their contributions to this version. :clap: