Skip to content

Commit fd84094

Browse files
authored
Fix psalm (#97)
1 parent dd6efc6 commit fd84094

File tree

4 files changed

+37
-2
lines changed

4 files changed

+37
-2
lines changed

.github/workflows/static.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ on:
1010
- 'phpunit.xml.dist'
1111

1212
push:
13+
branches: ['master']
1314
paths-ignore:
1415
- 'docs/**'
1516
- 'README.md'
@@ -28,4 +29,12 @@ jobs:
2829
os: >-
2930
['ubuntu-latest']
3031
php: >-
31-
['8.0', '8.1', '8.2']
32+
['8.1', '8.2', '8.3']
33+
psalm80:
34+
uses: yiisoft/actions/.github/workflows/psalm.yml@master
35+
with:
36+
psalm-config: psalm80.xml
37+
os: >-
38+
['ubuntu-latest']
39+
php: >-
40+
['8.0']

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
"rector/rector": "^0.19.0",
4545
"roave/infection-static-analysis-plugin": "^1.16",
4646
"spatie/phpunit-watcher": "^1.23",
47-
"vimeo/psalm": "^4.30|^5.6",
47+
"vimeo/psalm": "^4.30|^5.20",
4848
"yiisoft/di": "^1.1",
4949
"yiisoft/test-support": "^1.3"
5050
},

psalm.xml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,12 @@
99
>
1010
<projectFiles>
1111
<directory name="src" />
12+
<ignoreFiles>
13+
<directory name="vendor" />
14+
</ignoreFiles>
1215
</projectFiles>
16+
<issueHandlers>
17+
<MixedAssignment errorLevel="suppress" />
18+
<RiskyTruthyFalsyComparison errorLevel="suppress" />
19+
</issueHandlers>
1320
</psalm>

psalm80.xml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?xml version="1.0"?>
2+
<psalm
3+
errorLevel="1"
4+
findUnusedBaselineEntry="true"
5+
findUnusedCode="false"
6+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
7+
xmlns="https://getpsalm.org/schema/config"
8+
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
9+
>
10+
<projectFiles>
11+
<directory name="src" />
12+
<ignoreFiles>
13+
<directory name="vendor" />
14+
</ignoreFiles>
15+
</projectFiles>
16+
<issueHandlers>
17+
<MixedAssignment errorLevel="suppress" />
18+
</issueHandlers>
19+
</psalm>

0 commit comments

Comments
 (0)