Skip to content

Commit

Permalink
Migrate Psalm to PHPStan
Browse files Browse the repository at this point in the history
  • Loading branch information
tvdijen committed Aug 6, 2024
1 parent 291d059 commit 88abc4d
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 51 deletions.
18 changes: 5 additions & 13 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,7 @@ jobs:
with:
# Should be the higest supported version, so we can use the newest tools
php-version: '8.3'
tools: composer, composer-require-checker, composer-unused, phpcs, psalm
# optional performance gain for psalm: opcache
tools: composer, composer-require-checker, composer-unused, phpcs, phpstan
extensions: ctype, date, dom, filter, hash, intl, mbstring, opcache, openssl, pcre, spl, xml

- name: Setup problem matchers for PHP
Expand Down Expand Up @@ -91,20 +90,13 @@ jobs:
- name: PHP Code Sniffer
run: phpcs

- name: Psalm
continue-on-error: true
- name: PHPStan
run: |
psalm -c psalm.xml \
--show-info=true \
--shepherd \
--php-version=${{ steps.setup-php.outputs.php-version }}
phpstan analyze -c phpstan.neon --debug
- name: Psalter
- name: PHPStan (testsuite)
run: |
psalm --alter \
--issues=UnnecessaryVarAnnotation \
--dry-run \
--php-version=${{ steps.setup-php.outputs.php-version }}
phpstan analyze -c phpstan-dev.neon --debug
security:
name: Security checks
Expand Down
4 changes: 4 additions & 0 deletions phpstan-dev.neon
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
parameters:
level: 6
paths:
- tests
4 changes: 4 additions & 0 deletions phpstan.neon
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
parameters:
level: 6
paths:
- src
38 changes: 0 additions & 38 deletions psalm.xml

This file was deleted.

0 comments on commit 88abc4d

Please sign in to comment.