diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 13dee97a42..f7669c3157 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -45,5 +45,8 @@ jobs: - name: Run code style check run: composer run-script check-cs -- --format=checkstyle | cs2pr + - name: Run PHPStan analysis + run: composer run-script phpstan + - name: Run test suite run: composer run-script --timeout=600 test diff --git a/composer.json b/composer.json index 7f43af59c3..6632d47787 100644 --- a/composer.json +++ b/composer.json @@ -55,12 +55,14 @@ "phpunit/phpunit": "^8.1", "matthiasnoback/symfony-dependency-injection-test": "^4.0", "ezsystems/doctrine-dbal-schema": "^1.0@dev", - "ezsystems/ezplatform-code-style": "^1.0" + "ezsystems/ezplatform-code-style": "^1.0", + "phpstan/phpstan": "^0.12.99" }, "scripts": { "fix-cs": "php-cs-fixer fix --config=.php-cs-fixer.php --show-progress=dots", "check-cs": "@fix-cs --dry-run", - "test": "phpunit -c phpunit.xml" + "test": "phpunit -c phpunit.xml", + "phpstan": "phpstan analyse -c phpstan.neon" }, "extra": { "branch-alias": { diff --git a/phpstan.neon b/phpstan.neon new file mode 100644 index 0000000000..35123d6cc1 --- /dev/null +++ b/phpstan.neon @@ -0,0 +1,4 @@ +parameters: + level: 0 + paths: + - src