Skip to content

Commit 3a1c390

Browse files
committed
Start testing PHP 8.4
1 parent 2812446 commit 3a1c390

File tree

90 files changed

+104
-104
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

90 files changed

+104
-104
lines changed

.github/workflows/php.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ jobs:
5252
uses: shivammathur/setup-php@v2
5353
with:
5454
# Should be the higest supported version, so we can use the newest tools
55-
php-version: '8.3'
55+
php-version: '8.4'
5656
tools: composer, composer-require-checker, composer-unused, phpcs
5757
extensions: ctype, date, dom, filter, hash, mbstring, openssl, pcre, soap, spl, xml
5858
coverage: none
@@ -145,7 +145,7 @@ jobs:
145145
fail-fast: false
146146
matrix:
147147
operating-system: [ubuntu-latest]
148-
php-versions: ['8.1', '8.2', '8.3']
148+
php-versions: ['8.1', '8.2', '8.3', '8.4']
149149

150150
steps:
151151
- name: Setup PHP, with composer and extensions
@@ -185,15 +185,15 @@ jobs:
185185
run: composer install --no-progress --prefer-dist --optimize-autoloader
186186

187187
- name: Run unit tests with coverage
188-
if: ${{ matrix.php-versions == '8.3' }}
188+
if: ${{ matrix.php-versions == '8.4' }}
189189
run: vendor/bin/phpunit
190190

191191
- name: Run unit tests (no coverage)
192-
if: ${{ matrix.php-versions != '8.3' }}
192+
if: ${{ matrix.php-versions != '8.4' }}
193193
run: vendor/bin/phpunit --no-coverage
194194

195195
- name: Save coverage data
196-
if: ${{ matrix.php-versions == '8.3' }}
196+
if: ${{ matrix.php-versions == '8.4' }}
197197
uses: actions/upload-artifact@v4
198198
with:
199199
name: coverage-data
@@ -207,7 +207,7 @@ jobs:
207207
fail-fast: true
208208
matrix:
209209
operating-system: [windows-latest]
210-
php-versions: ['8.1', '8.2', '8.3']
210+
php-versions: ['8.1', '8.2', '8.3', '8.4']
211211

212212
steps:
213213
- name: Setup PHP, with composer and extensions

src/Binding.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ public function getDestination(): ?string
161161
*
162162
* @param string|null $relayState The RelayState.
163163
*/
164-
public function setRelayState(string $relayState = null): void
164+
public function setRelayState(?string $relayState = null): void
165165
{
166166
$this->relayState = $relayState;
167167
}
@@ -185,7 +185,7 @@ public function getRelayState(): ?string
185185
*
186186
* @param string|null $destination The destination the message should be delivered to.
187187
*/
188-
public function setDestination(string $destination = null): void
188+
public function setDestination(?string $destination = null): void
189189
{
190190
$this->destination = $destination;
191191
}

src/Certificate/KeyLoader.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public function __construct()
4646
*/
4747
public static function extractPublicKeys(
4848
CertificateProvider $config,
49-
string $usage = null,
49+
?string $usage = null,
5050
bool $required = false,
5151
): KeyCollection {
5252
$keyLoader = new self();
@@ -63,7 +63,7 @@ public static function extractPublicKeys(
6363
*/
6464
public function loadKeysFromConfiguration(
6565
CertificateProvider $config,
66-
string $usage = null,
66+
?string $usage = null,
6767
bool $required = false,
6868
): KeyCollection {
6969
$keys = $config->getKeys();
@@ -96,7 +96,7 @@ public function loadKeysFromConfiguration(
9696
* @param array|\Traversable $configuredKeys
9797
* @param string|null $usage
9898
*/
99-
public function loadKeys($configuredKeys, string $usage = null): void
99+
public function loadKeys($configuredKeys, ?string $usage = null): void
100100
{
101101
foreach ($configuredKeys as $keyData) {
102102
if (isset($keyData['X509Certificate'])) {

src/Certificate/PrivateKey.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class PrivateKey extends Key
1212
* @throws \SimpleSAML\SAML2\Exception\InvalidArgumentException
1313
* @return \SimpleSAML\SAML2\Certificate\PrivateKey
1414
*/
15-
public static function create(string $keyContents, string $passphrase = null): PrivateKey
15+
public static function create(string $keyContents, ?string $passphrase = null): PrivateKey
1616
{
1717
$keyData = ['PEM' => $keyContents, self::USAGE_ENCRYPTION => true];
1818
if ($passphrase) {

src/Compat/AbstractContainer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ abstract public function getTempDir(): string;
177177
* @param string $data The data we should write to the file.
178178
* @param int|null $mode The permissions to apply to the file. Defaults to 0600.
179179
*/
180-
abstract public function writeFile(string $filename, string $data, int $mode = null): void;
180+
abstract public function writeFile(string $filename, string $data, ?int $mode = null): void;
181181

182182

183183
/**

src/Compat/MockContainer.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public function debugMessage($message, string $type): void
6161
* @return string
6262
*/
6363
public function getPOSTRedirectURL(
64-
/** @scrutinizer ignore-unused */string $url = null,
64+
/** @scrutinizer ignore-unused */?string $url = null,
6565
/** @scrutinizer ignore-unused */array $data = [],
6666
): string {
6767
return strval($url);
@@ -82,7 +82,7 @@ public function getTempDir(): string
8282
* @param string $data
8383
* @param int|null $mode
8484
*/
85-
public function writeFile(string $filename, string $data, int $mode = null): void
85+
public function writeFile(string $filename, string $data, ?int $mode = null): void
8686
{
8787
if ($mode === null) {
8888
$mode = 0600;

src/Configuration/DecryptionProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public function getSharedKey(): ?string;
2424
*
2525
* @return mixed
2626
*/
27-
public function getPrivateKey(string $name, bool $required = null);
27+
public function getPrivateKey(string $name, ?bool $required = null);
2828

2929

3030

src/Configuration/IdentityProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ public function getSharedKey(): ?string
7474
* @param bool $required
7575
* @return mixed|null
7676
*/
77-
public function getPrivateKey(string $name, bool $required = null)
77+
public function getPrivateKey(string $name, ?bool $required = null)
7878
{
7979
if ($required === null) {
8080
$required = false;

src/Configuration/ServiceProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ public function getSharedKey(): ?string
8585
* @param bool $required
8686
* @return mixed|null
8787
*/
88-
public function getPrivateKey(string $name, bool $required = null)
88+
public function getPrivateKey(string $name, ?bool $required = null)
8989
{
9090
if ($required === null) {
9191
$required = false;

src/Exception/ProtocolViolationException.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@
1212
class ProtocolViolationException extends RuntimeException
1313
{
1414
/**
15-
* @param string $message
15+
* @param string|null $message
1616
*/
17-
public function __construct(string $message = null)
17+
public function __construct(?string $message = null)
1818
{
1919
if ($message === null) {
2020
if (defined('static::DEFAULT_MESSAGE')) {

0 commit comments

Comments
 (0)