Fix travis build: load PHPCS native bootstrap if available and test against PHP 7.2 #1130
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The upstream PR to support PHPUnit 6.x has (finally) been merged and will be released in PHPCS 3.1.
Currently builds against PHPCS
master
are failing because of this as the final version of the PHPCS PHPUnit 6.x support PR includes a test bootstrap in PHPCS which is not being loaded as we use our own bootstrap.Easily solved though, by loading the upstream bootstrap - if the file exists - from our own PHPCS 3 bootstrap file. That way our unit testing will be compatible with all supported PHPCS 3.x versions.
The
beStrictAboutTestsThatDoNotTestAnything="false"
addition to thephpunit.xml.dist
file is needed to prevent PHPUnit from reporting there are no tests in our test files (as the tests are in the upstream test suite and our "tests" are basically only data providers).The changes made in #873 should, for now, not be reverted as PHPCS < 3.1 is not compatible with PHPUnit 6.x and accounting for all the different situations with an
if
statement in the build script would get unnecessarily complicated. See the table below for more details.Once PHPCS 2.x support is dropped and the minimum supported PHPCS version has gone up to 3.1, we should be able to revert the changes made in #873 without issues (except for HHVM).
Upstream references:
Additionally:
nightly
has gone up to PHP7.3.0-dev
, so I've added PHP 7.2 to the build matrix.Detail overview of Travis build info as of today (Sept 8 2017):