Skip to content

Commit 0db6d08

Browse files
committed
Bump minimum PHP-version and dependencies
1 parent 3f30f62 commit 0db6d08

5 files changed

Lines changed: 38 additions & 39 deletions

File tree

.github/workflows/php.yml

Lines changed: 22 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ jobs:
1919
strategy:
2020
fail-fast: false
2121
matrix:
22-
php-version: ['8.1', '8.2', '8.3', '8.4']
22+
php-version: ['8.3', '8.4', '8.5']
2323

24-
uses: simplesamlphp/simplesamlphp-test-framework/.github/workflows/reusable_phplinter.yml@v1.10.6
24+
uses: simplesamlphp/simplesamlphp-test-framework/.github/workflows/reusable_phplinter.yml@v1.11.0
2525
with:
2626
php-version: ${{ matrix.php-version }}
2727

@@ -30,7 +30,7 @@ jobs:
3030
strategy:
3131
fail-fast: false
3232

33-
uses: simplesamlphp/simplesamlphp-test-framework/.github/workflows/reusable_linter.yml@v1.10.6
33+
uses: simplesamlphp/simplesamlphp-test-framework/.github/workflows/reusable_linter.yml@v1.11.0
3434
with:
3535
enable_eslinter: false
3636
enable_jsonlinter: true
@@ -45,15 +45,16 @@ jobs:
4545
fail-fast: false
4646
matrix:
4747
operating-system: [ubuntu-latest]
48-
php-versions: ['8.1', '8.2', '8.3', '8.4']
48+
php-versions: ['8.3', '8.4', '8.5']
4949

5050
steps:
5151
- name: Setup PHP, with composer and extensions
5252
# https://github.com/shivammathur/setup-php
5353
uses: shivammathur/setup-php@v2
5454
with:
5555
php-version: ${{ matrix.php-versions }}
56-
extensions: ctype, date, dom, fileinfo, filter, hash, intl, mbstring, openssl, pcre, posix, sockets, spl, xml
56+
extensions: ctype, date, dom, fileinfo, filter, hash, intl, mbstring, openssl,\
57+
pcre, posix, sockets, sodium, spl, xml
5758
tools: composer
5859
ini-values: error_reporting=E_ALL
5960
coverage: pcov
@@ -85,15 +86,15 @@ jobs:
8586
run: composer install --no-progress --prefer-dist --optimize-autoloader
8687

8788
- name: Run unit tests with coverage
88-
if: ${{ matrix.php-versions == '8.4' }}
89+
if: ${{ matrix.php-versions == '8.5' }}
8990
run: vendor/bin/phpunit
9091

9192
- name: Run unit tests (no coverage)
92-
if: ${{ matrix.php-versions != '8.4' }}
93+
if: ${{ matrix.php-versions != '8.5' }}
9394
run: vendor/bin/phpunit --no-coverage
9495

9596
- name: Save coverage data
96-
if: ${{ matrix.php-versions == '8.4' }}
97+
if: ${{ matrix.php-versions == '8.5' }}
9798
uses: actions/upload-artifact@v6
9899
with:
99100
name: coverage-data
@@ -107,15 +108,16 @@ jobs:
107108
fail-fast: true
108109
matrix:
109110
operating-system: [windows-latest]
110-
php-versions: ['8.1', '8.2', '8.3', '8.4']
111+
php-versions: ['8.3', '8.4', '8.5']
111112

112113
steps:
113114
- name: Setup PHP, with composer and extensions
114115
# https://github.com/shivammathur/setup-php
115116
uses: shivammathur/setup-php@v2
116117
with:
117118
php-version: ${{ matrix.php-versions }}
118-
extensions: ctype, date, dom, fileinfo, filter, hash, intl, mbstring, openssl, pcre, posix, sockets, spl, xml, zip
119+
extensions: ctype, date, dom, fileinfo, filter, hash, intl, mbstring, openssl,\
120+
pcre, posix, sockets, sodium, spl, xml, zip
119121
tools: composer
120122
ini-values: error_reporting=E_ALL
121123
coverage: none
@@ -160,11 +162,11 @@ jobs:
160162
uses: shivammathur/setup-php@v2
161163
with:
162164
# Should be the higest supported version, so we can use the newest tools
163-
php-version: '8.4'
165+
php-version: '8.5'
164166
tools: composer, composer-require-checker, composer-unused, phpcs, psalm
165167
# optional performance gain for psalm: opcache
166168
extensions: ctype, date, dom, fileinfo, filter, hash, intl, mbstring, opcache, openssl, \
167-
pcre, posix, sockets, spl, xml
169+
pcre, posix, sockets, sodium, spl, xml
168170

