Skip to content

Commit 3b3e7ad

Browse files
committed
Bump minimum PHP version and fix composer cache
1 parent 5bf0a82 commit 3b3e7ad

File tree

4 files changed

+23
-27
lines changed

4 files changed

+23
-27
lines changed

.github/workflows/php.yml

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

2424
uses: simplesamlphp/simplesamlphp-test-framework/.github/workflows/[email protected]
2525
with:
@@ -45,7 +45,7 @@ jobs:
4545
fail-fast: false
4646
matrix:
4747
operating-system: [ubuntu-latest]
48-
php-versions: ['8.2', '8.3', '8.4', '8.5']
48+
php-versions: ['8.3', '8.4', '8.5']
4949

5050
steps:
5151
- name: Install libkrb5-dev
@@ -56,7 +56,8 @@ jobs:
5656
uses: shivammathur/setup-php@v2
5757
with:
5858
php-version: ${{ matrix.php-versions }}
59-
extensions: ctype, date, dom, fileinfo, filter, hash, intl, ldap, mbstring, openssl, pcre, spl, xml
59+
extensions: ctype, date, dom, fileinfo, filter, hash, intl, ldap, mbstring,\
60+
openssl, pcre, sodium, spl, xml
6061
tools: composer
6162
ini-values: error_reporting=E_ALL
6263
coverage: pcov
@@ -80,7 +81,7 @@ jobs:
8081
- name: Cache composer dependencies
8182
uses: actions/cache@v5
8283
with:
83-
path: $COMPOSER_CACHE
84+
path: ${{ env.COMPOSER_CACHE }}
8485
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
8586
restore-keys: ${{ runner.os }}-composer-
8687

@@ -110,15 +111,16 @@ jobs:
110111
fail-fast: true
111112
matrix:
112113
operating-system: [windows-latest]
113-
php-versions: ['8.2', '8.3', '8.4', '8.5']
114+
php-versions: ['8.3', '8.4', '8.5']
114115

115116
steps:
116117
- name: Setup PHP, with composer and extensions
117118
# https://github.com/shivammathur/setup-php
118119
uses: shivammathur/setup-php@v2
119120
with:
120121
php-version: ${{ matrix.php-versions }}
121-
extensions: ctype, date, dom, fileinfo, filter, hash, intl, ldap, mbstring, openssl, pcre, spl, xml, zip
122+
extensions: ctype, date, dom, fileinfo, filter, hash, intl, ldap, mbstring,\
123+
openssl, pcre, sodium, spl, xml, zip
122124
tools: composer
123125
ini-values: error_reporting=E_ALL
124126
coverage: none
@@ -142,7 +144,7 @@ jobs:
142144
- name: Cache composer dependencies
143145
uses: actions/cache@v5
144146
with:
145-
path: $COMPOSER_CACHE
147+
path: ${{ env.COMPOSER_CACHE }}
146148
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
147149
restore-keys: ${{ runner.os }}-composer-
148150

@@ -166,7 +168,8 @@ jobs:
166168
# Should be the higest supported version, so we can use the newest tools
167169
php-version: '8.5'
168170
tools: composer, composer-require-checker, composer-unused
169-
extensions: ctype, date, dom, fileinfo, filter, hash, intl, ldap, mbstring, opcache, openssl, pcre, spl, xml
171+
extensions: ctype, date, dom, fileinfo, filter, hash, intl, ldap, mbstring, opcache, openssl,\
172+
pcre, sodium, spl, xml
170173

171174
- name: Setup problem matchers for PHP
172175
run: echo "::add-matcher::${{ runner.tool_cache }}/php.json"
@@ -179,7 +182,7 @@ jobs:
179182
- name: Cache composer dependencies
180183
uses: actions/cache@v5
181184
with:
182-
path: $COMPOSER_CACHE
185+
path: ${{ env.COMPOSER_CACHE }}
183186
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
184187
restore-keys: ${{ runner.os }}-composer-
185188

