Travis: test against PHP 7.4, not 8.0 and fix PHPUnit failing by jrfnl · Pull Request #790 · PHPCompatibility/PHPCompatibility
added 4 commits
February 11, 2019 16:39PHPUnit 8 adds `void` return type declarations to the PHPUnit methods used by PHPCS, making it neigh impossible to make the unit test suite cross-version compatible for the PHP versions supported by PHPCompatibility. As of the recent update to the Travis images, the images for PHP 7.2+ now ship with PHPUnit 8 which causes the unit tests to fail. Officially, PHPUnit 7 is compatible with PHP 7.1, 7.2 and 7.3. Ref: https://phpunit.de/supported-versions.html So, for Travis images which come natively with PHPUnit 8 (PHP >= 7.2), PHPUnit 7 needs to be installed via Composer.
As PHP 7.3 has been released, the build to test code coverage should be run on PHP 7.3. This should raise the code coverage as for, for instance, the `FlexibleHeredocNowdoc` sniff, code coverage for a significant part of the sniff will only show up when run on PHP 7.3. In contrast to when the PHP 7.3 build was added, there does appear to be a code coverage driver available for PHP 7.3 by now, so we should be safe to make this change now. Ref: 764
There is no PHPUnit version which is currently compatible with PHP 8. As that either means that the builds for nightly would always fail or - if the unit tests would be skipped -, the only check executed on nightly would be linting the files, I've elected to remove build testing against nightly for the time being. For more details about PHPUnit vs PHPCS vs PHP 8, see squizlabs/PHP_CodeSniffer 2416
jrfnl
mentioned this pull request
wimg approved these changes Mar 10, 2019
jrfnl
deleted the
feature/travis-tweaks
branch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters