From 7c4683784fc0deadb8195f1478159fe1893469e0 Mon Sep 17 00:00:00 2001 From: Tyson Andre Date: Mon, 19 Feb 2018 09:20:34 -0800 Subject: [PATCH] Add a script to run the same tests as jenkins locally Make `composer tests` use only phpcs Also add `composer all-tests`, which also runs the self-check. php-cs-fixer was removed from .travis.yml earlier. I'm guessing that composer was overlooked? The goal is to make it easy to create PRs passing travis checks. --- composer.json | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/composer.json b/composer.json index f7ebdfb4f..f87af16ea 100644 --- a/composer.json +++ b/composer.json @@ -41,12 +41,15 @@ "ext-igbinary": "^2.0.5" }, "scripts": { - "psalm": "./psalm", - "standards": "php ./vendor/friendsofphp/php-cs-fixer/php-cs-fixer fix --verbose --allow-risky=yes", + "psalm": "./psalm --find-dead-code", + "standards": "phpcs", "tests": [ - "php ./vendor/squizlabs/php_codesniffer/bin/phpcs", - "php ./vendor/friendsofphp/php-cs-fixer/php-cs-fixer fix --verbose --allow-risky=yes --dry-run .php_cs.dist", - "php ./vendor/friendsofphp/php-cs-fixer/php-cs-fixer fix --verbose --allow-risky=yes --dry-run", + "phpcs", + "phpunit" + ], + "all-tests": [ + "phpcs", + "./psalm --find-dead-code", "phpunit" ] }