Skip to content

Commit 376d545

Browse files
committed
Migrate psalm to phpstan
1 parent 02f9e68 commit 376d545

File tree

5 files changed

+13
-67
lines changed

5 files changed

+13
-67
lines changed

.github/workflows/php.yml

Lines changed: 5 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -163,8 +163,7 @@ jobs:
163163
with:
164164
# Should be the higest supported version, so we can use the newest tools
165165
php-version: '8.5'
166-
tools: composer, composer-require-checker, composer-unused, phpcs, psalm
167-
# optional performance gain for psalm: opcache
166+
tools: composer, composer-require-checker, composer-unused
168167
extensions: ctype, date, dom, fileinfo, filter, hash, intl, mbstring, opcache, openssl, pcre, posix,\
169168
session, sodium, spl, xml
170169

@@ -198,27 +197,13 @@ jobs:
198197
- name: PHP Code Sniffer
199198
run: vendor/bin/phpcs
200199

201-
- name: Psalm
202-
continue-on-error: true
200+
- name: PHPStan
203201
run: |
204-
psalm -c psalm.xml \
205-
--show-info=true \
206-
--shepherd \
207-
--php-version=${{ steps.setup-php.outputs.php-version }}
202+
vendor/bin/phpstan analyze -c phpstan.neon --debug
208203
209-
- name: Psalm (testsuite)
204+
- name: PHPStan (testsuite)
210205
run: |
211-
psalm -c psalm-dev.xml \
212-
--show-info=true \
213-
--shepherd \
214-
--php-version=${{ steps.setup-php.outputs.php-version }}
215-
216-
- name: Psalter
217-
run: |
218-
psalm --alter \
219-
--issues=UnnecessaryVarAnnotation \
220-
--dry-run \
221-
--php-version=${{ steps.setup-php.outputs.php-version }}
206+
vendor/bin/phpstan analyze -c phpstan-dev.neon --debug
222207
223208
security:
224209
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 & 18 deletions
This file was deleted.

psalm.xml

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

0 commit comments

Comments
 (0)