Skip to content

Commit 05e9ac7

Browse files
committed
Travis: PHP 7.4 is no longer allowed to fail
... as it is coming out in less than a month's time. ... and add a build against `nightly`, which _is_ allowed to fail. This build will - for now - only lint the PHP files and run the "feature complete" integration test. The unit tests are skipped for the time being, as the PHPCS native unit test suite is not yet compatible with PHP 8. Includes adjusting the Readme badge showing the versions the tool is tested against.
1 parent aff2f40 commit 05e9ac7

2 files changed

Lines changed: 14 additions & 7 deletions

File tree

.travis.yml

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -86,13 +86,17 @@ jobs:
8686
# PHPCS is only compatible with PHP 7.3 as of version 3.3.1.
8787
- php: 7.3
8888
env: PHPCS_VERSION="3.3.1"
89+
- php: "7.4snapshot"
90+
env: PHPCS_VERSION="dev-master"
8991
# PHPCS is only compatible with PHP 7.4 as of version 3.5.0.
9092
- php: "7.4snapshot"
91-
env: PHPCS_VERSION=dev-master"
93+
env: PHPCS_VERSION="3.5.0"
94+
- php: "nightly"
95+
env: PHPCS_VERSION="n/a" LINT=1
9296

9397
allow_failures:
9498
# Allow failures for unstable builds.
95-
- php: "7.4snapshot"
99+
- php: "nightly"
96100

97101

98102
before_install:
@@ -102,16 +106,19 @@ before_install:
102106
# On stable PHPCS versions, allow for PHP deprecation notices.
103107
# Unit tests don't need to fail on those for stable releases where those issues won't get fixed anymore.
104108
- |
105-
if [[ "$TRAVIS_BUILD_STAGE_NAME" != "Sniff" && $PHPCS_BRANCH != "dev-master" ]]; then
109+
if [[ "$TRAVIS_BUILD_STAGE_NAME" != "Sniff" && "$PHPCS_VERSION" != "dev-master" && "$PHPCS_VERSION" != "n/a" ]]; then
106110
echo 'error_reporting = E_ALL & ~E_DEPRECATED' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
107111
fi
108112
109113
- export XMLLINT_INDENT=" "
110114

111115
# Set up test environment using Composer.
112-
- composer require --no-update --no-scripts squizlabs/php_codesniffer:${PHPCS_VERSION}
113116
- |
114-
if [[ "$TRAVIS_BUILD_STAGE_NAME" == "Sniff" ]]; then
117+
if [[ $PHPCS_VERSION != "n/a" ]]; then
118+
composer require --no-update --no-scripts squizlabs/php_codesniffer:${PHPCS_VERSION}
119+
fi
120+
- |
121+
if [[ "$TRAVIS_BUILD_STAGE_NAME" == "Sniff" || $PHPCS_VERSION == "n/a" ]]; then
115122
# The sniff stage doesn't run the unit tests, so no need for PHPUnit.
116123
composer remove --dev phpunit/phpunit --no-update --no-scripts
117124
elif [[ "$PHPCS_VERSION" < "3.1.0" ]]; then
@@ -141,4 +148,4 @@ script:
141148
- if [[ "$LINT" == "1" ]]; then composer validate --no-check-all --strict; fi
142149

143150
# Run the unit tests.
144-
- composer run-tests
151+
- if [[ $PHPCS_VERSION != "n/a" ]]; then composer run-tests; fi

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ PHPCSDevTools for developers of PHP_CodeSniffer sniffs
1010
[![Last Commit to Unstable](https://img.shields.io/github/last-commit/PHPCSStandards/PHPCSDevTools/develop.svg)](https://github.com/PHPCSStandards/PHPCSDevTools/commits/develop)
1111

1212
[![Minimum PHP Version](https://img.shields.io/packagist/php-v/phpcsstandards/phpcsdevtools.svg?maxAge=3600)](https://packagist.org/packages/phpcsstandards/phpcsdevtools)
13-
[![Tested on PHP 5.4 to 7.4 snapshot](https://img.shields.io/badge/tested%20on-PHP%205.4%20|%205.5%20|%205.6%20|%207.0%20|%207.1%20|%207.2%20|%207.3%20|%207.4snapshot-brightgreen.svg?maxAge=2419200)](https://travis-ci.com/PHPCSStandards/PHPCSDevTools)
13+
[![Tested on PHP 5.4 to nightly](https://img.shields.io/badge/tested%20on-PHP%205.4%20|%205.5%20|%205.6%20|%207.0%20|%207.1%20|%207.2%20|%207.3%20|%207.4snapshot%20|%20nightly-brightgreen.svg?maxAge=2419200)](https://travis-ci.com/PHPCSStandards/PHPCSDevTools)
1414

1515
[![License: LGPLv3](https://poser.pugx.org/phpcsstandards/phpcsdevtools/license.png)](https://github.com/PHPCSStandards/PHPCSDevTools/blob/master/LICENSE)
1616
![Awesome](https://img.shields.io/badge/awesome%3F-yes!-brightgreen.svg)

0 commit comments

Comments
 (0)