2020 matrix :
2121 php-version : ['8.3', '8.4', '8.5']
2222
23- uses : simplesamlphp/simplesamlphp-test-framework/.github/workflows/reusable_phplinter.yml@v1.11.0
23+ uses : simplesamlphp/simplesamlphp-test-framework/.github/workflows/reusable_phplinter.yml@v1.11.5
2424 with :
2525 php-version : ${{ matrix.php-version }}
2626
2929 strategy :
3030 fail-fast : false
3131
32- uses : simplesamlphp/simplesamlphp-test-framework/.github/workflows/reusable_linter.yml@v1.11.0
32+ uses : simplesamlphp/simplesamlphp-test-framework/.github/workflows/reusable_linter.yml@v1.11.5
3333 with :
3434 enable_eslinter : true
3535 enable_jsonlinter : true
5454 php-version : ${{ matrix.php-versions }}
5555 extensions : intl, mbstring, mysql, pdo, pdo_sqlite, soap, sodium, xml
5656 tools : composer:v2
57- ini-values : error_reporting=E_ALL
58- coverage : xdebug
57+ ini-values : error_reporting=E_ALL, pcov.directory=${{ github.workspace }}
58+ coverage : pcov
5959
6060 - name : Setup problem matchers for PHP
6161 run : echo "::add-matcher::${{ runner.tool_cache }}/php.json"
6868 git config --global core.autocrlf false
6969 git config --global core.eol lf
7070
71- - uses : actions/checkout@v4
71+ - uses : actions/checkout@v6
7272
7373 - name : Copy config.php.dist to config.php
7474 run : cp config/config.php.dist config/config.php
8080 run : echo COMPOSER_CACHE="$(composer config cache-files-dir)" >> "$GITHUB_ENV"
8181
8282 - name : Cache composer dependencies
83- uses : actions/cache@v4
83+ uses : actions/cache@v5
8484 with :
8585 path : ${{ env.COMPOSER_CACHE }}
8686 key : ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
@@ -91,15 +91,15 @@ jobs:
9191
9292 - name : Run unit tests with coverage
9393 if : ${{ matrix.php-versions == '8.5' }}
94- run : ./ vendor/bin/phpunit
94+ run : vendor/bin/phpunit
9595
9696 - name : Run unit tests (no coverage)
9797 if : ${{ matrix.php-versions != '8.5' }}
98- run : ./ vendor/bin/phpunit --no-coverage
98+ run : vendor/bin/phpunit --no-coverage
9999
100100 - name : Save coverage data
101101 if : ${{ matrix.php-versions == '8.5' }}
102- uses : actions/upload-artifact@v4
102+ uses : actions/upload-artifact@v7
103103 with :
104104 name : coverage-data
105105 path : ${{ github.workspace }}/build
@@ -120,7 +120,7 @@ jobs:
120120 uses : shivammathur/setup-php@v2
121121 with :
122122 php-version : ${{ matrix.php-versions }}
123- extensions : intl, mbstring, mysql, pdo, pdo_sqlite, soap, sodium, xml
123+ extensions : fileinfo, intl, mbstring, mysql, pdo, pdo_sqlite, soap, sodium, xml
124124 tools : composer:v2
125125 ini-values : error_reporting=E_ALL
126126 coverage : none
@@ -136,13 +136,13 @@ jobs:
136136 git config --global core.autocrlf false
137137 git config --global core.eol lf
138138
139- - uses : actions/checkout@v4
139+ - uses : actions/checkout@v6
140140
141141 - name : Get composer cache directory
142142 run : echo COMPOSER_CACHE="$(composer config cache-files-dir)" >> "$env:GITHUB_ENV"
143143
144144 - name : Cache composer dependencies
145- uses : actions/cache@v4
145+ uses : actions/cache@v5
146146 with :
147147 path : ${{ env.COMPOSER_CACHE }}
148148 key : ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
@@ -166,14 +166,14 @@ jobs:
166166 uses : shivammathur/setup-php@v2
167167 with :
168168 php-version : ' 8.5'
169- tools : composer
169+ tools : composer, composer-require-checker, composer-unused
170170 extensions : mbstring, soap, xml
171171 coverage : none
172172
173173 - name : Setup problem matchers for PHP
174174 run : echo "::add-matcher::${{ runner.tool_cache }}/php.json"
175175
176- - uses : actions/checkout@v4
176+ - uses : actions/checkout@v6
177177
178178 - name : Copy config.php.dist to config.php
179179 run : cp config/config.php.dist config/config.php
@@ -185,7 +185,7 @@ jobs:
185185 run : echo COMPOSER_CACHE="$(composer config cache-files-dir)" >> "$GITHUB_ENV"
186186
187187 - name : Cache composer dependencies
188- uses : actions/cache@v4
188+ uses : actions/cache@v5
189189 with :
190190 path : ${{ env.COMPOSER_CACHE }}
191191 key : ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
@@ -195,22 +195,26 @@ jobs:
195195 run : composer validate
196196
197197 - name : Install Composer dependencies
198+ run : composer install --no-progress --prefer-dist --optimize-autoloader
199+
200+ - name : Check code for hard dependencies missing in composer.json
201+ run : composer-require-checker check --config-file=tools/composer-require-checker.json composer.json
202+
203+ - name : Check code for unused dependencies in composer.json
198204 run : |
199- composer install \
200- --no-progress \
201- --prefer-dist --optimize-autoloader \
202- --ignore-platform-req=maglnet/composer-require-checker
205+ composer-unused \
206+ --excludePackage=simplesamlphp/simplesamlphp-assets-base \
207+ --excludePackage=symfony/expression-language \
208+ --excludePackage=symfony/polyfill-intl-icu
203209
204210 - name : PHP Code Sniffer
205211 run : vendor/bin/phpcs
206212
207213 - name : PHPStan
208- run : |
209- vendor/bin/phpstan analyze -c phpstan.neon
214+ run : vendor/bin/phpstan analyze -c phpstan.neon
210215
211216 - name : PHPStan (testsuite)
212- run : |
213- vendor/bin/phpstan analyze -c phpstan-dev.neon
217+ run : vendor/bin/phpstan analyze -c phpstan-dev.neon
214218
215219 - name : Check for unused translations
216220 continue-on-error : true
@@ -233,7 +237,7 @@ jobs:
233237 - name : Setup problem matchers for PHP
234238 run : echo "::add-matcher::${{ runner.tool_cache }}/php.json"
235239
236- - uses : actions/checkout@v4
240+ - uses : actions/checkout@v6
237241
238242 - name : Copy config.php.dist to config.php
239243 run : cp config/config.php.dist config/config.php
@@ -245,7 +249,7 @@ jobs:
245249 run : echo COMPOSER_CACHE="$(composer config cache-files-dir)" >> "$GITHUB_ENV"
246250
247251 - name : Cache composer dependencies
248- uses : actions/cache@v4
252+ uses : actions/cache@v5
249253 with :
250254 path : ${{ env.COMPOSER_CACHE }}
251255 key : ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
@@ -268,13 +272,15 @@ jobs:
268272 runs-on : [ubuntu-latest]
269273 needs : [unit-tests-linux]
270274 steps :
271- - uses : actions/download-artifact@v4
275+ - uses : actions/checkout@v6
276+
277+ - uses : actions/download-artifact@v8
272278 with :
273279 name : coverage-data
274280 path : ${{ github.workspace }}/build
275281
276282 - name : Codecov
277- uses : codecov/codecov-action@v4
283+ uses : codecov/codecov-action@v5
278284 with :
279285 token : ${{ secrets.CODECOV_TOKEN }}
280286 fail_ci_if_error : true
@@ -290,6 +296,6 @@ jobs:
290296 (needs.unit-tests-linux.result == 'success' && needs.coverage.result == 'skipped')
291297
292298 steps :
293- - uses : geekyeggo/delete-artifact@v5
299+ - uses : geekyeggo/delete-artifact@v6
294300 with :
295301 name : coverage-data
0 commit comments