Skip to content

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

Merged
GaryJones merged 2 commits into
developfrom
feature/travis-test-against-php-7.4
Feb 11, 2019
Merged

Travis: test builds against PHP 7.4 & work around for PHPUnit 8#1643
GaryJones merged 2 commits into
developfrom
feature/travis-test-against-php-7.4

Conversation

@jrfnl

@jrfnl jrfnl commented Feb 11, 2019

Copy link
Copy Markdown
Member

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.
This has been implemented in the same way as a similar requirement was previously implemented fo HHVM.

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


Note: I've set this PR to prio:high as builds will currently fail without this fix, so this is a blocker for any new PR and for merging existing PRs (until this PR has been merged).

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:
* https://twitter.com/nikita_ppv/status/1089839541828112384
* https://twitter.com/nikita_ppv/status/1094897743594770433
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.
This has been implemented in the same way as a similar requirement was previously implemented fo HHVM.

As for nightly: there is no PHPUnit version which is currently compatible with PHP 8.
As that either mean 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.
@GaryJones GaryJones merged commit e41ea6a into develop Feb 11, 2019
@GaryJones GaryJones deleted the feature/travis-test-against-php-7.4 branch February 11, 2019 21:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants