From f0e4199ab41cf17794be9e817a91d23b5603dd9d Mon Sep 17 00:00:00 2001 From: David Grudl Date: Thu, 29 Oct 2020 01:44:33 +0100 Subject: [PATCH] updated phpstan --- .github/workflows/static-analysis.yml | 4 ++-- .travis.yml | 2 +- composer.json | 2 +- phpstan.neon | 5 +++++ 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/static-analysis.yml b/.github/workflows/static-analysis.yml index e129028ce..b0692d716 100644 --- a/.github/workflows/static-analysis.yml +++ b/.github/workflows/static-analysis.yml @@ -11,11 +11,11 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - uses: shivammathur/setup-php@v1 + - uses: shivammathur/setup-php@v2 with: php-version: 7.4 coverage: none - run: composer install --no-progress --prefer-dist - - run: composer phpstan + - run: composer phpstan -- --no-progress continue-on-error: true # is only informative diff --git a/.travis.yml b/.travis.yml index 340b89ec2..10dc9b292 100644 --- a/.travis.yml +++ b/.travis.yml @@ -39,7 +39,7 @@ jobs: - stage: Static Analysis (informative) php: 7.4 script: - - composer run-script phpstan + - composer phpstan -- --no-progress - stage: Code Coverage diff --git a/composer.json b/composer.json index 5a9d06095..ed96f486a 100644 --- a/composer.json +++ b/composer.json @@ -41,7 +41,7 @@ }, "minimum-stability": "dev", "scripts": { - "phpstan": "phpstan analyse --level 5 src --configuration phpstan.neon", + "phpstan": "phpstan analyse", "tester": "tester tests -s" }, "extra": { diff --git a/phpstan.neon b/phpstan.neon index 431aa3c6e..d7357c01a 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -1,4 +1,9 @@ parameters: + level: 5 + + paths: + - src + ignoreErrors: - "#^Unsafe usage of new static\\(\\)\\.$#" - "#^.*\\:\\:__toString\\(\\) invoked with 1 parameter, 0 required\\.$#"