WPTT / WPThemeReview

PHP_CodeSniffer rules (sniffs) to enforce WordPress theme review coding conventions
MIT License
208 stars 38 forks source link

Travis: test builds against PHP 7.4 & work around for PHPUnit 8 #198

Closed jrfnl closed 5 years ago

jrfnl commented 5 years ago

Travis: test builds against PHP 7.4

Nightly has become PHP 8.0 since PHP 7.4 has been branched, so to continue to also test against PHP 7.4, it needs to be added separately.

Refs:

Travis: work around PHPUnit 8.x on PHP >= 7.2 images

As of recently, the Travis images for PHP 7.2+ ship with PHPUnit 8.x. The PHPCS native test framework is not compatible with PHPUnit 8.x and won't be able to be made compatible with it until the minimum PHP version would be raised to PHP 7.1.

So for the unit tests to be able to run on PHP 7.2+, we need to explicitly require PHPUnit 7.x for those builds.

As for nightly: 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 commented 5 years ago

I've added one additional commit to this PR:

Travis: don't allow failures on PHP 7.3

As the minimum required PHPCS version is now PHPCS 3.3.1, builds against PHP 7.3 should no longer be allowed to fail.

dingo-d commented 5 years ago

Once this is merged can we release 0.2.0? All that is needed is a changelog I think.

jrfnl commented 5 years ago

@dingo-d If you think it's a good idea, of course we can do a release.

Looking at the milestone though, there aren't really any functionality changes, so should the release be 0.2.0 or 0.1.1 ?

dingo-d commented 5 years ago

I'm fine with 0.1.1 if there aren't any new functionality added 🙂