Skip to content

Commit 5579347

Browse files
authored
Fix psalm (#245)
1 parent ec93834 commit 5579347

4 files changed

Lines changed: 37 additions & 2 deletions

File tree

.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
@@ -42,7 +42,7 @@
4242
"rector/rector": "^0.19.0",
4343
"roave/infection-static-analysis-plugin": "^1.25",
4444
"spatie/phpunit-watcher": "^1.23",
45-
"vimeo/psalm": "^4.30|^5.1",
45+
"vimeo/psalm": "^4.30|^5.20",
4646
"yiisoft/aliases": "^3.0",
4747
"yiisoft/di": "^1.2",
4848
"yiisoft/psr-dummy-provider": "^1.0",

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)