Skip to content

Commit

Permalink
Travis: ignore PHP deprecation notices for stable PHPCS releases
Browse files Browse the repository at this point in the history
The unit tests will fail when a PHP warning/notice/deprecation notice is encountered.

Deprecation notices thrown by already released PHPCS versions won't get fixed anymore (in that version), so failing the unit tests on those is moot and will skew the reliability of the Travis results.
  • Loading branch information
jrfnl committed Jul 21, 2019
1 parent 3db1bf1 commit 89b1369
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .travis.yml
Expand Up @@ -112,6 +112,13 @@ before_install:
phpenv config-rm xdebug.ini || echo 'No xdebug config.'
fi
# On stable PHPCS versions, allow for PHP deprecation notices.
# Unit tests don't need to fail on those for stable releases where those issues won't get fixed anymore.
- |
if [[ "$TRAVIS_BUILD_STAGE_NAME" != "Sniff" && $PHPCS_VERSION != "dev-master" ]]; then
echo 'error_reporting = E_ALL & ~E_DEPRECATED' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
fi
- export XMLLINT_INDENT=" "

# Toggle the PHPUnit versions if necessary, depending on the known Travis configurations.
Expand Down

0 comments on commit 89b1369

Please sign in to comment.