From c63103f64226c9a7339fc87dd5e0a7a2a3e4625d Mon Sep 17 00:00:00 2001 From: sgiehl Date: Sat, 27 Jul 2019 11:10:18 +0200 Subject: [PATCH] enable phpcs and phpstan on travis --- .travis.yml | 4 +++- phpstan.neon | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 5f9d73199f..222358b1ec 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,7 +13,7 @@ services: - memcached before_script: - - sh -c 'if [ "$TRAVIS_PHP_VERSION" != "hhvm" ]; then echo "extension = memcache.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini; fi;' + - (echo yes | pecl install -f memcache; true) - (composer self-update; true) - if [[ "$TRAVIS_PHP_VERSION" = 7.1 ]]; then composer require php-coveralls/php-coveralls ^2.1; fi - composer require doctrine/cache ~1.2 @@ -22,6 +22,8 @@ before_script: script: - mkdir -p build/logs - ./vendor/phpunit/phpunit/phpunit --coverage-clover build/logs/clover.xml + - if [[ "$TRAVIS_PHP_VERSION" = 7.1 ]]; then vendor/bin/phpstan analyse -c phpstan.neon . --no-interaction --no-progress; fi + - if [[ "$TRAVIS_PHP_VERSION" = 7.1 ]]; then vendor/bin/phpcs --standard=phpcs.xml .; fi after_success: - if [[ "$TRAVIS_PHP_VERSION" = 7.1 ]]; then travis_retry php vendor/bin/php-coveralls -v; fi diff --git a/phpstan.neon b/phpstan.neon index 97dcb58136..4c3c7c3ea7 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -10,3 +10,4 @@ parameters: - %rootDir%/../../../autoload.php ignoreErrors: - '#.+Doctrine\\Common\\Cache\\CacheProvider.+#' + reportUnmatchedIgnoredErrors: false \ No newline at end of file