169171
- name: Setup problem matchers for PHP
170172
run: echo "::add-matcher::${{ runner.tool_cache }}/php.json"
@@ -194,29 +196,15 @@ jobs:
194196
run: composer-unused
195197

196198
- name: PHP Code Sniffer
197-
run: phpcs
199+
run: vendor/bin/phpcs
198200

199-
- name: Psalm
200-
continue-on-error: true
201+
- name: PHPStan
201202
run: |
202-
psalm -c psalm.xml \
203-
--show-info=true \
204-
--shepherd \
205-
--php-version=${{ steps.setup-php.outputs.php-version }}
203+
vendor/bin/phpstan analyze -c phpstan.neon
206204
207-
- name: Psalm (testsuite)
205+
- name: PHPStan (testsuite)
208206
run: |
209-
psalm -c psalm-dev.xml \
210-
--show-info=true \
211-
--shepherd \
212-
--php-version=${{ steps.setup-php.outputs.php-version }}
213-
214-
- name: Psalter
215-
run: |
216-
psalm --alter \
217-
--issues=UnnecessaryVarAnnotation \
218-
--dry-run \
219-
--php-version=${{ steps.setup-php.outputs.php-version }}
207+
vendor/bin/phpstan analyze -c phpstan-dev.neon
220208
221209
security:
222210
name: Security checks
@@ -227,8 +215,9 @@ jobs:
227215
uses: shivammathur/setup-php@v2
228216
with:
229217
# Should be the lowest supported version
230-
php-version: '8.1'
231-
extensions: ctype, date, dom, fileinfo, filter, hash, intl, mbstring, openssl, pcre, posix, sockets, spl, xml
218+
php-version: '8.3'
219+
extensions: ctype, date, dom, fileinfo, filter, hash, intl, mbstring,\
220+
openssl, pcre, posix, sockets, sodium, spl, xml
232221
tools: composer
233222
coverage: none
234223

composer.json

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,17 +27,18 @@
2727
}
2828
},
2929
"require": {
30-
"php": "^8.1",
30+
"php": "^8.3",
31+
3132
"ext-posix": "*",
3233
"ext-sockets": "*",
3334

34-
"simplesamlphp/assert": "~1.8.1",
35-
"simplesamlphp/composer-module-installer": "~1.4.0",
36-
"simplesamlphp/saml2-legacy": "~4.19.1",
37-
"simplesamlphp/simplesamlphp": "~2.4.0"
35+
"simplesamlphp/assert": "^1.9",
36+
"simplesamlphp/composer-module-installer": "^1.5",
37+
"simplesamlphp/saml2-legacy": "^4.19",
38+
"simplesamlphp/simplesamlphp": "^2.5@dev"
3839
},
3940
"require-dev": {
40-
"simplesamlphp/simplesamlphp-test-framework": "~1.9.2"
41+
"simplesamlphp/simplesamlphp-test-framework": "^1.11"
4142
},
4243
"autoload": {
4344
"psr-4": {

phpstan-dev.neon

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
parameters:
2+
level: 5
3+
paths:
4+
- tests

phpstan.neon

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
parameters:
2+
level: 6
3+
paths:
4+
- src

tests/src/Auth/Process/FticksTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -407,6 +407,7 @@ public function testFilteringString(): void
407407
$this->assertEquals($request, $result);
408408
}
409409

410+
410411
/**
411412
*/
412413
public function testInvalidConfig(): void

0 commit comments

Comments
 (0)