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 Aug 26, 2019
1 parent 5c617a4 commit 2d7c435
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .travis.yml
Expand Up @@ -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
Expand Down

0 comments on commit 2d7c435

Please sign in to comment.