Skip to content

Commit aa03381

Browse files
committed
Bump minimum PHP version and fix composer cache
1 parent 8abb198 commit aa03381

File tree

3 files changed

+20
-19
lines changed

3 files changed

+20
-19
lines changed

.github/workflows/php.yml

Lines changed: 12 additions & 11 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/reusable_phplinter.yml@v1.11.0
2525
with:
@@ -45,15 +45,15 @@ 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: 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, spl, xml
56+
extensions: ctype, date, dom, fileinfo, filter, hash, intl, mbstring, openssl, pcre, posix, sodium, spl, xml
5757
tools: composer
5858
ini-values: error_reporting=E_ALL
5959
coverage: pcov
@@ -77,7 +77,7 @@ jobs:
7777
- name: Cache composer dependencies
7878
uses: actions/cache@v5
7979
with:
80-
path: $COMPOSER_CACHE
80+
path: ${{ env.COMPOSER_CACHE }}
8181
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
8282
restore-keys: ${{ runner.os }}-composer-
8383

@@ -107,15 +107,16 @@ jobs:
107107
fail-fast: true
108108
matrix:
109109
operating-system: [windows-latest]
110-
php-versions: ['8.2', '8.3', '8.4', '8.5']
110+
php-versions: ['8.3', '8.4', '8.5']
111111

112112
steps:
113113
- name: Setup PHP, with composer and extensions
114114
# https://github.com/shivammathur/setup-php
115115
uses: shivammathur/setup-php@v2
116116
with:
117117
php-version: ${{ matrix.php-versions }}
118-
extensions: ctype, date, dom, fileinfo, filter, hash, intl, mbstring, openssl, pcre, posix, spl, xml, zip
118+
extensions: ctype, date, dom, fileinfo, filter, hash, intl, mbstring, openssl,\
119+
pcre, posix, sodium, spl, xml, zip
119120
tools: composer
120121
ini-values: error_reporting=E_ALL
121122
coverage: none
@@ -139,7 +140,7 @@ jobs:
139140
- name: Cache composer dependencies
140141
uses: actions/cache@v5
141142
with:
142-
path: $COMPOSER_CACHE
143+
path: ${{ env.COMPOSER_CACHE }}
143144
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
144145
restore-keys: ${{ runner.os }}-composer-
145146

@@ -176,7 +177,7 @@ jobs:
176177
- name: Cache composer dependencies
177178
uses: actions/cache@v5
178179
with:
179-
path: $COMPOSER_CACHE
180+
path: ${{ env.COMPOSER_CACHE }}
180181
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
181182
restore-keys: ${{ runner.os }}-composer-
182183

@@ -214,8 +215,8 @@ jobs:
214215
uses: shivammathur/setup-php@v2
215216
with:
216217
# Should be the lowest supported version
217-
php-version: '8.2'
218-
extensions: ctype, date, dom, fileinfo, filter, hash, intl, mbstring, openssl, pcre, posix, spl, xml
218+
php-version: '8.3'
219+
extensions: ctype, date, dom, fileinfo, filter, hash, intl, mbstring, openssl, pcre, posix, sodium, spl, xml
219220
tools: composer
220221
coverage: none
221222

@@ -230,7 +231,7 @@ jobs:
230231
- name: Cache composer dependencies
231232
uses: actions/cache@v5
232233
with:
233-
path: $COMPOSER_CACHE
234+
path: ${{ env.COMPOSER_CACHE }}
234235
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
235236
restore-keys: ${{ runner.os }}-composer-
236237

composer.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,13 @@
3434
}
3535
},
3636
"require": {
37-
"php": "^8.2",
37+
"php": "^8.3",
3838

39-
"dapphp/radius": "~3.1.0",
40-
"simplesamlphp/simplesamlphp": "^2.4.0"
39+
"dapphp/radius": "^3.1",
40+
"simplesamlphp/simplesamlphp": "^2.5@dev"
4141
},
4242
"require-dev": {
43-
"simplesamlphp/simplesamlphp-test-framework": "~1.10.3"
43+
"simplesamlphp/simplesamlphp-test-framework": "^1.11"
4444
},
4545
"support": {
4646
"issues": "https://github.com/tvdijen/simplesamlphp-module-radius/issues",

src/Auth/Source/Radius.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@
2626
*/
2727
class Radius extends UserPassBase
2828
{
29-
public const RADIUS_USERNAME = 1;
29+
public const int RADIUS_USERNAME = 1;
3030

31-
public const RADIUS_VENDOR_SPECIFIC = 26;
31+
public const int RADIUS_VENDOR_SPECIFIC = 26;
3232

33-
public const RADIUS_NAS_IDENTIFIER = 32;
33+
public const int RADIUS_NAS_IDENTIFIER = 32;
3434

3535

3636
/**
@@ -160,7 +160,7 @@ protected function login(
160160
$radius->setNasIpAddress($_SERVER['SERVER_ADDR'] ?: $httpUtils->getSelfHost());
161161

162162
if ($this->nasIdentifier !== null) {
163-
$radius->setAttribute(self::RADIUS_NAS_IDENTIFIER, $this->nasIdentifier);
163+
$radius->setAttribute((string)self::RADIUS_NAS_IDENTIFIER, $this->nasIdentifier);
164164
}
165165

166166
if ($this->realm !== null) {

0 commit comments

Comments
 (0)