PHPCompatibility v7.0.4 Release Notes

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

    โž• Added

    • :star2: New EmptyNonVariable sniff: detection of empty being used on non-variables for PHP < 5.5. #187
    • ๐Ÿ›  :star2: New NewMagicMethods sniff: detection of declaration of magic methods before the method became "magic". Includes a check for the changed behaviour for the __toString() magic method in PHP 5.2. #176. Fixes #64.
    • ๐Ÿšš :star2: New RemovedAlternativePHPTags sniff: detection of ASP and script open tags for which support was removed in PHP 7.0. #184, #193. Fixes #127.
    • :star: NonStaticMagicMethods sniff: detection of the __callStatic(), __sleep(), __toString() and __set_state() magic methods.
    • ๐Ÿ‘• :green_heart: Lint all non-test case files for syntax errors during the build testing by Travis. #192

    ๐Ÿ”„ Changed

    • :pushpin: NonStaticMagicMethods sniff: will now also sniff traits for magic methods. #174
    • :pushpin: NonStaticMagicMethods sniff: will now also check for magic methods which should be declared as static. #174
    • ๐ŸŽ :recycle: Various (minor) refactoring for improved performance and sniff accuracy. #178, #179, #174, #171
    • โœ… :recycle: The unit test suite now internally caches PHPCS run results in combination with a set testVersion to speed up the running of the unit tests. These are now ~3 x faster. #148
    • :books: Readme: Minor clarification of the minimum requirements.
    • โœ… :books: Readme: Advise to use the latest stable version of this repository.
    • โœ… :wrench: The unit tests can now be run with PHPCS installed in an arbitrary location by passing the location through an environment option. #191.
    • ๐Ÿ”ง :wrench: Improved coveralls configuration and compatibility. #194
    • โœ… :green_heart: The sniffs are now also tested against PHP 5.2 for consistent results. Except for namespace, trait and group use related errors, most sniffs work as intended on PHP 5.2. #196

    ๐Ÿ›  Fixed

    • :bug: The ForbiddenBreakContinueVariableArguments sniff would not report on break/continue with a closure as an argument. #171
    • :bug: The ForbiddenNamesAsInvokedFunctions sniff would not report on reserved keywords which were not lowercase. #186
    • :bug: The ForbiddenNamesAsInvokedFunctions sniff would not report on the goto and namespace keywords when run on PHP 5.2. #193
    • :bug: NewAnonymousClasses sniff: the version check logic was reversed causing the error not to be reported in certain circumstances. #195.
    • :bug: NewGroupUseDeclarations sniff: the version check logic was reversed causing the error not to be reported in certain circumstances. #190.
    • :bug: The NonStaticMagicMethods sniff would not report on magic methods when the function name as declared was not in the same case as used in the PHP manual. #174
    • โœ… :wrench: The unit tests would exit with 0 if PHPCS could not be found. #191
    • :green_heart: The PHPCompatibility library itself was not fully compatible with PHP 5.2. #193

    Credits

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