27
27
uses : " shivammathur/setup-php@v2"
28
28
with :
29
29
coverage : " xdebug"
30
- extensions : " none, curl, dom, json, mbstring, tokenizer, xml, xmlwriter"
30
+ extensions : " none, curl, dom, json, mbstring, simplexml, tokenizer, xml, xmlwriter"
31
31
php-version : " ${{ matrix.php-version }}"
32
32
33
33
- name : " Set up problem matchers for PHP"
72
72
uses : " shivammathur/setup-php@v2"
73
73
with :
74
74
coverage : " none"
75
- extensions : " none, curl, dom, json, mbstring, tokenizer, xml, xmlwriter"
75
+ extensions : " none, curl, dom, json, mbstring, simplexml, tokenizer, xml, xmlwriter"
76
76
php-version : " ${{ matrix.php-version }}"
77
77
78
78
- name : " Set up problem matchers for PHP"
97
97
- name : " Run friendsofphp/php-cs-fixer"
98
98
run : " vendor/bin/php-cs-fixer fix --ansi --config=.php-cs-fixer.php --diff --dry-run --show-progress=dots --verbose"
99
99
100
+ static-code-analysis :
101
+ name : " Static Code Analysis"
102
+
103
+ runs-on : " ubuntu-latest"
104
+
105
+ strategy :
106
+ matrix :
107
+ php-version :
108
+ - " 8.2"
109
+
110
+ dependencies :
111
+ - " locked"
112
+
113
+ steps :
114
+ - name : " Checkout"
115
+ uses : " actions/checkout@v3"
116
+
117
+ - name : " Set up PHP"
118
+ uses : " shivammathur/setup-php@v2"
119
+ with :
120
+ coverage : " none"
121
+ extensions : " none, curl, dom, json, mbstring, opcache, pcntl, posix, simplexml, tokenizer, xml, xmlwriter"
122
+ php-version : " ${{ matrix.php-version }}"
123
+
124
+ - name : " Set up problem matchers for PHP"
125
+ run : " echo \" ::add-matcher::${{ runner.tool_cache }}/php.json\" "
126
+
127
+ - name : " Determine composer cache directory"
128
+ run : " echo \" COMPOSER_CACHE_DIR=$(composer config cache-dir)\" >> $GITHUB_ENV"
129
+
130
+ - name : " Cache dependencies installed with composer"
131
+ uses : " actions/cache@v3"
132
+ with :
133
+ path : " ${{ env.COMPOSER_CACHE_DIR }}"
134
+ key : " php-${{ matrix.php-version }}-composer-${{ hashFiles('composer.lock') }}"
135
+ restore-keys : " php-${{ matrix.php-version }}-composer-"
136
+
137
+ - name : " Install dependencies with composer"
138
+ run : " composer install --ansi --no-interaction --no-progress"
139
+
140
+ - name : " Run vimeo/psalm"
141
+ run : " vendor/bin/psalm --config=psalm.xml --output-format=github --shepherd --show-info=false --stats --threads=4"
142
+
100
143
tests :
101
144
name : " Tests"
102
145
@@ -118,7 +161,7 @@ jobs:
118
161
uses : " shivammathur/setup-php@v2"
119
162
with :
120
163
coverage : " none"
121
- extensions : " none, curl, dom, json, mbstring, tokenizer, xml, xmlwriter"
164
+ extensions : " none, curl, dom, json, mbstring, simplexml, tokenizer, xml, xmlwriter"
122
165
php-version : " ${{ matrix.php-version }}"
123
166
124
167
- name : " Set up problem matchers for PHP"
0 commit comments