From 89b136905ac18ade06a73be82aafd0434ef77ea9 Mon Sep 17 00:00:00 2001 From: jrfnl Date: Sun, 21 Jul 2019 21:12:33 +0200 Subject: [PATCH] Travis: ignore PHP deprecation notices for stable PHPCS releases 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. --- .travis.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.travis.yml b/.travis.yml index 5743a525e..e4591ac00 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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.