In .travis.yml, and thus in the automated tests that run on Travis CI:
PHP versions now covered: 5.6 through 7.1 (not 7.2, for reasons explained later)
WordPress versions now covered: 3.8 through 4.9, at the level of the latest security patch
Why
This PR expands the versions tested because we want to make sure that the plugin is compatible with recent PHP and WordPress versions. The simple way to do that is to enumerate a list of WordPress versions and a list of PHP versions, and then run the tests at each intersection. Not only is this approach inefficient, it causes problems when old versions of WordPress include a test suite that assumes an old version of PHPUnit, which is not available when Travis CI only offers one version of PHPUnit per PHP version.
Based on research in npr/pmp-php-sdk#36,
Travis CI runs tests using the following PHPUnit versions:
PHP 5.6: PHPUnit 5.7.23
PHP 7: PHPUnit 6.4.3
PHP 7.1: PHPUnit 6.4.3
PHP 7.2: PHPUnit 7.0.2
Reasons that given versions of WordPress have tests incompatible with travis-ci.org:
There are PHP warnings about deprecated PHP-4-style constructors.
Requires PHPUnit 5 because PHPUnit 6 support was not included until WordPress 4.7.
Unless there's been an update since this trac thread, WordPress tests still assume PHPUnit 6, and Travis runs PHP 7.2 tests using PHPUnit 7
Changes
In
.travis.yml
, and thus in the automated tests that run on Travis CI:Why
This PR expands the versions tested because we want to make sure that the plugin is compatible with recent PHP and WordPress versions. The simple way to do that is to enumerate a list of WordPress versions and a list of PHP versions, and then run the tests at each intersection. Not only is this approach inefficient, it causes problems when old versions of WordPress include a test suite that assumes an old version of PHPUnit, which is not available when Travis CI only offers one version of PHPUnit per PHP version.
Based on research in npr/pmp-php-sdk#36, Travis CI runs tests using the following PHPUnit versions:
Reasons that given versions of WordPress have tests incompatible with travis-ci.org: