Skip to content

Commit 1a27e7b

Browse files
committed
Migrate Psalm to PHPStan
1 parent 4a6592a commit 1a27e7b

5 files changed

Lines changed: 14 additions & 80 deletions

File tree

.github/workflows/php.yml

Lines changed: 6 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,8 @@ jobs:
5252
with:
5353
# Should be the higest supported version, so we can use the newest tools
5454
php-version: '8.3'
55-
tools: composer, composer-require-checker, composer-unused, phpcs, psalm
56-
# optional performance gain for psalm: opcache
57-
extensions: ctype, date, dom, fileinfo, filter, hash, intl, mbstring, opcache, openssl, pcre, posix, spl, xml
55+
tools: composer, composer-require-checker, composer-unused, phpcs
56+
extensions: ctype, date, dom, fileinfo, filter, hash, intl, mbstring, openssl, pcre, posix, spl, xml
5857

5958
- name: Setup problem matchers for PHP
6059
run: echo "::add-matcher::${{ runner.tool_cache }}/php.json"
@@ -86,27 +85,13 @@ jobs:
8685
- name: PHP Code Sniffer
8786
run: phpcs
8887

89-
- name: Psalm
90-
continue-on-error: true
91-
run: |
92-
psalm -c psalm.xml \
93-
--show-info=true \
94-
--shepherd \
95-
--php-version=${{ steps.setup-php.outputs.php-version }}
96-
97-
- name: Psalm (testsuite)
88+
- name: PHPStan
9889
run: |
99-
psalm -c psalm-dev.xml \
100-
--show-info=true \
101-
--shepherd \
102-
--php-version=${{ steps.setup-php.outputs.php-version }}
90+
vendor/bin/phpstan analyze -c phpstan.neon --debug
10391
104-
- name: Psalter
92+
- name: PHPStan (testsuite)
10593
run: |
106-
psalm --alter \
107-
--issues=UnnecessaryVarAnnotation \
108-
--dry-run \
109-
--php-version=${{ steps.setup-php.outputs.php-version }}
94+
vendor/bin/phpstan analyze -c phpstan-dev.neon --debug
11095
11196
security:
11297
name: Security checks

phpstan-dev.neon

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
parameters:
2+
level: 9
3+
paths:
4+
- tests

phpstan.neon

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
parameters:
2+
level: 6
3+
paths:
4+
- src

psalm-dev.xml

Lines changed: 0 additions & 27 deletions
This file was deleted.

psalm.xml

Lines changed: 0 additions & 32 deletions
This file was deleted.

0 commit comments

Comments
 (0)