summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/ci-build.yml6
-rw-r--r--composer.json6
2 files changed, 9 insertions, 3 deletions
diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml
index 2aa6c5f8..894d4cc2 100644
--- a/.github/workflows/ci-build.yml
+++ b/.github/workflows/ci-build.yml
@@ -46,9 +46,6 @@ jobs:
- name: Syntax check only (lint)
run: find ./src/ -name "*.php" -print0 | xargs -0 -n1 -P8 php -l
- - name: Check PHP sources using phpstan
- run: composer require phpstan/phpstan '~0.12' && php ./vendor/bin/phpstan analyze --level max --no-progress --ansi ./src
-
- name: Get Composer Cache Directory # Docs: <https://github.com/actions/cache/blob/master/examples.md#php---composer>
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
@@ -63,6 +60,9 @@ jobs:
- name: Install Composer dependencies
run: composer install --prefer-dist --no-interaction --no-suggest # --prefer-source
+ - name: Analyze PHP source
+ run: composer analyze
+
- name: Install Go dependencies
run: go mod download
diff --git a/composer.json b/composer.json
index ef09fe20..12fbdf28 100644
--- a/composer.json
+++ b/composer.json
@@ -21,6 +21,12 @@
"symfony/console": "^2.5.0 || ^3.0.0 || ^4.0.0 || ^5.0.0",
"zendframework/zend-diactoros": "^1.3 || ^2.0"
},
+ "require-dev": {
+ "phpstan/phpstan": "~0.12"
+ },
+ "scripts": {
+ "analyze": "@php ./vendor/bin/phpstan analyze --level max --no-progress --ansi ./src"
+ },
"autoload": {
"psr-4": {
"Spiral\\RoadRunner\\": "src/"