Skip to content

Commit

Permalink
Fix psalm
Browse files Browse the repository at this point in the history
  • Loading branch information
vjik committed Feb 9, 2024
1 parent 9512d94 commit 8959fc3
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 2 deletions.
12 changes: 11 additions & 1 deletion .github/workflows/static.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ on:
- 'phpunit.xml.dist'

push:
branches:
- master
paths-ignore:
- 'docs/**'
- 'README.md'
Expand All @@ -28,4 +30,12 @@ jobs:
os: >-
['ubuntu-latest']
php: >-
['8.0', '8.1']
['8.1', '8.2', '8.3']
psalm80:
uses: yiisoft/actions/.github/workflows/psalm.yml@master
with:
psalm-config: psalm80.xml
os: >-
['ubuntu-latest']
php: >-
['8.0']
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"rector/rector": "^1.0.0",
"roave/infection-static-analysis-plugin": "^1.18",
"spatie/phpunit-watcher": "^1.23",
"vimeo/psalm": "^4.30|^5.6",
"vimeo/psalm": "^4.30|^5.21",
"yiisoft/test-support": "^1.4"
},
"autoload": {
Expand Down
1 change: 1 addition & 0 deletions psalm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
</projectFiles>
<issueHandlers>
<MixedAssignment errorLevel="suppress" />
<RiskyTruthyFalsyComparison errorLevel="suppress" />
<InvalidThrow>
<errorLevel type="suppress">
<referencedClass name="Psr\Container\ContainerExceptionInterface" />
Expand Down
25 changes: 25 additions & 0 deletions psalm80.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?xml version="1.0"?>
<psalm
errorLevel="1"
findUnusedBaselineEntry="true"
findUnusedCode="false"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="https://getpsalm.org/schema/config"
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
>
<projectFiles>
<directory name="src" />
<ignoreFiles>
<directory name="vendor" />
</ignoreFiles>
</projectFiles>
<issueHandlers>
<MixedAssignment errorLevel="suppress" />
<InvalidThrow>
<errorLevel type="suppress">
<referencedClass name="Psr\Container\ContainerExceptionInterface" />
<referencedClass name="Psr\Container\NotFoundExceptionInterface" />
</errorLevel>
</InvalidThrow>
</issueHandlers>
</psalm>

0 comments on commit 8959fc3

Please sign in to comment.