From 9d0452d11b48333fa79db9aa3c9508668e7843c5 Mon Sep 17 00:00:00 2001 From: logmanoriginal Date: Wed, 1 Aug 2018 18:48:19 +0200 Subject: [PATCH] [.travis] Use composer for HHVM This fixes the HHVM build failing because pear doesn't exist in HHVM. --- .travis.yml | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index cd5e2d9a..f50e2b49 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,12 +3,20 @@ sudo: false language: php install: - - pear channel-update pear.php.net - - pear install PHP_CodeSniffer + - if [[ $TRAVIS_PHP_VERSION == "hhvm" ]]; then + composer global require squizlabs/PHP_CodeSniffer; + else + pear channel-update pear.php.net; + pear install PHP_CodeSniffer; + fi script: - phpenv rehash - - phpcs . --standard=phpcs.xml --warning-severity=0 --extensions=php -p + - if [[ $TRAVIS_PHP_VERSION == "hhvm" ]]; then + /home/travis/.composer/vendor/bin/phpcs . --standard=phpcs.xml --warning-severity=0 --extensions=php -p; + else + phpcs . --standard=phpcs.xml --warning-severity=0 --extensions=php -p; + fi matrix: fast_finish: true