diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2a760eb..57032c1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -83,7 +83,7 @@ jobs: with: php-version: '8.1' extensions: mbstring, intl - tools: cs2pr + tools: cs2pr, phive coverage: none - name: Get composer cache directory @@ -101,11 +101,14 @@ jobs: key: ${{ runner.os }}-composer-${{ steps.key-date.outputs.date }}-${{ hashFiles('composer.json') }}-${{ matrix.prefer-lowest }} - name: Composer install - run: composer stan-setup + run: composer update + + - name: Install PHP tools with phive. + run: phive install --trust-gpg-keys 'CF1A108D0E7AE720,51C67305FFC2E5C0,12CE0F1D262429A5' - name: Run PHP CodeSniffer run: vendor/bin/phpcs --report=checkstyle src/ tests/ | cs2pr - name: Run phpstan - if: success() || failure() - run: vendor/bin/phpstan.phar analyse --error-format=github + if: always() + run: tools/phpstan analyse --error-format=github diff --git a/.gitignore b/.gitignore index 7d92a90..690f4be 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ composer.phar composer.lock .phpunit.result.cache phpunit.xml +tools/ diff --git a/.phive/phars.xml b/.phive/phars.xml new file mode 100644 index 0000000..2c741fd --- /dev/null +++ b/.phive/phars.xml @@ -0,0 +1,4 @@ + + + + diff --git a/composer.json b/composer.json index 6d83b77..1bc1603 100644 --- a/composer.json +++ b/composer.json @@ -52,11 +52,11 @@ ], "cs-check": "phpcs --colors --parallel=16 -p src/ tests/", "cs-fix": "phpcbf --colors --parallel=16 -p src/ tests/", - "phpstan": "phpstan.phar analyse", + "phpstan": "tools/phpstan analyse", "stan": [ "@phpstan" ], - "stan-setup": "cp composer.json composer.backup && composer require --dev phpstan/phpstan:~1.8.0 && mv composer.backup composer.json", + "stan-setup": "phive install", "test": "phpunit" }, "config": {