83838484
8585 - name : " Lint YAML files"
86- 86+ uses :
" ibiqlik/[email protected] .1 " 8787 with :
8888 config_file : " .yamllint.yaml"
8989 file_or_dir : " ."
@@ -95,12 +95,13 @@ jobs:
9595 coverage : " none"
9696 extensions : " none, ctype, dom, json, mbstring, phar, simplexml, tokenizer, xml, xmlwriter"
9797 php-version : " ${{ matrix.php-version }}"
98+ tools : " phive"
9899
99100 - name : " Set up problem matchers for PHP"
100101 run : " echo \" ::add-matcher::${{ runner.tool_cache }}/php.json\" "
101102
102103 - name : " Validate composer.json and composer.lock"
103- run : " composer validate --ansi"
104+ run : " composer validate --ansi --strict "
104105
105106 - name : " Determine composer cache directory"
106107 uses :
" ergebnis/.github/actions/composer/[email protected] " @@ -127,8 +128,15 @@ jobs:
127128128129 with :
129130 path : " .build/php-cs-fixer"
130- key : " php-${{ matrix.php-version }}-php-cs-fixer-${{ github.sha }}"
131- restore-keys : " php-${{ matrix.php-version }}-php-cs-fixer-"
131+ key : " php-${{ matrix.php-version }}-php-cs-fixer-${{ github.ref_name }}"
132+ restore-keys : |
133+ php-${{ matrix.php-version }}-php-cs-fixer-main
134+ php-${{ matrix.php-version }}-php-cs-fixer-
135+
136+ - name : " Install dependencies with phive"
137+ uses :
" ergebnis/.github/actions/phive/[email protected] " 138+ with :
139+ trust-gpg-keys : " 0x033E5F8D801A2F8D,0xE82B2FB314E9906E"
132140
133141 - name : " Run friendsofphp/php-cs-fixer"
134142 run : " .phive/php-cs-fixer fix --ansi --config=.php-cs-fixer.php --diff --dry-run --verbose"
@@ -156,6 +164,7 @@ jobs:
156164 coverage : " none"
157165 extensions : " none, ctype, dom, json, mbstring, phar, simplexml, tokenizer, xml, xmlwriter"
158166 php-version : " ${{ matrix.php-version }}"
167+ tools : " phive"
159168
160169 - name : " Set up problem matchers for PHP"
161170 run : " echo \" ::add-matcher::${{ runner.tool_cache }}/php.json\" "
@@ -175,9 +184,71 @@ jobs:
175184 with :
176185 dependencies : " ${{ matrix.dependencies }}"
177186
187+ - name : " Install dependencies with phive"
188+ uses :
" ergebnis/.github/actions/phive/[email protected] " 189+ with :
190+ trust-gpg-keys : " 0x033E5F8D801A2F8D,0xE82B2FB314E9906E"
191+
178192 - name : " Run maglnet/composer-require-checker"
179193 run : " .phive/composer-require-checker check --config-file=$(pwd)/composer-require-checker.json"
180194
195+ refactoring :
196+ name : " Refactoring"
197+
198+ runs-on : " ubuntu-latest"
199+
200+ strategy :
201+ matrix :
202+ php-version :
203+ - " 8.1"
204+
205+ dependencies :
206+ - " locked"
207+
208+ steps :
209+ - name : " Checkout"
210+ 211+
212+ - name : " Set up PHP"
213+ uses :
" shivammathur/[email protected] " 214+ with :
215+ coverage : " none"
216+ extensions : " none, ctype, dom, intl, json, mbstring, phar, simplexml, tokenizer, xml, xmlwriter"
217+ php-version : " ${{ matrix.php-version }}"
218+
219+ - name : " Set up problem matchers for PHP"
220+ run : " echo \" ::add-matcher::${{ runner.tool_cache }}/php.json\" "
221+
222+ - name : " Determine composer cache directory"
223+ uses :
" ergebnis/.github/actions/composer/[email protected] " 224+
225+ - name : " Cache dependencies installed with composer"
226+ 227+ with :
228+ path : " ${{ env.COMPOSER_CACHE_DIR }}"
229+ key : " php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-${{ hashFiles('composer.lock') }}"
230+ restore-keys : " php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-"
231+
232+ - name : " Install ${{ matrix.dependencies }} dependencies with composer"
233+ uses :
" ergebnis/.github/actions/composer/[email protected] " 234+ with :
235+ dependencies : " ${{ matrix.dependencies }}"
236+
237+ - name : " Create cache directory for rector/rector"
238+ run : " mkdir -p .build/rector"
239+
240+ - name : " Cache cache directory for rector/rector"
241+ 242+ with :
243+ path : " .build/rector"
244+ key : " php-${{ matrix.php-version }}-rector-${{ github.ref_name }}"
245+ restore-keys : |
246+ php-${{ matrix.php-version }}-rector-main
247+ php-${{ matrix.php-version }}-rector-
248+
249+ - name : " Run automated refactoring with rector/rector"
250+ run : " vendor/bin/rector --ansi --config=rector.php --dry-run"
251+
181252 security-analysis :
182253 name : " Security Analysis"
183254
@@ -206,7 +277,7 @@ jobs:
206277 run : " echo \" ::add-matcher::${{ runner.tool_cache }}/php.json\" "
207278
208279 - name : " Validate composer.json and composer.lock"
209- run : " composer validate --ansi"
280+ run : " composer validate --ansi --strict "
210281
211282 - name : " Check installed packages for security vulnerability advisories"
212283 run : " composer audit --ansi"
@@ -234,6 +305,7 @@ jobs:
234305 coverage : " none"
235306 extensions : " none, ctype, curl, dom, json, mbstring, pcntl, phar, posix, simplexml, tokenizer, xml, xmlwriter"
236307 php-version : " ${{ matrix.php-version }}"
308+ tools : " phive"
237309
238310 - name : " Set up problem matchers for PHP"
239311 run : " echo \" ::add-matcher::${{ runner.tool_cache }}/php.json\" "
@@ -257,7 +329,7 @@ jobs:
257329 run : " mkdir -p .build/psalm"
258330
259331 - name : " Run vimeo/psalm"
260- run : " .phive /psalm --config=psalm.xml --output-format=github --shepherd --show-info=false --stats --threads=4"
332+ run : " vendor/bin /psalm --config=psalm.xml --output-format=github --shepherd --show-info=false --stats --threads=4"
261333
262334 tests :
263335 name : " Tests"
@@ -271,7 +343,9 @@ jobs:
271343 - " 8.2"
272344
273345 dependencies :
346+ - " lowest"
274347 - " locked"
348+ - " highest"
275349
276350 steps :
277351 - name : " Checkout"
0 commit comments