Skip to content

Commit 9849d2e

Browse files
committed
Replace psalm with phpstan
1 parent 8dfc707 commit 9849d2e

File tree

5 files changed

+20
-79
lines changed

5 files changed

+20
-79
lines changed

.github/workflows/php.yml

Lines changed: 6 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -164,9 +164,8 @@ jobs:
164164
with:
165165
# Should be the higest supported version, so we can use the newest tools
166166
php-version: '8.4'
167-
tools: composer, composer-require-checker, composer-unused, phpcs, psalm
168-
# optional performance gain for psalm: opcache
169-
extensions: ctype, date, dom, fileinfo, filter, hash, intl, mbstring, opcache, openssl, pcre, posix, spl, xml
167+
tools: composer, composer-require-checker, composer-unused, phpcs, phpstan
168+
extensions: ctype, date, dom, fileinfo, filter, hash, intl, mbstring, openssl, pcre, posix, spl, xml
170169

171170
- name: Setup problem matchers for PHP
172171
run: echo "::add-matcher::${{ runner.tool_cache }}/php.json"
@@ -198,27 +197,13 @@ jobs:
198197
- name: PHP Code Sniffer
199198
run: phpcs
200199

201-
- name: Psalm
202-
continue-on-error: true
203-
run: |
204-
psalm -c psalm.xml \
205-
--show-info=true \
206-
--shepherd \
207-
--php-version=${{ steps.setup-php.outputs.php-version }}
208-
209-
- name: Psalm (testsuite)
200+
- name: PHPStan
210201
run: |
211-
psalm -c psalm-dev.xml \
212-
--show-info=true \
213-
--shepherd \
214-
--php-version=${{ steps.setup-php.outputs.php-version }}
202+
vendor/bin/phpstan analyze -c phpstan.neon
215203
216-
- name: Psalter
204+
- name: PHPStan (testsuite)
217205
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
222207
223208
security:
224209
name: Security checks

phpstan-dev.neon

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
parameters:
2+
level: 5
3+
paths:
4+
- tests
5+
6+
includes:
7+
- phpstan-dev-baseline.neon

phpstan.neon

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
parameters:
2+
level: 6
3+
paths:
4+
- src
5+
6+
includes:
7+
- phpstan-baseline.neon

psalm-dev.xml

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

psalm.xml

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

0 commit comments

Comments
 (0)