Skip to content

Commit

Permalink
Migrate from psalm to phpstan
Browse files Browse the repository at this point in the history
  • Loading branch information
tvdijen committed Feb 15, 2024
1 parent e0425c1 commit dcd8a87
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 87 deletions.
26 changes: 6 additions & 20 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,8 @@ 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
extensions: ctype, date, dom, opcache, pcre, spl, xml
tools: composer, composer-require-checker, composer-unused, phpcs, phpstan
extensions: ctype, date, dom, pcre, spl, xml

- name: Setup problem matchers for PHP
run: echo "::add-matcher::${{ runner.tool_cache }}/php.json"
Expand Down Expand Up @@ -81,26 +80,13 @@ jobs:
- name: PHP Code Sniffer
run: phpcs

- name: Psalm
run: |
psalm -c psalm.xml \
--show-info=true \
--shepherd \
--php-version=${{ steps.setup-php.outputs.php-version }}
- name: Psalm (testsuite)
- name: PHPStan
run: |
psalm -c psalm-dev.xml \
--show-info=true \
--shepherd \
--php-version=${{ steps.setup-php.outputs.php-version }}
phpstan analyze -c phpstan.neon
- 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
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
27 changes: 0 additions & 27 deletions psalm-dev.xml

This file was deleted.

40 changes: 0 additions & 40 deletions psalm.xml

This file was deleted.

0 comments on commit dcd8a87

Please sign in to comment.