Skip to content

Commit 47a441e

Browse files
authored
Merge pull request #455 from Automattic/feature/travis-php-7.4
Travis: test against PHP 7.4, not snapshot
2 parents 48e83cc + d9a7529 commit 47a441e

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

.travis.yml

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ php:
1818
- 7.1
1919
- 7.2
2020
- 7.3
21-
- "7.4snapshot"
21+
- 7.4
22+
- "nightly"
2223

2324
# Rather than a `matrix` property, we use build stages. This allows early
2425
# build failure for basic linting and sniffing issues.
@@ -31,7 +32,7 @@ stages:
3132

3233
jobs:
3334
allow_failures:
34-
- php: "7.4snapshot"
35+
- php: "nightly"
3536
include:
3637

3738
- stage: lint
@@ -73,9 +74,20 @@ before_install:
7374
# https://twitter.com/kelunik/status/954242454676475904
7475
- phpenv config-rm xdebug.ini || echo 'No xdebug config.'
7576

77+
# On stable PHPCS versions, allow for PHP deprecation notices.
78+
# Unit tests don't need to fail on those for stable releases where those issues won't get fixed anymore.
79+
- |
80+
if [[ "$TRAVIS_BUILD_STAGE_NAME" != "Sniff" && $PHPCS_BRANCH != "dev-master" ]]; then
81+
echo 'error_reporting = E_ALL & ~E_DEPRECATED' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
82+
fi
83+
7684
install:
7785
- composer require squizlabs/php_codesniffer:"$PHPCS_BRANCH" --update-no-dev --no-suggest --no-scripts
78-
- composer install --dev --no-suggest
86+
- |
87+
# Don't need dev dependencies for running `php -l`.
88+
if [[ "$TRAVIS_BUILD_STAGE_NAME" != "Lint" ]]; then
89+
composer install --dev --no-suggest
90+
fi
7991
8092
script:
8193
# Run the unit tests.

0 commit comments

Comments
 (0)