File tree 4 files changed +98
-1
lines changed
4 files changed +98
-1
lines changed Original file line number Diff line number Diff line change
1
+ name : Psalm
2
+
3
+ on :
4
+ workflow_dispatch :
5
+ push :
6
+ paths :
7
+ - ' **.php'
8
+ - ' composer*'
9
+ - ' psalm*'
10
+
11
+ jobs :
12
+ psalm :
13
+ name : Psalm
14
+ runs-on : ubuntu-latest
15
+ timeout-minutes : 6
16
+ steps :
17
+ - uses : actions/checkout@v3
18
+ with :
19
+ ref : ${{ github.head_ref }}
20
+
21
+ # mtime needs to be restored for Psalm cache to work correctly
22
+ - name : Restore mtimes
23
+ uses : chetan/git-restore-mtime-action@v1
24
+
25
+ - name : Setup PHP
26
+ uses : shivammathur/setup-php@v2
27
+ with :
28
+ php-version : 8.1
29
+ coverage : none
30
+
31
+ - name : Install composer dependencies
32
+ run : |
33
+ composer config --ansi -- http-basic.nova.laravel.com ${{ secrets.NOVA_USERNAME }} ${{ secrets.NOVA_LICENSE_KEY }}
34
+ composer install --no-interaction --no-progress --no-scripts
35
+
36
+ # the way cache keys are set up will always cause a cache miss
37
+ # but will restore the cache generated during the previous run based on partial match
38
+ - name : Retrieve Psalm’s cache
39
+ uses : actions/cache@v3
40
+ with :
41
+ path : ./cache/psalm
42
+ key : ${{ runner.os }}-psalm-cache-${{ hashFiles('psalm.xml', 'psalm-baseline.xml', './composer.json') }}
43
+
44
+ - name : Run Psalm
45
+ run : ./vendor/bin/psalm --find-unused-psalm-suppress --output-format=github
Original file line number Diff line number Diff line change 52
52
"minimum-stability" : " dev" ,
53
53
"prefer-stable" : true ,
54
54
"require-dev" : {
55
+ "laravel/pint" : " ^1.2" ,
55
56
"phpunit/phpunit" : " ^9.5" ,
56
- "laravel/pint " : " ^1.2 "
57
+ "psalm/plugin-laravel " : " ^2.0 "
57
58
},
58
59
"scripts" : {
60
+ "psalm" : " psalm --find-unused-psalm-suppress --output-format=phpstorm" ,
61
+ "psalm-update-baseline" : " psalm --set-baseline=psalm-baseline.xml" ,
59
62
"test" : " phpunit --colors=always tests" ,
60
63
"fix-style" : " ./vendor/bin/pint"
61
64
}
Original file line number Diff line number Diff line change
1
+ <?xml version =" 1.0" encoding =" UTF-8" ?>
2
+ <files psalm-version =" 5.6.0@e784128902dfe01d489c4123d69918a9f3c1eac5" >
3
+ <file src =" src/FileAdder/FileAdder.php" >
4
+ <UndefinedClass >
5
+ <code >OriginalFileAdder</code >
6
+ </UndefinedClass >
7
+ </file >
8
+ <file src =" src/FileAdder/FileAdderFactory.php" >
9
+ <UndefinedClass >
10
+ <code >OriginalFileAdderFactory</code >
11
+ </UndefinedClass >
12
+ </file >
13
+ <file src =" src/Flexible.php" >
14
+ <UndefinedClass >
15
+ <code >$model</code >
16
+ <code >\Whitecube\NovaPage\Pages\Template</code >
17
+ </UndefinedClass >
18
+ </file >
19
+ <file src =" src/Layouts/Collection.php" >
20
+ <UnimplementedInterfaceMethod >
21
+ <code >Collection</code >
22
+ </UnimplementedInterfaceMethod >
23
+ </file >
24
+ <file src =" src/Layouts/Layout.php" >
25
+ <UndefinedTrait >
26
+ <code >HasAttributes</code >
27
+ </UndefinedTrait >
28
+ </file >
29
+ </files >
Original file line number Diff line number Diff line change
1
+ <?xml version =" 1.0" ?>
2
+ <psalm
3
+ errorLevel =" 7"
4
+ resolveFromConfigFile =" true"
5
+ xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
6
+ xmlns =" https://getpsalm.org/schema/config"
7
+ xsi : schemaLocation =" https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
8
+ findUnusedBaselineEntry =" true"
9
+ errorBaseline =" psalm-baseline.xml"
10
+ >
11
+ <projectFiles >
12
+ <directory name =" src" />
13
+ <ignoreFiles >
14
+ <directory name =" vendor" />
15
+ </ignoreFiles >
16
+ </projectFiles >
17
+ <plugins >
18
+ <pluginClass class =" Psalm\LaravelPlugin\Plugin" />
19
+ </plugins >
20
+ </psalm >
You can’t perform that action at this time.
0 commit comments