Skip to content

Commit

Permalink
Modernize PHPStan configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
szepeviktor committed Feb 4, 2021
1 parent 0d80e53 commit 1f53edb
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 12 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ jobs:
tools: prestissimo
env:
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Get composer cache directory
id: composercache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"

- name: Cache dependencies
uses: actions/cache@v2
with:
Expand All @@ -46,7 +46,7 @@ jobs:
- name: PHP Static Analysis Tool
run: |
composer run-script phpstan
composer run-script phpstan -- --no-progress
- name: Unit tests
run: |
Expand All @@ -71,4 +71,3 @@ jobs:
vendor/bin/phpunit -c phpunit-integration-tests.xml
env:
TEST_SUITE: oss

2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
"phpcs --standard=ruleset.xml --extensions=php --encoding=utf-8 --tab-width=4 -sp tests"
],
"phpstan": [
"phpstan analyse src --level 2 --no-progress"
"phpstan analyse"
]
}
}
11 changes: 4 additions & 7 deletions phpstan.neon
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
parameters:
reportUnmatchedIgnoredErrors:
false
level: 2
paths:
- src/
ignoreErrors:
- '#Unsafe usage of new static\(\)#'
- '#Call to static method performRequest\(\) on trait#'
- '#Constant JSON_THROW_ON_ERROR not found#'
- '#Caught class JsonException not found#'
- '#Call to method getCode\(\) on an unknown class JsonException#'
- '#^Unsafe usage of new static\(\)\.$#'

0 comments on commit 1f53edb

Please sign in to comment.