@@ -217,8 +220,8 @@ jobs:
217220
uses: shivammathur/setup-php@v2
218221
with:
219222
# Should be the lowest supported version
220-
php-version: '8.2'
221-
extensions: ctype, date, dom, fileinfo, filter, hash, intl, ldap, mbstring, openssl, pcre, spl, xml
223+
php-version: '8.3'
224+
extensions: ctype, date, dom, fileinfo, filter, hash, intl, ldap, mbstring, openssl, pcre, sodium, spl, xml
222225
tools: composer
223226
coverage: none
224227

@@ -233,7 +236,7 @@ jobs:
233236
- name: Cache composer dependencies
234237
uses: actions/cache@v5
235238
with:
236-
path: $COMPOSER_CACHE
239+
path: ${{ env.COMPOSER_CACHE }}
237240
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
238241
restore-keys: ${{ runner.os }}-composer-
239242

composer.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,16 +37,16 @@
3737
"ssp-mixedcase-module-name": "negotiateext"
3838
},
3939
"require": {
40-
"php": "^8.2",
40+
"php": "^8.3",
4141

42-
"simplesamlphp/composer-module-installer": "^1.5.0",
43-
"simplesamlphp/assert": "^1.9.1",
44-
"simplesamlphp/simplesamlphp": "^2.4",
45-
"simplesamlphp/simplesamlphp-module-ldap": "^2.3",
46-
"symfony/http-foundation": "^6.4"
42+
"simplesamlphp/composer-module-installer": "^1.5",
43+
"simplesamlphp/assert": "^1.9",
44+
"simplesamlphp/simplesamlphp": "^2.5@dev",
45+
"simplesamlphp/simplesamlphp-module-ldap": "^2.5",
46+
"symfony/http-foundation": "^7.4"
4747
},
4848
"require-dev": {
49-
"simplesamlphp/simplesamlphp-test-framework": "^1.10.3"
49+
"simplesamlphp/simplesamlphp-test-framework": "^1.11"
5050
},
5151
"support": {
5252
"issues": "https://github.com/tvdijen/simplesamlphp-module-negotiateext/issues",

src/Auth/Source/Negotiate.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,19 +23,15 @@
2323
class Negotiate extends \SimpleSAML\Auth\Source
2424
{
2525
// Constants used in the module
26-
public const STAGEID = '\SimpleSAML\Module\negotiateext\Auth\Source\Negotiate.StageId';
26+
public const string STAGEID = '\SimpleSAML\Module\negotiateext\Auth\Source\Negotiate.StageId';
2727

2828

29-
/** @var string */
3029
protected string $backend;
3130

32-
/** @var string */
3331
protected string $fallback;
3432

35-
/** @var string */
3633
protected string $keytab = '';
3734

38-
/** @var array|null */
3935
protected ?array $subnet = null;
4036

4137

tests/src/Controller/NegotiateControllerTest.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,6 @@ public function testErrorMissingState(): void
9292
$c = new Controller\NegotiateController($this->config, $this->session);
9393

9494
$this->expectException(Error\BadRequest::class);
95-
$this->expectExceptionMessage('BADREQUEST(\'%REASON%\' => \'Missing "AuthState" parameter.\')');
9695

9796
$c->error($request);
9897
}
@@ -216,7 +215,6 @@ public function testRetryMissingState(): void
216215
$c = new Controller\NegotiateController($this->config, $this->session);
217216

218217
$this->expectException(Error\BadRequest::class);
219-
$this->expectExceptionMessage('BADREQUEST(\'%REASON%\' => \'Missing required AuthState query parameter.\')');
220218

221219
$c->retry($request);
222220
}
@@ -275,7 +273,6 @@ public function testBackendMissingState(): void
275273
$c = new Controller\NegotiateController($this->config, $this->session);
276274

277275
$this->expectException(Error\BadRequest::class);
278-
$this->expectExceptionMessage('BADREQUEST(\'%REASON%\' => \'Missing required AuthState query parameter.\')');
279276

280277
$c->fallback($request);
281278
}

0 commit comments

Comments
 (0)