From 48c04e3e8c18c25419eca24016f53152196f1b3e 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 | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.travis.yml b/.travis.yml index 5743a525e..7894baa9b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -112,6 +112,14 @@ 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 + - php -r "echo ini_get('error_reporting');" + - export XMLLINT_INDENT=" " # Toggle the PHPUnit versions if necessary, depending on the known Travis configurations.