From 2d7c435977ef3e495831d7805604f649d59709b6 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 682c38921..a22d6ebf3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -150,6 +150,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 + # Allow for testing with different PHP ini configurations. - | if [[ "$CUSTOM_INI" == 1 ]]; then