From 44bebfc3d6256c0760efb0a3686ca1cce81013c8 Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Mon, 6 Jan 2020 14:03:30 +0100 Subject: [PATCH] Only install PHPStan when we need it This is to avoid error when installing it on PHP < 7.1 --- .travis.yml | 3 +++ composer.json | 4 +--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index a669b13..6daaa9e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -36,6 +36,9 @@ script: - mkdir -p build/logs - php vendor/bin/simple-phpunit -v --coverage-clover build/logs/clover.xml - if [ "$CS_FIXER" = "run" ]; then php vendor/bin/php-cs-fixer fix --verbose --dry-run ; fi; + # only install phpstan when we need it + - if [ "$CS_FIXER" = "run" ]; then composer require phpstan/phpstan --no-progress --no-suggest ; fi; + - if [ "$CS_FIXER" = "run" ]; then composer require phpstan/phpstan-phpunit --no-progress --no-suggest ; fi; - if [ "$CS_FIXER" = "run" ]; then php vendor/bin/phpstan analyse src tests --no-progress --level 1 ; fi; after_script: diff --git a/composer.json b/composer.json index 79baa11..c789dbf 100644 --- a/composer.json +++ b/composer.json @@ -33,9 +33,7 @@ "php-coveralls/php-coveralls": "^2.1", "friendsofphp/php-cs-fixer": "^2.14", "monolog/monolog": "^1.24", - "symfony/phpunit-bridge": "^4.2.3", - "phpstan/phpstan-phpunit": "^0.11", - "phpstan/phpstan": "^0.11" + "symfony/phpunit-bridge": "^4.2.3" }, "suggest": { "ext-tidy": "Used to clean up given HTML and to avoid problems with bad HTML structure."