From 5899d9e1696ca1ea96ac902608db6111716f1f7f Mon Sep 17 00:00:00 2001 From: Patrick Kenny Date: Tue, 3 Dec 2024 15:39:46 +0900 Subject: [PATCH 1/2] fix php 8.4 deprecations --- src/symfony/src/Exception/HttpNotImplementedException.php | 2 +- src/symfony/src/Routing/Loader.php | 4 ++-- src/symfony/src/Security/Handler/DefaultFailureHandler.php | 2 +- src/symfony/src/Security/Handler/FailureHandler.php | 2 +- src/symfony/src/Service/DefaultFailureHandler.php | 2 +- .../src/AuthenticationExtensions/ExtensionOutputError.php | 2 +- .../src/Denormalizer/AttestationObjectDenormalizer.php | 4 ++-- .../src/Denormalizer/AttestationStatementDenormalizer.php | 4 ++-- .../src/Denormalizer/AuthenticationExtensionsDenormalizer.php | 4 ++-- .../AuthenticatorAssertionResponseDenormalizer.php | 4 ++-- .../AuthenticatorAttestationResponseDenormalizer.php | 4 ++-- .../src/Denormalizer/AuthenticatorDataDenormalizer.php | 4 ++-- .../src/Denormalizer/AuthenticatorResponseDenormalizer.php | 4 ++-- .../src/Denormalizer/CollectedClientDataDenormalizer.php | 4 ++-- .../src/Denormalizer/ExtensionDescriptorDenormalizer.php | 4 ++-- .../src/Denormalizer/PublicKeyCredentialDenormalizer.php | 4 ++-- .../Denormalizer/PublicKeyCredentialOptionsDenormalizer.php | 4 ++-- .../PublicKeyCredentialParametersDenormalizer.php | 4 ++-- .../Denormalizer/PublicKeyCredentialSourceDenormalizer.php | 4 ++-- .../PublicKeyCredentialUserEntityDenormalizer.php | 4 ++-- src/webauthn/src/Denormalizer/TrustPathDenormalizer.php | 4 ++-- src/webauthn/src/MetadataService/Psr18HttpClient.php | 4 ++-- .../Service/FidoAllianceCompliantMetadataService.php | 2 +- tests/symfony/functional/FailureHandler.php | 2 +- 24 files changed, 41 insertions(+), 41 deletions(-) diff --git a/src/symfony/src/Exception/HttpNotImplementedException.php b/src/symfony/src/Exception/HttpNotImplementedException.php index 1684a691..75df25fe 100644 --- a/src/symfony/src/Exception/HttpNotImplementedException.php +++ b/src/symfony/src/Exception/HttpNotImplementedException.php @@ -12,7 +12,7 @@ class HttpNotImplementedException extends HttpException /** * @param array $headers */ - public function __construct(string $message = '', Throwable $previous = null, int $code = 0, array $headers = []) + public function __construct(string $message = '', ?Throwable $previous = null, int $code = 0, array $headers = []) { parent::__construct(501, $message, $previous, $headers, $code); } diff --git a/src/symfony/src/Routing/Loader.php b/src/symfony/src/Routing/Loader.php index 8baa6c22..8c78dfd8 100644 --- a/src/symfony/src/Routing/Loader.php +++ b/src/symfony/src/Routing/Loader.php @@ -31,12 +31,12 @@ public function add(string $pattern, ?string $host, string $name, string $method /** * @noRector */ - public function load(mixed $resource, string $type = null): RouteCollection + public function load(mixed $resource, ?string $type = null): RouteCollection { return $this->routes; } - public function supports(mixed $resource, string $type = null): bool + public function supports(mixed $resource, ?string $type = null): bool { return $type === 'webauthn'; } diff --git a/src/symfony/src/Security/Handler/DefaultFailureHandler.php b/src/symfony/src/Security/Handler/DefaultFailureHandler.php index 14bcf652..52050b33 100644 --- a/src/symfony/src/Security/Handler/DefaultFailureHandler.php +++ b/src/symfony/src/Security/Handler/DefaultFailureHandler.php @@ -13,7 +13,7 @@ final class DefaultFailureHandler implements FailureHandler, AuthenticationFailureHandlerInterface { - public function onFailure(Request $request, Throwable $exception = null): Response + public function onFailure(Request $request, ?Throwable $exception = null): Response { $data = [ 'status' => 'error', diff --git a/src/symfony/src/Security/Handler/FailureHandler.php b/src/symfony/src/Security/Handler/FailureHandler.php index 2b414473..85b23113 100644 --- a/src/symfony/src/Security/Handler/FailureHandler.php +++ b/src/symfony/src/Security/Handler/FailureHandler.php @@ -10,5 +10,5 @@ interface FailureHandler { - public function onFailure(Request $request, Throwable $exception = null): Response; + public function onFailure(Request $request, ?Throwable $exception = null): Response; } diff --git a/src/symfony/src/Service/DefaultFailureHandler.php b/src/symfony/src/Service/DefaultFailureHandler.php index 630c2083..9122e015 100644 --- a/src/symfony/src/Service/DefaultFailureHandler.php +++ b/src/symfony/src/Service/DefaultFailureHandler.php @@ -12,7 +12,7 @@ final class DefaultFailureHandler implements FailureHandler { - public function onFailure(Request $request, Throwable $exception = null): Response + public function onFailure(Request $request, ?Throwable $exception = null): Response { $data = [ 'status' => 'error', diff --git a/src/webauthn/src/AuthenticationExtensions/ExtensionOutputError.php b/src/webauthn/src/AuthenticationExtensions/ExtensionOutputError.php index 6a1d0d7d..f731e12f 100644 --- a/src/webauthn/src/AuthenticationExtensions/ExtensionOutputError.php +++ b/src/webauthn/src/AuthenticationExtensions/ExtensionOutputError.php @@ -13,7 +13,7 @@ public function __construct( public readonly AuthenticationExtension $authenticationExtension, string $message = '', int $code = 0, - Throwable $previous = null + ?Throwable $previous = null ) { parent::__construct($message, $code, $previous); } diff --git a/src/webauthn/src/Denormalizer/AttestationObjectDenormalizer.php b/src/webauthn/src/Denormalizer/AttestationObjectDenormalizer.php index dfd4519b..4eaeb917 100644 --- a/src/webauthn/src/Denormalizer/AttestationObjectDenormalizer.php +++ b/src/webauthn/src/Denormalizer/AttestationObjectDenormalizer.php @@ -19,7 +19,7 @@ final class AttestationObjectDenormalizer implements DenormalizerInterface, Deno { use DenormalizerAwareTrait; - public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed { $stream = new StringStream($data); $parsed = Decoder::create()->decode($stream); @@ -46,7 +46,7 @@ public function denormalize(mixed $data, string $type, string $format = null, ar ); } - public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { return $type === AttestationObject::class; } diff --git a/src/webauthn/src/Denormalizer/AttestationStatementDenormalizer.php b/src/webauthn/src/Denormalizer/AttestationStatementDenormalizer.php index 541308b6..1b5c34a7 100644 --- a/src/webauthn/src/Denormalizer/AttestationStatementDenormalizer.php +++ b/src/webauthn/src/Denormalizer/AttestationStatementDenormalizer.php @@ -15,14 +15,14 @@ public function __construct( ) { } - public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed { $attestationStatementSupport = $this->attestationStatementSupportManager->get($data['fmt']); return $attestationStatementSupport->load($data); } - public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { return $type === AttestationStatement::class; } diff --git a/src/webauthn/src/Denormalizer/AuthenticationExtensionsDenormalizer.php b/src/webauthn/src/Denormalizer/AuthenticationExtensionsDenormalizer.php index 4bafad0b..07369f23 100644 --- a/src/webauthn/src/Denormalizer/AuthenticationExtensionsDenormalizer.php +++ b/src/webauthn/src/Denormalizer/AuthenticationExtensionsDenormalizer.php @@ -14,7 +14,7 @@ final class AuthenticationExtensionsDenormalizer implements DenormalizerInterface, NormalizerInterface { - public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed { if ($data instanceof AuthenticationExtensions) { return AuthenticationExtensions::create($data->extensions); @@ -30,7 +30,7 @@ public function denormalize(mixed $data, string $type, string $format = null, ar return AuthenticationExtensions::create($data); } - public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { return $type === AuthenticationExtensions::class; } diff --git a/src/webauthn/src/Denormalizer/AuthenticatorAssertionResponseDenormalizer.php b/src/webauthn/src/Denormalizer/AuthenticatorAssertionResponseDenormalizer.php index 613331c7..4b2432e0 100644 --- a/src/webauthn/src/Denormalizer/AuthenticatorAssertionResponseDenormalizer.php +++ b/src/webauthn/src/Denormalizer/AuthenticatorAssertionResponseDenormalizer.php @@ -18,7 +18,7 @@ final class AuthenticatorAssertionResponseDenormalizer implements DenormalizerIn { use DenormalizerAwareTrait; - public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed { $data['authenticatorData'] = Base64::decode($data['authenticatorData']); $data['signature'] = Base64::decode($data['signature']); @@ -42,7 +42,7 @@ public function denormalize(mixed $data, string $type, string $format = null, ar ); } - public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { return $type === AuthenticatorAssertionResponse::class; } diff --git a/src/webauthn/src/Denormalizer/AuthenticatorAttestationResponseDenormalizer.php b/src/webauthn/src/Denormalizer/AuthenticatorAttestationResponseDenormalizer.php index 5f6569dc..d59303ca 100644 --- a/src/webauthn/src/Denormalizer/AuthenticatorAttestationResponseDenormalizer.php +++ b/src/webauthn/src/Denormalizer/AuthenticatorAttestationResponseDenormalizer.php @@ -17,7 +17,7 @@ final class AuthenticatorAttestationResponseDenormalizer implements Denormalizer { use DenormalizerAwareTrait; - public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed { $data['clientDataJSON'] = Base64UrlSafe::decodeNoPadding($data['clientDataJSON']); $data['attestationObject'] = Base64::decode($data['attestationObject']); @@ -42,7 +42,7 @@ public function denormalize(mixed $data, string $type, string $format = null, ar ); } - public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { return $type === AuthenticatorAttestationResponse::class; } diff --git a/src/webauthn/src/Denormalizer/AuthenticatorDataDenormalizer.php b/src/webauthn/src/Denormalizer/AuthenticatorDataDenormalizer.php index fc0110dc..4ba25719 100644 --- a/src/webauthn/src/Denormalizer/AuthenticatorDataDenormalizer.php +++ b/src/webauthn/src/Denormalizer/AuthenticatorDataDenormalizer.php @@ -35,7 +35,7 @@ public function __construct() $this->decoder = Decoder::create(); } - public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed { $authData = $this->fixIncorrectEdDSAKey($data); $authDataStream = new StringStream($authData); @@ -87,7 +87,7 @@ public function denormalize(mixed $data, string $type, string $format = null, ar ); } - public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { return $type === AuthenticatorData::class; } diff --git a/src/webauthn/src/Denormalizer/AuthenticatorResponseDenormalizer.php b/src/webauthn/src/Denormalizer/AuthenticatorResponseDenormalizer.php index 6a47309d..8ab3aaef 100644 --- a/src/webauthn/src/Denormalizer/AuthenticatorResponseDenormalizer.php +++ b/src/webauthn/src/Denormalizer/AuthenticatorResponseDenormalizer.php @@ -17,7 +17,7 @@ final class AuthenticatorResponseDenormalizer implements DenormalizerInterface, { use DenormalizerAwareTrait; - public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed { $realType = match (true) { array_key_exists('attestationObject', $data) => AuthenticatorAttestationResponse::class, @@ -28,7 +28,7 @@ public function denormalize(mixed $data, string $type, string $format = null, ar return $this->denormalizer->denormalize($data, $realType, $format, $context); } - public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { return $type === AuthenticatorResponse::class; } diff --git a/src/webauthn/src/Denormalizer/CollectedClientDataDenormalizer.php b/src/webauthn/src/Denormalizer/CollectedClientDataDenormalizer.php index e9e5264c..ac47524a 100644 --- a/src/webauthn/src/Denormalizer/CollectedClientDataDenormalizer.php +++ b/src/webauthn/src/Denormalizer/CollectedClientDataDenormalizer.php @@ -14,12 +14,12 @@ final class CollectedClientDataDenormalizer implements DenormalizerInterface, De { use DenormalizerAwareTrait; - public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed { return CollectedClientData::create($data, json_decode($data, true, flags: JSON_THROW_ON_ERROR)); } - public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { return $type === CollectedClientData::class; } diff --git a/src/webauthn/src/Denormalizer/ExtensionDescriptorDenormalizer.php b/src/webauthn/src/Denormalizer/ExtensionDescriptorDenormalizer.php index 8585432a..fe9c78ae 100644 --- a/src/webauthn/src/Denormalizer/ExtensionDescriptorDenormalizer.php +++ b/src/webauthn/src/Denormalizer/ExtensionDescriptorDenormalizer.php @@ -10,7 +10,7 @@ final class ExtensionDescriptorDenormalizer implements DenormalizerInterface { - public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed { if (array_key_exists('fail_if_unknown', $data)) { $data['failIfUnknown'] = $data['fail_if_unknown']; @@ -20,7 +20,7 @@ public function denormalize(mixed $data, string $type, string $format = null, ar return ExtensionDescriptor::create(...$data); } - public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { return $type === ExtensionDescriptor::class; } diff --git a/src/webauthn/src/Denormalizer/PublicKeyCredentialDenormalizer.php b/src/webauthn/src/Denormalizer/PublicKeyCredentialDenormalizer.php index 066b5a55..d46f0008 100644 --- a/src/webauthn/src/Denormalizer/PublicKeyCredentialDenormalizer.php +++ b/src/webauthn/src/Denormalizer/PublicKeyCredentialDenormalizer.php @@ -18,7 +18,7 @@ final class PublicKeyCredentialDenormalizer implements DenormalizerInterface, De { use DenormalizerAwareTrait; - public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed { if (! array_key_exists('id', $data)) { return $data; @@ -35,7 +35,7 @@ public function denormalize(mixed $data, string $type, string $format = null, ar ); } - public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { return $type === PublicKeyCredential::class; } diff --git a/src/webauthn/src/Denormalizer/PublicKeyCredentialOptionsDenormalizer.php b/src/webauthn/src/Denormalizer/PublicKeyCredentialOptionsDenormalizer.php index 7a1c207a..ddf611f6 100644 --- a/src/webauthn/src/Denormalizer/PublicKeyCredentialOptionsDenormalizer.php +++ b/src/webauthn/src/Denormalizer/PublicKeyCredentialOptionsDenormalizer.php @@ -29,7 +29,7 @@ final class PublicKeyCredentialOptionsDenormalizer implements DenormalizerInterf use DenormalizerAwareTrait; use NormalizerAwareTrait; - public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed { if (array_key_exists('challenge', $data)) { $data['challenge'] = Base64UrlSafe::decodeNoPadding($data['challenge']); @@ -103,7 +103,7 @@ public function denormalize(mixed $data, string $type, string $format = null, ar throw new BadMethodCallException('Unsupported type'); } - public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { return in_array( $type, diff --git a/src/webauthn/src/Denormalizer/PublicKeyCredentialParametersDenormalizer.php b/src/webauthn/src/Denormalizer/PublicKeyCredentialParametersDenormalizer.php index b5d64068..a35062a1 100644 --- a/src/webauthn/src/Denormalizer/PublicKeyCredentialParametersDenormalizer.php +++ b/src/webauthn/src/Denormalizer/PublicKeyCredentialParametersDenormalizer.php @@ -11,7 +11,7 @@ final class PublicKeyCredentialParametersDenormalizer implements DenormalizerInterface { - public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed { if (! array_key_exists('type', $data) || ! array_key_exists('alg', $data)) { throw new InvalidDataException($data, 'Missing type or alg'); @@ -20,7 +20,7 @@ public function denormalize(mixed $data, string $type, string $format = null, ar return PublicKeyCredentialParameters::create($data['type'], $data['alg']); } - public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { return $type === PublicKeyCredentialParameters::class; } diff --git a/src/webauthn/src/Denormalizer/PublicKeyCredentialSourceDenormalizer.php b/src/webauthn/src/Denormalizer/PublicKeyCredentialSourceDenormalizer.php index bf8a5ae3..9d863357 100644 --- a/src/webauthn/src/Denormalizer/PublicKeyCredentialSourceDenormalizer.php +++ b/src/webauthn/src/Denormalizer/PublicKeyCredentialSourceDenormalizer.php @@ -24,7 +24,7 @@ final class PublicKeyCredentialSourceDenormalizer implements DenormalizerInterfa use NormalizerAwareTrait; use DenormalizerAwareTrait; - public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed { $keys = ['publicKeyCredentialId', 'credentialPublicKey', 'userHandle']; foreach ($keys as $key) { @@ -49,7 +49,7 @@ public function denormalize(mixed $data, string $type, string $format = null, ar ); } - public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { return $type === PublicKeyCredentialSource::class; } diff --git a/src/webauthn/src/Denormalizer/PublicKeyCredentialUserEntityDenormalizer.php b/src/webauthn/src/Denormalizer/PublicKeyCredentialUserEntityDenormalizer.php index 2e314845..414b85c0 100644 --- a/src/webauthn/src/Denormalizer/PublicKeyCredentialUserEntityDenormalizer.php +++ b/src/webauthn/src/Denormalizer/PublicKeyCredentialUserEntityDenormalizer.php @@ -14,7 +14,7 @@ final class PublicKeyCredentialUserEntityDenormalizer implements DenormalizerInterface, NormalizerInterface { - public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed { if (! array_key_exists('id', $data)) { return $data; @@ -24,7 +24,7 @@ public function denormalize(mixed $data, string $type, string $format = null, ar return PublicKeyCredentialUserEntity::create($data['name'], $data['id'], $data['displayName']); } - public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { return $type === PublicKeyCredentialUserEntity::class; } diff --git a/src/webauthn/src/Denormalizer/TrustPathDenormalizer.php b/src/webauthn/src/Denormalizer/TrustPathDenormalizer.php index 0531ca04..fbea66b1 100644 --- a/src/webauthn/src/Denormalizer/TrustPathDenormalizer.php +++ b/src/webauthn/src/Denormalizer/TrustPathDenormalizer.php @@ -15,7 +15,7 @@ final class TrustPathDenormalizer implements DenormalizerInterface, NormalizerInterface { - public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed { return match (true) { array_key_exists('x5c', $data) => CertificateTrustPath::create($data), @@ -24,7 +24,7 @@ public function denormalize(mixed $data, string $type, string $format = null, ar }; } - public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { return $type === TrustPath::class; } diff --git a/src/webauthn/src/MetadataService/Psr18HttpClient.php b/src/webauthn/src/MetadataService/Psr18HttpClient.php index 1f0b6f71..c296bb1f 100644 --- a/src/webauthn/src/MetadataService/Psr18HttpClient.php +++ b/src/webauthn/src/MetadataService/Psr18HttpClient.php @@ -54,7 +54,7 @@ public function request(string $method, string $url, array $options = []): Respo /** * @param ResponseInterface|iterable $responses */ - public function stream(iterable|ResponseInterface $responses, float $timeout = null): ResponseStreamInterface + public function stream(iterable|ResponseInterface $responses, ?float $timeout = null): ResponseStreamInterface { throw new LogicException('Not implemented'); } @@ -119,7 +119,7 @@ public function cancel(): void // noop } - public function getInfo(string $type = null): mixed + public function getInfo(?string $type = null): mixed { return null; } diff --git a/src/webauthn/src/MetadataService/Service/FidoAllianceCompliantMetadataService.php b/src/webauthn/src/MetadataService/Service/FidoAllianceCompliantMetadataService.php index f01cc121..fc27ebe0 100644 --- a/src/webauthn/src/MetadataService/Service/FidoAllianceCompliantMetadataService.php +++ b/src/webauthn/src/MetadataService/Service/FidoAllianceCompliantMetadataService.php @@ -57,7 +57,7 @@ public function __construct( private readonly array $additionalHeaderParameters = [], private readonly ?CertificateChainValidator $certificateChainValidator = null, private readonly ?string $rootCertificateUri = null, - SerializerInterface $serializer = null, + ?SerializerInterface $serializer = null, ) { $this->serializer = $serializer ?? (new WebauthnSerializerFactory( AttestationStatementSupportManager::create() diff --git a/tests/symfony/functional/FailureHandler.php b/tests/symfony/functional/FailureHandler.php index 73207860..ad793b59 100644 --- a/tests/symfony/functional/FailureHandler.php +++ b/tests/symfony/functional/FailureHandler.php @@ -19,7 +19,7 @@ public function onAuthenticationFailure(Request $request, AuthenticationExceptio return $this->onFailure($request, $exception); } - public function onFailure(Request $request, Throwable $exception = null): Response + public function onFailure(Request $request, ?Throwable $exception = null): Response { $data = [ 'status' => 'error', From ceaf25070ac3bbf779c932ce210afb1671a345f7 Mon Sep 17 00:00:00 2001 From: Florent Morselli Date: Tue, 3 Dec 2024 08:02:38 +0100 Subject: [PATCH 2/2] Rim tests on PHP8.4 --- .github/workflows/integrate.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/integrate.yml b/.github/workflows/integrate.yml index eac003ae..cba23e4a 100644 --- a/.github/workflows/integrate.yml +++ b/.github/workflows/integrate.yml @@ -57,6 +57,7 @@ jobs: php-version: - "8.2" - "8.3" + - "8.4" dependencies: - "lowest" - "highest"