From 8069a0bb2565e26d3f1b8f8057268d63fb334459 Mon Sep 17 00:00:00 2001 From: Florent Morselli Date: Mon, 24 Mar 2025 09:02:13 +0100 Subject: [PATCH 01/10] Add user provider configuration for Webauthn authentication Updated Symfony security config to support multiple user providers. --- src/symfony/src/Resources/config/security.php | 4 +++- tests/symfony/config/config.yml | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/symfony/src/Resources/config/security.php b/src/symfony/src/Resources/config/security.php index 577a365ab..2390934c1 100644 --- a/src/symfony/src/Resources/config/security.php +++ b/src/symfony/src/Resources/config/security.php @@ -61,5 +61,7 @@ $service->set(CurrentUserEntityGuesser::class); $service->set(RequestBodyUserEntityGuesser::class); - $service->set(WebauthnBadgeListener::class); + $service->set(WebauthnBadgeListener::class) + ->arg('$userProvider', service('security.user_providers')) + ; }; diff --git a/tests/symfony/config/config.yml b/tests/symfony/config/config.yml index d05790827..48b8f2523 100644 --- a/tests/symfony/config/config.yml +++ b/tests/symfony/config/config.yml @@ -167,8 +167,10 @@ security: providers: default: id: 'Webauthn\Tests\Bundle\Functional\UserProvider' + users_in_memory: { memory: null } firewalls: main: + provider: default custom_authenticator: 'Webauthn\Tests\Bundle\Functional\WebauthnAuthenticator' webauthn: failure_handler: 'Webauthn\Tests\Bundle\Functional\FailureHandler' From 78d9a4ec91150a2da75147701f9d62aa1f8ab7a9 Mon Sep 17 00:00:00 2001 From: Florent Morselli Date: Mon, 24 Mar 2025 12:58:35 +0100 Subject: [PATCH 02/10] Update PublicKeyCredentialSource.orm.xml --- .../config/doctrine-mapping/PublicKeyCredentialSource.orm.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/symfony/src/Resources/config/doctrine-mapping/PublicKeyCredentialSource.orm.xml b/src/symfony/src/Resources/config/doctrine-mapping/PublicKeyCredentialSource.orm.xml index f3329c092..90cb8e581 100644 --- a/src/symfony/src/Resources/config/doctrine-mapping/PublicKeyCredentialSource.orm.xml +++ b/src/symfony/src/Resources/config/doctrine-mapping/PublicKeyCredentialSource.orm.xml @@ -5,7 +5,7 @@ xsi:schemaLocation="http://doctrine-project.org/schemas/orm/doctrine-mapping https://raw.github.com/doctrine/doctrine2/master/doctrine-mapping.xsd" > - + From aabe72ab91c15bd8ce6dedc0a8a34b69689832f9 Mon Sep 17 00:00:00 2001 From: Florent Morselli Date: Sat, 20 Dec 2025 11:20:41 +0100 Subject: [PATCH 03/10] Rector/ECS (#792) Refactor constructor signatures and assertions in various classes for improved clarity --- composer.json | 1 + phpstan-baseline.neon | 899 ++++++++---------- .../DependencyInjection/WebauthnExtension.php | 2 +- .../Authenticator/WebauthnAuthenticator.php | 4 +- src/symfony/src/WebauthnBundle.php | 2 +- .../TPMAttestationStatementSupport.php | 5 +- .../CeremonyStepManagerFactory.php | 2 +- .../CheckClientDataCollectorType.php | 5 +- .../src/CeremonyStep/CheckSignature.php | 5 +- .../Service/JsonMetadataService.php | 6 +- .../DisplayPNGCharacteristicsDescriptor.php | 4 +- .../VerificationMethodANDCombinations.php | 4 +- .../BiometricAccuracyDescriptorObjectTest.php | 8 +- ...icationMethodANDCombinationsObjectTest.php | 2 +- ...VerificationMethodDescriptorObjectTest.php | 9 +- .../AttestationObjectTest.php | 2 +- ...FidoU2FAttestationStatementSupportTest.php | 2 +- .../NoneAttestationStatementSupportTest.php | 4 +- tests/library/Unit/AuthenticatorDataTest.php | 2 +- tests/symfony/config/config.yml | 1 + tests/symfony/functional/AppKernel.php | 5 +- .../AdditionalAuthenticatorTest.php | 3 +- .../symfony/functional/MockClientCallback.php | 2 +- tests/symfony/functional/UserProvider.php | 2 +- .../functional/WebauthnAuthenticator.php | 2 +- 25 files changed, 445 insertions(+), 538 deletions(-) diff --git a/composer.json b/composer.json index 4b4959d77..34858b92a 100644 --- a/composer.json +++ b/composer.json @@ -121,6 +121,7 @@ "symfony/monolog-bundle": "^3.8", "symfony/twig-bundle": "^6.4|^7.0", "symfony/var-dumper": "^6.4|^7.0", + "symfony/var-exporter": "^6.4|^7.0", "symfony/yaml": "^6.4|^7.0", "symplify/easy-coding-standard": "^12.0", "web-token/jwt-library": "^4.0" diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index 40979949e..d72dbf52e 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -1,2323 +1,2236 @@ parameters: ignoreErrors: - - message: '#^Binary operation "\." between mixed and ''/Resources/config…'' results in an error\.$#' + rawMessage: Binary operation "." between mixed and '/Resources/config…' results in an error. identifier: binaryOp.invalid count: 1 path: src/stimulus/src/WebauthnStimulusBundle.php - - message: '#^Cannot access offset ''path'' on mixed\.$#' + rawMessage: Cannot access offset 'path' on mixed. identifier: offsetAccess.nonOffsetAccessible count: 1 path: src/stimulus/src/WebauthnStimulusBundle.php - - message: '#^Method Webauthn\\Bundle\\CredentialOptionsBuilder\\PublicKeyCredentialCreationOptionsBuilder\:\:getFromRequest\(\) invoked with 3 parameters, 2 required\.$#' + rawMessage: 'Method Webauthn\Bundle\CredentialOptionsBuilder\PublicKeyCredentialCreationOptionsBuilder::getFromRequest() invoked with 3 parameters, 2 required.' identifier: arguments.count count: 1 path: src/symfony/src/Controller/AttestationRequestController.php - - message: '#^Parameter \#1 \$userEntity of method Webauthn\\Bundle\\CredentialOptionsBuilder\\ProfileBasedRequestOptionsBuilder\:\:getCredentials\(\) expects Webauthn\\PublicKeyCredentialUserEntity, Webauthn\\PublicKeyCredentialUserEntity\|null given\.$#' + rawMessage: 'Parameter #1 $userEntity of method Webauthn\Bundle\CredentialOptionsBuilder\ProfileBasedRequestOptionsBuilder::getCredentials() expects Webauthn\PublicKeyCredentialUserEntity, Webauthn\PublicKeyCredentialUserEntity|null given.' identifier: argument.type count: 1 path: src/symfony/src/CredentialOptionsBuilder/ProfileBasedRequestOptionsBuilder.php - - message: '#^Method Webauthn\\Bundle\\DataCollector\\WebauthnCollector\:\:getData\(\) should return array\\|Symfony\\Component\\VarDumper\\Cloner\\Data but returns array\|Symfony\\Component\\VarDumper\\Cloner\\Data\.$#' + rawMessage: 'Method Webauthn\Bundle\DataCollector\WebauthnCollector::getData() should return array|Symfony\Component\VarDumper\Cloner\Data but returns array|Symfony\Component\VarDumper\Cloner\Data.' identifier: return.type count: 1 path: src/symfony/src/DataCollector/WebauthnCollector.php - - message: ''' - #^Call to deprecated method setSecuredRelyingPartyId\(\) of class Webauthn\\Bundle\\DependencyInjection\\Compiler\\CeremonyStepManagerFactoryCompilerPass\: - Will be removed in 6\.0\.0$# + rawMessage: ''' + Call to deprecated method setSecuredRelyingPartyId() of class Webauthn\Bundle\DependencyInjection\Compiler\CeremonyStepManagerFactoryCompilerPass: + Will be removed in 6.0.0 ''' identifier: method.deprecated count: 1 path: src/symfony/src/DependencyInjection/Compiler/CeremonyStepManagerFactoryCompilerPass.php - - message: '#^Parameter \#2 \$array of function array_key_exists expects array, mixed given\.$#' + rawMessage: 'Parameter #2 $array of function array_key_exists expects array, mixed given.' identifier: argument.type count: 1 path: src/symfony/src/DependencyInjection/Compiler/DynamicRouteCompilerPass.php - - message: '#^Anonymous function should return array but returns mixed\.$#' + rawMessage: Anonymous function should return array but returns mixed. identifier: return.type count: 1 path: src/symfony/src/DependencyInjection/Configuration.php - - message: '#^Cannot access offset ''creation_profiles'' on mixed\.$#' + rawMessage: Cannot access offset 'creation_profiles' on mixed. identifier: offsetAccess.nonOffsetAccessible count: 2 path: src/symfony/src/DependencyInjection/Configuration.php - - message: '#^Cannot access offset ''request_profiles'' on mixed\.$#' + rawMessage: Cannot access offset 'request_profiles' on mixed. identifier: offsetAccess.nonOffsetAccessible count: 2 path: src/symfony/src/DependencyInjection/Configuration.php - - message: '#^Cannot access offset ''enabled'' on mixed\.$#' + rawMessage: Cannot access offset 'enabled' on mixed. identifier: offsetAccess.nonOffsetAccessible count: 2 path: src/symfony/src/DependencyInjection/Factory/Security/WebauthnFactory.php - - message: '#^Cannot access offset ''host'' on mixed\.$#' + rawMessage: Cannot access offset 'host' on mixed. identifier: offsetAccess.nonOffsetAccessible count: 4 path: src/symfony/src/DependencyInjection/Factory/Security/WebauthnFactory.php - - message: '#^Cannot access offset ''options_handler'' on mixed\.$#' + rawMessage: Cannot access offset 'options_handler' on mixed. identifier: offsetAccess.nonOffsetAccessible count: 2 path: src/symfony/src/DependencyInjection/Factory/Security/WebauthnFactory.php - - message: '#^Cannot access offset ''options_method'' on mixed\.$#' + rawMessage: Cannot access offset 'options_method' on mixed. identifier: offsetAccess.nonOffsetAccessible count: 2 path: src/symfony/src/DependencyInjection/Factory/Security/WebauthnFactory.php - - message: '#^Cannot access offset ''options_path'' on mixed\.$#' + rawMessage: Cannot access offset 'options_path' on mixed. identifier: offsetAccess.nonOffsetAccessible count: 2 path: src/symfony/src/DependencyInjection/Factory/Security/WebauthnFactory.php - - message: '#^Cannot access offset ''result_method'' on mixed\.$#' + rawMessage: Cannot access offset 'result_method' on mixed. identifier: offsetAccess.nonOffsetAccessible count: 2 path: src/symfony/src/DependencyInjection/Factory/Security/WebauthnFactory.php - - message: '#^Cannot access offset ''result_path'' on mixed\.$#' + rawMessage: Cannot access offset 'result_path' on mixed. identifier: offsetAccess.nonOffsetAccessible count: 2 path: src/symfony/src/DependencyInjection/Factory/Security/WebauthnFactory.php - - message: '#^Cannot access offset ''routes'' on mixed\.$#' + rawMessage: Cannot access offset 'routes' on mixed. identifier: offsetAccess.nonOffsetAccessible count: 14 path: src/symfony/src/DependencyInjection/Factory/Security/WebauthnFactory.php - - message: '#^Method Webauthn\\Bundle\\DependencyInjection\\Factory\\Security\\WebauthnFactory\:\:getAssertionOptionsBuilderId\(\) should return string but returns mixed\.$#' + rawMessage: 'Method Webauthn\Bundle\DependencyInjection\Factory\Security\WebauthnFactory::addConfiguration() has parameter $builder with generic class Symfony\Component\Config\Definition\Builder\NodeDefinition but does not specify its types: TParent' + identifier: missingType.generics + count: 1 + path: src/symfony/src/DependencyInjection/Factory/Security/WebauthnFactory.php + + - + rawMessage: 'Method Webauthn\Bundle\DependencyInjection\Factory\Security\WebauthnFactory::getAssertionOptionsBuilderId() should return string but returns mixed.' identifier: return.type count: 1 path: src/symfony/src/DependencyInjection/Factory/Security/WebauthnFactory.php - - message: '#^Method Webauthn\\Bundle\\DependencyInjection\\Factory\\Security\\WebauthnFactory\:\:getAttestationOptionsBuilderId\(\) should return string but returns mixed\.$#' + rawMessage: 'Method Webauthn\Bundle\DependencyInjection\Factory\Security\WebauthnFactory::getAttestationOptionsBuilderId() should return string but returns mixed.' identifier: return.type count: 1 path: src/symfony/src/DependencyInjection/Factory/Security/WebauthnFactory.php - - message: '#^Parameter \#3 \$config of method Webauthn\\Bundle\\DependencyInjection\\Factory\\Security\\WebauthnFactory\:\:getAssertionOptionsBuilderId\(\) expects array\, mixed given\.$#' + rawMessage: 'Parameter #3 $config of method Webauthn\Bundle\DependencyInjection\Factory\Security\WebauthnFactory::getAssertionOptionsBuilderId() expects array, mixed given.' identifier: argument.type count: 1 path: src/symfony/src/DependencyInjection/Factory/Security/WebauthnFactory.php - - message: '#^Parameter \#3 \$config of method Webauthn\\Bundle\\DependencyInjection\\Factory\\Security\\WebauthnFactory\:\:getAttestationOptionsBuilderId\(\) expects array\, mixed given\.$#' + rawMessage: 'Parameter #3 $config of method Webauthn\Bundle\DependencyInjection\Factory\Security\WebauthnFactory::getAttestationOptionsBuilderId() expects array, mixed given.' identifier: argument.type count: 1 path: src/symfony/src/DependencyInjection/Factory/Security/WebauthnFactory.php - - message: '#^Parameter \#3 \$method of method Webauthn\\Bundle\\DependencyInjection\\Factory\\Security\\WebauthnFactory\:\:createAssertionRequestControllerAndRoute\(\) expects string, mixed given\.$#' + rawMessage: 'Parameter #3 $method of method Webauthn\Bundle\DependencyInjection\Factory\Security\WebauthnFactory::createAssertionRequestControllerAndRoute() expects string, mixed given.' identifier: argument.type count: 1 path: src/symfony/src/DependencyInjection/Factory/Security/WebauthnFactory.php - - message: '#^Parameter \#3 \$method of method Webauthn\\Bundle\\DependencyInjection\\Factory\\Security\\WebauthnFactory\:\:createAttestationRequestControllerAndRoute\(\) expects string, mixed given\.$#' + rawMessage: 'Parameter #3 $method of method Webauthn\Bundle\DependencyInjection\Factory\Security\WebauthnFactory::createAttestationRequestControllerAndRoute() expects string, mixed given.' identifier: argument.type count: 1 path: src/symfony/src/DependencyInjection/Factory/Security/WebauthnFactory.php - - message: '#^Parameter \#3 \$securedRpIds of method Webauthn\\Bundle\\DependencyInjection\\Factory\\Security\\WebauthnServicesFactory\:\:createAuthenticatorAssertionResponseValidator\(\) expects array\, mixed given\.$#' + rawMessage: 'Parameter #3 $securedRpIds of method Webauthn\Bundle\DependencyInjection\Factory\Security\WebauthnServicesFactory::createAuthenticatorAssertionResponseValidator() expects array, mixed given.' identifier: argument.type count: 1 path: src/symfony/src/DependencyInjection/Factory/Security/WebauthnFactory.php - - message: '#^Parameter \#3 \$securedRpIds of method Webauthn\\Bundle\\DependencyInjection\\Factory\\Security\\WebauthnServicesFactory\:\:createAuthenticatorAttestationResponseValidator\(\) expects array\, mixed given\.$#' + rawMessage: 'Parameter #3 $securedRpIds of method Webauthn\Bundle\DependencyInjection\Factory\Security\WebauthnServicesFactory::createAuthenticatorAttestationResponseValidator() expects array, mixed given.' identifier: argument.type count: 1 path: src/symfony/src/DependencyInjection/Factory/Security/WebauthnFactory.php - - message: '#^Parameter \#4 \$method of method Webauthn\\Bundle\\DependencyInjection\\Factory\\Security\\WebauthnFactory\:\:createResponseControllerAndRoute\(\) expects string, mixed given\.$#' + rawMessage: 'Parameter #4 $method of method Webauthn\Bundle\DependencyInjection\Factory\Security\WebauthnFactory::createResponseControllerAndRoute() expects string, mixed given.' identifier: argument.type count: 2 path: src/symfony/src/DependencyInjection/Factory/Security/WebauthnFactory.php - - message: '#^Parameter \#4 \$path of method Webauthn\\Bundle\\DependencyInjection\\Factory\\Security\\WebauthnFactory\:\:createAssertionRequestControllerAndRoute\(\) expects string, mixed given\.$#' + rawMessage: 'Parameter #4 $path of method Webauthn\Bundle\DependencyInjection\Factory\Security\WebauthnFactory::createAssertionRequestControllerAndRoute() expects string, mixed given.' identifier: argument.type count: 1 path: src/symfony/src/DependencyInjection/Factory/Security/WebauthnFactory.php - - message: '#^Parameter \#4 \$path of method Webauthn\\Bundle\\DependencyInjection\\Factory\\Security\\WebauthnFactory\:\:createAttestationRequestControllerAndRoute\(\) expects string, mixed given\.$#' + rawMessage: 'Parameter #4 $path of method Webauthn\Bundle\DependencyInjection\Factory\Security\WebauthnFactory::createAttestationRequestControllerAndRoute() expects string, mixed given.' identifier: argument.type count: 1 path: src/symfony/src/DependencyInjection/Factory/Security/WebauthnFactory.php - - message: '#^Parameter \#4 \$successHandlerId of method Webauthn\\Bundle\\DependencyInjection\\Factory\\Security\\WebauthnFactory\:\:createAuthenticatorService\(\) expects string, mixed given\.$#' + rawMessage: 'Parameter #4 $successHandlerId of method Webauthn\Bundle\DependencyInjection\Factory\Security\WebauthnFactory::createAuthenticatorService() expects string, mixed given.' identifier: argument.type count: 1 path: src/symfony/src/DependencyInjection/Factory/Security/WebauthnFactory.php - - message: '#^Parameter \#5 \$failureHandlerId of method Webauthn\\Bundle\\DependencyInjection\\Factory\\Security\\WebauthnFactory\:\:createAuthenticatorService\(\) expects string, mixed given\.$#' + rawMessage: 'Parameter #5 $failureHandlerId of method Webauthn\Bundle\DependencyInjection\Factory\Security\WebauthnFactory::createAuthenticatorService() expects string, mixed given.' identifier: argument.type count: 1 path: src/symfony/src/DependencyInjection/Factory/Security/WebauthnFactory.php - - message: '#^Parameter \#5 \$host of method Webauthn\\Bundle\\DependencyInjection\\Factory\\Security\\WebauthnFactory\:\:createAssertionRequestControllerAndRoute\(\) expects string\|null, mixed given\.$#' + rawMessage: 'Parameter #5 $host of method Webauthn\Bundle\DependencyInjection\Factory\Security\WebauthnFactory::createAssertionRequestControllerAndRoute() expects string|null, mixed given.' identifier: argument.type count: 1 path: src/symfony/src/DependencyInjection/Factory/Security/WebauthnFactory.php - - message: '#^Parameter \#5 \$host of method Webauthn\\Bundle\\DependencyInjection\\Factory\\Security\\WebauthnFactory\:\:createAttestationRequestControllerAndRoute\(\) expects string\|null, mixed given\.$#' + rawMessage: 'Parameter #5 $host of method Webauthn\Bundle\DependencyInjection\Factory\Security\WebauthnFactory::createAttestationRequestControllerAndRoute() expects string|null, mixed given.' identifier: argument.type count: 1 path: src/symfony/src/DependencyInjection/Factory/Security/WebauthnFactory.php - - message: '#^Parameter \#5 \$path of method Webauthn\\Bundle\\DependencyInjection\\Factory\\Security\\WebauthnFactory\:\:createResponseControllerAndRoute\(\) expects string, mixed given\.$#' + rawMessage: 'Parameter #5 $path of method Webauthn\Bundle\DependencyInjection\Factory\Security\WebauthnFactory::createResponseControllerAndRoute() expects string, mixed given.' identifier: argument.type count: 2 path: src/symfony/src/DependencyInjection/Factory/Security/WebauthnFactory.php - - message: '#^Parameter \#6 \$host of method Webauthn\\Bundle\\DependencyInjection\\Factory\\Security\\WebauthnFactory\:\:createResponseControllerAndRoute\(\) expects string\|null, mixed given\.$#' + rawMessage: 'Parameter #6 $host of method Webauthn\Bundle\DependencyInjection\Factory\Security\WebauthnFactory::createResponseControllerAndRoute() expects string|null, mixed given.' identifier: argument.type count: 2 path: src/symfony/src/DependencyInjection/Factory/Security/WebauthnFactory.php - - message: '#^Parameter \#7 \$optionsStorageId of method Webauthn\\Bundle\\DependencyInjection\\Factory\\Security\\WebauthnFactory\:\:createAssertionRequestControllerAndRoute\(\) expects string\|null, mixed given\.$#' + rawMessage: 'Parameter #7 $optionsStorageId of method Webauthn\Bundle\DependencyInjection\Factory\Security\WebauthnFactory::createAssertionRequestControllerAndRoute() expects string|null, mixed given.' identifier: argument.type count: 1 path: src/symfony/src/DependencyInjection/Factory/Security/WebauthnFactory.php - - message: '#^Parameter \#7 \$optionsStorageId of method Webauthn\\Bundle\\DependencyInjection\\Factory\\Security\\WebauthnFactory\:\:createAttestationRequestControllerAndRoute\(\) expects string\|null, mixed given\.$#' + rawMessage: 'Parameter #7 $optionsStorageId of method Webauthn\Bundle\DependencyInjection\Factory\Security\WebauthnFactory::createAttestationRequestControllerAndRoute() expects string|null, mixed given.' identifier: argument.type count: 1 path: src/symfony/src/DependencyInjection/Factory/Security/WebauthnFactory.php - - message: '#^Parameter \#7 \$optionsStorageId of method Webauthn\\Bundle\\DependencyInjection\\Factory\\Security\\WebauthnFactory\:\:createAuthenticatorService\(\) expects string\|null, mixed given\.$#' + rawMessage: 'Parameter #7 $optionsStorageId of method Webauthn\Bundle\DependencyInjection\Factory\Security\WebauthnFactory::createAuthenticatorService() expects string|null, mixed given.' identifier: argument.type count: 1 path: src/symfony/src/DependencyInjection/Factory/Security/WebauthnFactory.php - - message: '#^Parameter \#8 \$optionsHandlerId of method Webauthn\\Bundle\\DependencyInjection\\Factory\\Security\\WebauthnFactory\:\:createAssertionRequestControllerAndRoute\(\) expects string, mixed given\.$#' + rawMessage: 'Parameter #8 $optionsHandlerId of method Webauthn\Bundle\DependencyInjection\Factory\Security\WebauthnFactory::createAssertionRequestControllerAndRoute() expects string, mixed given.' identifier: argument.type count: 1 path: src/symfony/src/DependencyInjection/Factory/Security/WebauthnFactory.php - - message: '#^Parameter \#8 \$optionsHandlerId of method Webauthn\\Bundle\\DependencyInjection\\Factory\\Security\\WebauthnFactory\:\:createAttestationRequestControllerAndRoute\(\) expects string, mixed given\.$#' + rawMessage: 'Parameter #8 $optionsHandlerId of method Webauthn\Bundle\DependencyInjection\Factory\Security\WebauthnFactory::createAttestationRequestControllerAndRoute() expects string, mixed given.' identifier: argument.type count: 1 path: src/symfony/src/DependencyInjection/Factory/Security/WebauthnFactory.php - - message: '#^Parameter \#9 \$failureHandlerId of method Webauthn\\Bundle\\DependencyInjection\\Factory\\Security\\WebauthnFactory\:\:createAssertionRequestControllerAndRoute\(\) expects string, mixed given\.$#' + rawMessage: 'Parameter #9 $failureHandlerId of method Webauthn\Bundle\DependencyInjection\Factory\Security\WebauthnFactory::createAssertionRequestControllerAndRoute() expects string, mixed given.' identifier: argument.type count: 1 path: src/symfony/src/DependencyInjection/Factory/Security/WebauthnFactory.php - - message: '#^Parameter \#9 \$failureHandlerId of method Webauthn\\Bundle\\DependencyInjection\\Factory\\Security\\WebauthnFactory\:\:createAttestationRequestControllerAndRoute\(\) expects string, mixed given\.$#' + rawMessage: 'Parameter #9 $failureHandlerId of method Webauthn\Bundle\DependencyInjection\Factory\Security\WebauthnFactory::createAttestationRequestControllerAndRoute() expects string, mixed given.' identifier: argument.type count: 1 path: src/symfony/src/DependencyInjection/Factory/Security/WebauthnFactory.php - - message: '#^Binary operation "\+\=" between mixed and array\{attested_credential_data\: ''Webauthn\\\\Bundle\\\\Doctrine\\\\Type\\\\AttestedCredentialDataType'', aaguid\: ''Webauthn\\\\Bundle\\\\Doctrine\\\\Type\\\\AAGUIDDataType'', base64\: ''Webauthn\\\\Bundle\\\\Doctrine\\\\Type\\\\Base64BinaryDataType'', public_key_credential_descriptor\: ''Webauthn\\\\Bundle\\\\Doctrine\\\\Type\\\\PublicKeyCredentialDescriptorType'', trust_path\: ''Webauthn\\\\Bundle\\\\Doctrine\\\\Type\\\\TrustPathDataType''\} results in an error\.$#' + rawMessage: 'Binary operation "+=" between mixed and array{attested_credential_data: ''Webauthn\\Bundle\\Doctrine\\Type\\AttestedCredentialDataType'', aaguid: ''Webauthn\\Bundle\\Doctrine\\Type\\AAGUIDDataType'', base64: ''Webauthn\\Bundle\\Doctrine\\Type\\Base64BinaryDataType'', public_key_credential_descriptor: ''Webauthn\\Bundle\\Doctrine\\Type\\PublicKeyCredentialDescriptorType'', trust_path: ''Webauthn\\Bundle\\Doctrine\\Type\\TrustPathDataType''} results in an error.' identifier: assignOp.invalid count: 1 path: src/symfony/src/DependencyInjection/WebauthnExtension.php - - message: '#^Cannot access offset ''failure_handler'' on mixed\.$#' + rawMessage: Cannot access offset 'failure_handler' on mixed. identifier: offsetAccess.nonOffsetAccessible count: 4 path: src/symfony/src/DependencyInjection/WebauthnExtension.php - - message: '#^Cannot access offset ''hide_existing_credentials'' on mixed\.$#' + rawMessage: Cannot access offset 'hide_existing_credentials' on mixed. identifier: offsetAccess.nonOffsetAccessible count: 1 path: src/symfony/src/DependencyInjection/WebauthnExtension.php - - message: '#^Cannot access offset ''host'' on mixed\.$#' + rawMessage: Cannot access offset 'host' on mixed. identifier: offsetAccess.nonOffsetAccessible count: 4 path: src/symfony/src/DependencyInjection/WebauthnExtension.php - - message: '#^Cannot access offset ''options_builder'' on mixed\.$#' + rawMessage: Cannot access offset 'options_builder' on mixed. identifier: offsetAccess.nonOffsetAccessible count: 2 path: src/symfony/src/DependencyInjection/WebauthnExtension.php - - message: '#^Cannot access offset ''options_handler'' on mixed\.$#' + rawMessage: Cannot access offset 'options_handler' on mixed. identifier: offsetAccess.nonOffsetAccessible count: 2 path: src/symfony/src/DependencyInjection/WebauthnExtension.php - - message: '#^Cannot access offset ''options_method'' on mixed\.$#' + rawMessage: Cannot access offset 'options_method' on mixed. identifier: offsetAccess.nonOffsetAccessible count: 2 path: src/symfony/src/DependencyInjection/WebauthnExtension.php - - message: '#^Cannot access offset ''options_path'' on mixed\.$#' + rawMessage: Cannot access offset 'options_path' on mixed. identifier: offsetAccess.nonOffsetAccessible count: 2 path: src/symfony/src/DependencyInjection/WebauthnExtension.php - - message: '#^Cannot access offset ''options_storage'' on mixed\.$#' + rawMessage: Cannot access offset 'options_storage' on mixed. identifier: offsetAccess.nonOffsetAccessible count: 4 path: src/symfony/src/DependencyInjection/WebauthnExtension.php - - message: '#^Cannot access offset ''profile'' on mixed\.$#' + rawMessage: Cannot access offset 'profile' on mixed. identifier: offsetAccess.nonOffsetAccessible count: 2 path: src/symfony/src/DependencyInjection/WebauthnExtension.php - - message: '#^Cannot access offset ''result_method'' on mixed\.$#' + rawMessage: Cannot access offset 'result_method' on mixed. identifier: offsetAccess.nonOffsetAccessible count: 2 path: src/symfony/src/DependencyInjection/WebauthnExtension.php - - message: '#^Cannot access offset ''result_path'' on mixed\.$#' + rawMessage: Cannot access offset 'result_path' on mixed. identifier: offsetAccess.nonOffsetAccessible count: 2 path: src/symfony/src/DependencyInjection/WebauthnExtension.php - - message: '#^Cannot access offset ''secured_rp_ids'' on mixed\.$#' + rawMessage: Cannot access offset 'secured_rp_ids' on mixed. identifier: offsetAccess.nonOffsetAccessible count: 2 path: src/symfony/src/DependencyInjection/WebauthnExtension.php - - message: '#^Cannot access offset ''success_handler'' on mixed\.$#' + rawMessage: Cannot access offset 'success_handler' on mixed. identifier: offsetAccess.nonOffsetAccessible count: 2 path: src/symfony/src/DependencyInjection/WebauthnExtension.php - - message: '#^Cannot access offset ''types'' on mixed\.$#' + rawMessage: Cannot access offset 'types' on mixed. identifier: offsetAccess.nonOffsetAccessible count: 2 path: src/symfony/src/DependencyInjection/WebauthnExtension.php - - message: '#^Cannot access offset ''user_entity_guesser'' on mixed\.$#' + rawMessage: Cannot access offset 'user_entity_guesser' on mixed. identifier: offsetAccess.nonOffsetAccessible count: 1 path: src/symfony/src/DependencyInjection/WebauthnExtension.php - - message: '#^Method Webauthn\\Bundle\\DependencyInjection\\WebauthnExtension\:\:getConfiguration\(\) has parameter \$config with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + rawMessage: Expression on left side of ?? is not nullable. + identifier: nullCoalesce.expr count: 1 path: src/symfony/src/DependencyInjection/WebauthnExtension.php - - message: '#^Method Webauthn\\Bundle\\DependencyInjection\\WebauthnExtension\:\:getConfiguration\(\) never returns null so it can be removed from the return type\.$#' - identifier: return.unusedType + rawMessage: 'Method Webauthn\Bundle\DependencyInjection\WebauthnExtension::getConfiguration() has parameter $config with no value type specified in iterable type array.' + identifier: missingType.iterableValue count: 1 path: src/symfony/src/DependencyInjection/WebauthnExtension.php - - message: '#^Method Webauthn\\Bundle\\DependencyInjection\\WebauthnExtension\:\:getDoctrineBundleConfiguration\(\) return type has no value type specified in iterable type array\.$#' + rawMessage: 'Method Webauthn\Bundle\DependencyInjection\WebauthnExtension::getDoctrineBundleConfiguration() return type has no value type specified in iterable type array.' identifier: missingType.iterableValue count: 1 path: src/symfony/src/DependencyInjection/WebauthnExtension.php - - message: '#^Parameter \#1 \$id of class Symfony\\Component\\DependencyInjection\\Reference constructor expects string, mixed given\.$#' + rawMessage: 'Parameter #1 $id of class Symfony\Component\DependencyInjection\Reference constructor expects string, mixed given.' identifier: argument.type count: 15 path: src/symfony/src/DependencyInjection/WebauthnExtension.php - - message: '#^Parameter \#2 \$config of method Symfony\\Component\\DependencyInjection\\ContainerBuilder\:\:prependExtensionConfig\(\) expects array\, array given\.$#' + rawMessage: 'Parameter #2 $config of method Symfony\Component\DependencyInjection\ContainerBuilder::prependExtensionConfig() expects array, array given.' identifier: argument.type count: 1 path: src/symfony/src/DependencyInjection/WebauthnExtension.php - - message: '#^Parameter \#2 \$config of method Webauthn\\Bundle\\DependencyInjection\\WebauthnExtension\:\:loadControllersSupport\(\) expects array\, mixed given\.$#' + rawMessage: 'Parameter #2 $config of method Webauthn\Bundle\DependencyInjection\WebauthnExtension::loadControllersSupport() expects array, mixed given.' identifier: argument.type count: 1 path: src/symfony/src/DependencyInjection/WebauthnExtension.php - - message: '#^Parameter \#2 \$config of method Webauthn\\Bundle\\DependencyInjection\\WebauthnExtension\:\:loadCreationControllersSupport\(\) expects array\, mixed given\.$#' + rawMessage: 'Parameter #2 $config of method Webauthn\Bundle\DependencyInjection\WebauthnExtension::loadCreationControllersSupport() expects array, mixed given.' identifier: argument.type count: 1 path: src/symfony/src/DependencyInjection/WebauthnExtension.php - - message: '#^Parameter \#2 \$config of method Webauthn\\Bundle\\DependencyInjection\\WebauthnExtension\:\:loadRequestControllersSupport\(\) expects array\, mixed given\.$#' + rawMessage: 'Parameter #2 $config of method Webauthn\Bundle\DependencyInjection\WebauthnExtension::loadRequestControllersSupport() expects array, mixed given.' identifier: argument.type count: 1 path: src/symfony/src/DependencyInjection/WebauthnExtension.php - - message: '#^Parameter \#2 \$id of method Symfony\\Component\\DependencyInjection\\ContainerBuilder\:\:setAlias\(\) expects string\|Symfony\\Component\\DependencyInjection\\Alias, mixed given\.$#' + rawMessage: 'Parameter #2 $id of method Symfony\Component\DependencyInjection\ContainerBuilder::setAlias() expects string|Symfony\Component\DependencyInjection\Alias, mixed given.' identifier: argument.type count: 13 path: src/symfony/src/DependencyInjection/WebauthnExtension.php - - message: '#^Parameter \#2 \$value of method Symfony\\Component\\DependencyInjection\\Container\:\:setParameter\(\) expects array\|bool\|float\|int\|string\|UnitEnum\|null, mixed given\.$#' + rawMessage: 'Parameter #2 $value of method Symfony\Component\DependencyInjection\Container::setParameter() expects array|bool|float|int|string|UnitEnum|null, mixed given.' identifier: argument.type count: 5 path: src/symfony/src/DependencyInjection/WebauthnExtension.php - - message: '#^Parameter \#3 \$config of method Webauthn\\Bundle\\DependencyInjection\\WebauthnExtension\:\:loadMetadataServices\(\) expects array\, mixed given\.$#' + rawMessage: 'Parameter #3 $config of method Webauthn\Bundle\DependencyInjection\WebauthnExtension::loadMetadataServices() expects array, mixed given.' identifier: argument.type count: 1 path: src/symfony/src/DependencyInjection/WebauthnExtension.php - - message: '#^Method Webauthn\\Bundle\\Doctrine\\Type\\AttestedCredentialDataType\:\:convertToDatabaseValue\(\) should return string\|null but returns T of mixed\.$#' + rawMessage: 'Method Webauthn\Bundle\Doctrine\Type\AttestedCredentialDataType::convertToDatabaseValue() should return string|null but returns T of mixed.' identifier: return.type count: 1 path: src/symfony/src/Doctrine/Type/AttestedCredentialDataType.php - - message: '#^Method Webauthn\\Bundle\\Doctrine\\Type\\AttestedCredentialDataType\:\:convertToPHPValue\(\) should return Webauthn\\AttestedCredentialData\|null but returns mixed\.$#' + rawMessage: 'Method Webauthn\Bundle\Doctrine\Type\AttestedCredentialDataType::convertToPHPValue() should return Webauthn\AttestedCredentialData|null but returns mixed.' identifier: return.type count: 1 path: src/symfony/src/Doctrine/Type/AttestedCredentialDataType.php - - message: '#^Parameter \#1 \$data of method Webauthn\\Bundle\\Doctrine\\Type\\AttestedCredentialDataType\:\:deserialize\(\) expects string, mixed given\.$#' + rawMessage: 'Parameter #1 $data of method Webauthn\Bundle\Doctrine\Type\AttestedCredentialDataType::deserialize() expects string, mixed given.' identifier: argument.type count: 1 path: src/symfony/src/Doctrine/Type/AttestedCredentialDataType.php - - message: '#^Method Webauthn\\Bundle\\Doctrine\\Type\\PublicKeyCredentialDescriptorType\:\:convertToDatabaseValue\(\) should return string\|null but returns T of mixed\.$#' + rawMessage: 'Method Webauthn\Bundle\Doctrine\Type\PublicKeyCredentialDescriptorType::convertToDatabaseValue() should return string|null but returns T of mixed.' identifier: return.type count: 1 path: src/symfony/src/Doctrine/Type/PublicKeyCredentialDescriptorType.php - - message: '#^Method Webauthn\\Bundle\\Doctrine\\Type\\PublicKeyCredentialDescriptorType\:\:convertToPHPValue\(\) should return Webauthn\\PublicKeyCredentialDescriptor\|null but returns mixed\.$#' + rawMessage: 'Method Webauthn\Bundle\Doctrine\Type\PublicKeyCredentialDescriptorType::convertToPHPValue() should return Webauthn\PublicKeyCredentialDescriptor|null but returns mixed.' identifier: return.type count: 1 path: src/symfony/src/Doctrine/Type/PublicKeyCredentialDescriptorType.php - - message: '#^Parameter \#1 \$data of method Webauthn\\Bundle\\Doctrine\\Type\\PublicKeyCredentialDescriptorType\:\:deserialize\(\) expects string, mixed given\.$#' + rawMessage: 'Parameter #1 $data of method Webauthn\Bundle\Doctrine\Type\PublicKeyCredentialDescriptorType::deserialize() expects string, mixed given.' identifier: argument.type count: 1 path: src/symfony/src/Doctrine/Type/PublicKeyCredentialDescriptorType.php - - message: '#^Method Webauthn\\Bundle\\Doctrine\\Type\\TrustPathDataType\:\:convertToDatabaseValue\(\) should return string\|null but returns T of mixed\.$#' + rawMessage: 'Method Webauthn\Bundle\Doctrine\Type\TrustPathDataType::convertToDatabaseValue() should return string|null but returns T of mixed.' identifier: return.type count: 1 path: src/symfony/src/Doctrine/Type/TrustPathDataType.php - - message: '#^Method Webauthn\\Bundle\\Doctrine\\Type\\TrustPathDataType\:\:convertToPHPValue\(\) should return Webauthn\\TrustPath\\TrustPath\|null but returns mixed\.$#' + rawMessage: 'Method Webauthn\Bundle\Doctrine\Type\TrustPathDataType::convertToPHPValue() should return Webauthn\TrustPath\TrustPath|null but returns mixed.' identifier: return.type count: 1 path: src/symfony/src/Doctrine/Type/TrustPathDataType.php - - message: '#^Parameter \#1 \$data of method Webauthn\\Bundle\\Doctrine\\Type\\TrustPathDataType\:\:deserialize\(\) expects string, mixed given\.$#' + rawMessage: 'Parameter #1 $data of method Webauthn\Bundle\Doctrine\Type\TrustPathDataType::deserialize() expects string, mixed given.' identifier: argument.type count: 1 path: src/symfony/src/Doctrine/Type/TrustPathDataType.php - - message: '#^Method Webauthn\\Bundle\\Repository\\DoctrineCredentialSourceRepository\:\:findAllForUserEntity\(\) should return array\ but returns mixed\.$#' + rawMessage: 'Method Webauthn\Bundle\Repository\DoctrineCredentialSourceRepository::findAllForUserEntity() should return array but returns mixed.' identifier: return.type count: 1 path: src/symfony/src/Repository/DoctrineCredentialSourceRepository.php - - message: '#^Method Webauthn\\Bundle\\Repository\\DoctrineCredentialSourceRepository\:\:findOneByCredentialId\(\) should return Webauthn\\PublicKeyCredentialSource\|null but returns mixed\.$#' + rawMessage: 'Method Webauthn\Bundle\Repository\DoctrineCredentialSourceRepository::findOneByCredentialId() should return Webauthn\PublicKeyCredentialSource|null but returns mixed.' identifier: return.type count: 1 path: src/symfony/src/Repository/DoctrineCredentialSourceRepository.php - - message: '#^Method Webauthn\\Bundle\\Security\\Authentication\\Token\\WebauthnToken\:\:getAttributes\(\) should return array\ but returns array\.$#' + rawMessage: 'Method Webauthn\Bundle\Security\Authentication\Token\WebauthnToken::getAttributes() should return array but returns array.' identifier: return.type count: 1 path: src/symfony/src/Security/Authentication/Token/WebauthnToken.php - - message: '#^Property Webauthn\\Bundle\\Security\\Authentication\\Token\\WebauthnToken\:\:\$extensions \(Webauthn\\AuthenticationExtensions\\AuthenticationExtensions\|null\) does not accept mixed\.$#' + rawMessage: 'Property Webauthn\Bundle\Security\Authentication\Token\WebauthnToken::$extensions (Webauthn\AuthenticationExtensions\AuthenticationExtensions|null) does not accept mixed.' identifier: assign.propertyType count: 1 path: src/symfony/src/Security/Authentication/Token/WebauthnToken.php - - message: '#^Property Webauthn\\Bundle\\Security\\Authentication\\Token\\WebauthnToken\:\:\$firewallName \(string\) does not accept mixed\.$#' + rawMessage: 'Property Webauthn\Bundle\Security\Authentication\Token\WebauthnToken::$firewallName (string) does not accept mixed.' identifier: assign.propertyType count: 1 path: src/symfony/src/Security/Authentication/Token/WebauthnToken.php - - message: '#^Property Webauthn\\Bundle\\Security\\Authentication\\Token\\WebauthnToken\:\:\$isBackedUp \(bool\) does not accept mixed\.$#' + rawMessage: 'Property Webauthn\Bundle\Security\Authentication\Token\WebauthnToken::$isBackedUp (bool) does not accept mixed.' identifier: assign.propertyType count: 1 path: src/symfony/src/Security/Authentication/Token/WebauthnToken.php - - message: '#^Property Webauthn\\Bundle\\Security\\Authentication\\Token\\WebauthnToken\:\:\$isBackupEligible \(bool\) does not accept mixed\.$#' + rawMessage: 'Property Webauthn\Bundle\Security\Authentication\Token\WebauthnToken::$isBackupEligible (bool) does not accept mixed.' identifier: assign.propertyType count: 1 path: src/symfony/src/Security/Authentication/Token/WebauthnToken.php - - message: '#^Property Webauthn\\Bundle\\Security\\Authentication\\Token\\WebauthnToken\:\:\$isUserPresent \(bool\) does not accept mixed\.$#' + rawMessage: 'Property Webauthn\Bundle\Security\Authentication\Token\WebauthnToken::$isUserPresent (bool) does not accept mixed.' identifier: assign.propertyType count: 1 path: src/symfony/src/Security/Authentication/Token/WebauthnToken.php - - message: '#^Property Webauthn\\Bundle\\Security\\Authentication\\Token\\WebauthnToken\:\:\$isUserVerified \(bool\) does not accept mixed\.$#' + rawMessage: 'Property Webauthn\Bundle\Security\Authentication\Token\WebauthnToken::$isUserVerified (bool) does not accept mixed.' identifier: assign.propertyType count: 1 path: src/symfony/src/Security/Authentication/Token/WebauthnToken.php - - message: '#^Property Webauthn\\Bundle\\Security\\Authentication\\Token\\WebauthnToken\:\:\$publicKeyCredentialDescriptor \(Webauthn\\PublicKeyCredentialDescriptor\) does not accept mixed\.$#' + rawMessage: 'Property Webauthn\Bundle\Security\Authentication\Token\WebauthnToken::$publicKeyCredentialDescriptor (Webauthn\PublicKeyCredentialDescriptor) does not accept mixed.' identifier: assign.propertyType count: 1 path: src/symfony/src/Security/Authentication/Token/WebauthnToken.php - - message: '#^Property Webauthn\\Bundle\\Security\\Authentication\\Token\\WebauthnToken\:\:\$publicKeyCredentialOptions \(Webauthn\\PublicKeyCredentialOptions\) does not accept mixed\.$#' + rawMessage: 'Property Webauthn\Bundle\Security\Authentication\Token\WebauthnToken::$publicKeyCredentialOptions (Webauthn\PublicKeyCredentialOptions) does not accept mixed.' identifier: assign.propertyType count: 1 path: src/symfony/src/Security/Authentication/Token/WebauthnToken.php - - message: '#^Property Webauthn\\Bundle\\Security\\Authentication\\Token\\WebauthnToken\:\:\$publicKeyCredentialUserEntity \(Webauthn\\PublicKeyCredentialUserEntity\) does not accept mixed\.$#' + rawMessage: 'Property Webauthn\Bundle\Security\Authentication\Token\WebauthnToken::$publicKeyCredentialUserEntity (Webauthn\PublicKeyCredentialUserEntity) does not accept mixed.' identifier: assign.propertyType count: 1 path: src/symfony/src/Security/Authentication/Token/WebauthnToken.php - - message: '#^Property Webauthn\\Bundle\\Security\\Authentication\\Token\\WebauthnToken\:\:\$reservedForFutureUse1 \(int\) does not accept mixed\.$#' + rawMessage: 'Property Webauthn\Bundle\Security\Authentication\Token\WebauthnToken::$reservedForFutureUse1 (int) does not accept mixed.' identifier: assign.propertyType count: 1 path: src/symfony/src/Security/Authentication/Token/WebauthnToken.php - - message: '#^Property Webauthn\\Bundle\\Security\\Authentication\\Token\\WebauthnToken\:\:\$reservedForFutureUse2 \(int\) does not accept mixed\.$#' + rawMessage: 'Property Webauthn\Bundle\Security\Authentication\Token\WebauthnToken::$reservedForFutureUse2 (int) does not accept mixed.' identifier: assign.propertyType count: 1 path: src/symfony/src/Security/Authentication/Token/WebauthnToken.php - - message: '#^Property Webauthn\\Bundle\\Security\\Authentication\\Token\\WebauthnToken\:\:\$signCount \(int\) does not accept mixed\.$#' + rawMessage: 'Property Webauthn\Bundle\Security\Authentication\Token\WebauthnToken::$signCount (int) does not accept mixed.' identifier: assign.propertyType count: 1 path: src/symfony/src/Security/Authentication/Token/WebauthnToken.php - - message: '#^Access to an undefined property Webauthn\\AuthenticatorResponse\:\:\$attestationObject\.$#' + rawMessage: Access to an undefined property Webauthn\AuthenticatorResponse::$attestationObject. identifier: property.notFound count: 1 path: src/symfony/src/Security/Authentication/WebauthnAuthenticator.php - - message: '#^Cannot access property \$authData on mixed\.$#' + rawMessage: Cannot access property $authData on mixed. identifier: property.nonObject count: 1 path: src/symfony/src/Security/Authentication/WebauthnAuthenticator.php - - message: '#^Cannot access property \$extensions on mixed\.$#' + rawMessage: Cannot access property $extensions on mixed. identifier: property.nonObject count: 1 path: src/symfony/src/Security/Authentication/WebauthnAuthenticator.php - - message: '#^Cannot access property \$signCount on mixed\.$#' + rawMessage: Cannot access property $signCount on mixed. identifier: property.nonObject count: 1 path: src/symfony/src/Security/Authentication/WebauthnAuthenticator.php - - message: '#^Cannot call method getReservedForFutureUse1\(\) on mixed\.$#' + rawMessage: 'Cannot call method getReservedForFutureUse1() on mixed.' identifier: method.nonObject count: 1 path: src/symfony/src/Security/Authentication/WebauthnAuthenticator.php - - message: '#^Cannot call method getReservedForFutureUse2\(\) on mixed\.$#' + rawMessage: 'Cannot call method getReservedForFutureUse2() on mixed.' identifier: method.nonObject count: 1 path: src/symfony/src/Security/Authentication/WebauthnAuthenticator.php - - message: '#^Cannot call method isBackedUp\(\) on mixed\.$#' + rawMessage: 'Cannot call method isBackedUp() on mixed.' identifier: method.nonObject count: 1 path: src/symfony/src/Security/Authentication/WebauthnAuthenticator.php - - message: '#^Cannot call method isBackupEligible\(\) on mixed\.$#' + rawMessage: 'Cannot call method isBackupEligible() on mixed.' identifier: method.nonObject count: 1 path: src/symfony/src/Security/Authentication/WebauthnAuthenticator.php - - message: '#^Cannot call method isUserPresent\(\) on mixed\.$#' + rawMessage: 'Cannot call method isUserPresent() on mixed.' identifier: method.nonObject count: 1 path: src/symfony/src/Security/Authentication/WebauthnAuthenticator.php - - message: '#^Cannot call method isUserVerified\(\) on mixed\.$#' + rawMessage: 'Cannot call method isUserVerified() on mixed.' identifier: method.nonObject count: 1 path: src/symfony/src/Security/Authentication/WebauthnAuthenticator.php - - message: '#^Parameter \#12 \$isBackupEligible of class Webauthn\\Bundle\\Security\\Authentication\\Token\\WebauthnToken constructor expects bool, mixed given\.$#' + rawMessage: 'Parameter #12 $isBackupEligible of class Webauthn\Bundle\Security\Authentication\Token\WebauthnToken constructor expects bool, mixed given.' identifier: argument.type count: 1 path: src/symfony/src/Security/Authentication/WebauthnAuthenticator.php - - message: '#^Parameter \#13 \$isBackedUp of class Webauthn\\Bundle\\Security\\Authentication\\Token\\WebauthnToken constructor expects bool, mixed given\.$#' + rawMessage: 'Parameter #13 $isBackedUp of class Webauthn\Bundle\Security\Authentication\Token\WebauthnToken constructor expects bool, mixed given.' identifier: argument.type count: 1 path: src/symfony/src/Security/Authentication/WebauthnAuthenticator.php - - message: '#^Parameter \#4 \$isUserPresent of class Webauthn\\Bundle\\Security\\Authentication\\Token\\WebauthnToken constructor expects bool, mixed given\.$#' + rawMessage: 'Parameter #4 $isUserPresent of class Webauthn\Bundle\Security\Authentication\Token\WebauthnToken constructor expects bool, mixed given.' identifier: argument.type count: 1 path: src/symfony/src/Security/Authentication/WebauthnAuthenticator.php - - message: '#^Parameter \#5 \$isUserVerified of class Webauthn\\Bundle\\Security\\Authentication\\Token\\WebauthnToken constructor expects bool, mixed given\.$#' + rawMessage: 'Parameter #5 $isUserVerified of class Webauthn\Bundle\Security\Authentication\Token\WebauthnToken constructor expects bool, mixed given.' identifier: argument.type count: 1 path: src/symfony/src/Security/Authentication/WebauthnAuthenticator.php - - message: '#^Parameter \#6 \$reservedForFutureUse1 of class Webauthn\\Bundle\\Security\\Authentication\\Token\\WebauthnToken constructor expects int, mixed given\.$#' + rawMessage: 'Parameter #6 $reservedForFutureUse1 of class Webauthn\Bundle\Security\Authentication\Token\WebauthnToken constructor expects int, mixed given.' identifier: argument.type count: 1 path: src/symfony/src/Security/Authentication/WebauthnAuthenticator.php - - message: '#^Parameter \#7 \$reservedForFutureUse2 of class Webauthn\\Bundle\\Security\\Authentication\\Token\\WebauthnToken constructor expects int, mixed given\.$#' + rawMessage: 'Parameter #7 $reservedForFutureUse2 of class Webauthn\Bundle\Security\Authentication\Token\WebauthnToken constructor expects int, mixed given.' identifier: argument.type count: 1 path: src/symfony/src/Security/Authentication/WebauthnAuthenticator.php - - message: '#^Parameter \#8 \$signCount of class Webauthn\\Bundle\\Security\\Authentication\\Token\\WebauthnToken constructor expects int, mixed given\.$#' + rawMessage: 'Parameter #8 $signCount of class Webauthn\Bundle\Security\Authentication\Token\WebauthnToken constructor expects int, mixed given.' identifier: argument.type count: 1 path: src/symfony/src/Security/Authentication/WebauthnAuthenticator.php - - message: '#^Parameter \#9 \$extensions of class Webauthn\\Bundle\\Security\\Authentication\\Token\\WebauthnToken constructor expects Webauthn\\AuthenticationExtensions\\AuthenticationExtensions\|null, mixed given\.$#' + rawMessage: 'Parameter #9 $extensions of class Webauthn\Bundle\Security\Authentication\Token\WebauthnToken constructor expects Webauthn\AuthenticationExtensions\AuthenticationExtensions|null, mixed given.' identifier: argument.type count: 1 path: src/symfony/src/Security/Authentication/WebauthnAuthenticator.php - - message: '#^Class Webauthn\\Bundle\\Security\\Authentication\\WebauthnBadge has an uninitialized property \$authenticatorResponse\. Give it default value or assign it in the constructor\.$#' + rawMessage: Class Webauthn\Bundle\Security\Authentication\WebauthnBadge has an uninitialized property $authenticatorResponse. Give it default value or assign it in the constructor. identifier: property.uninitialized count: 1 path: src/symfony/src/Security/Authentication/WebauthnBadge.php - - message: '#^Class Webauthn\\Bundle\\Security\\Authentication\\WebauthnBadge has an uninitialized property \$publicKeyCredentialOptions\. Give it default value or assign it in the constructor\.$#' + rawMessage: Class Webauthn\Bundle\Security\Authentication\WebauthnBadge has an uninitialized property $publicKeyCredentialOptions. Give it default value or assign it in the constructor. identifier: property.uninitialized count: 1 path: src/symfony/src/Security/Authentication/WebauthnBadge.php - - message: '#^Class Webauthn\\Bundle\\Security\\Authentication\\WebauthnBadge has an uninitialized property \$publicKeyCredentialSource\. Give it default value or assign it in the constructor\.$#' + rawMessage: Class Webauthn\Bundle\Security\Authentication\WebauthnBadge has an uninitialized property $publicKeyCredentialSource. Give it default value or assign it in the constructor. identifier: property.uninitialized count: 1 path: src/symfony/src/Security/Authentication/WebauthnBadge.php - - message: '#^Class Webauthn\\Bundle\\Security\\Authentication\\WebauthnBadge has an uninitialized property \$publicKeyCredentialUserEntity\. Give it default value or assign it in the constructor\.$#' + rawMessage: Class Webauthn\Bundle\Security\Authentication\WebauthnBadge has an uninitialized property $publicKeyCredentialUserEntity. Give it default value or assign it in the constructor. identifier: property.uninitialized count: 1 path: src/symfony/src/Security/Authentication/WebauthnBadge.php - - message: '#^Class Webauthn\\Bundle\\Security\\Authentication\\WebauthnBadge has an uninitialized property \$user\. Give it default value or assign it in the constructor\.$#' + rawMessage: Class Webauthn\Bundle\Security\Authentication\WebauthnBadge has an uninitialized property $user. Give it default value or assign it in the constructor. identifier: property.uninitialized count: 1 path: src/symfony/src/Security/Authentication/WebauthnBadge.php - - message: '#^Method Webauthn\\Bundle\\Security\\Authentication\\WebauthnBadge\:\:__construct\(\) has parameter \$attributes with no value type specified in iterable type array\.$#' + rawMessage: 'Method Webauthn\Bundle\Security\Authentication\WebauthnBadge::__construct() has parameter $attributes with no value type specified in iterable type array.' identifier: missingType.iterableValue count: 1 path: src/symfony/src/Security/Authentication/WebauthnBadge.php - - message: '#^Property Webauthn\\Bundle\\Security\\Authentication\\WebauthnBadge\:\:\$user \(Symfony\\Component\\Security\\Core\\User\\UserInterface\) does not accept mixed\.$#' + rawMessage: 'Property Webauthn\Bundle\Security\Authentication\WebauthnBadge::$user (Symfony\Component\Security\Core\User\UserInterface) does not accept mixed.' identifier: assign.propertyType count: 1 path: src/symfony/src/Security/Authentication/WebauthnBadge.php - - message: '#^Method Webauthn\\Bundle\\Security\\Authentication\\WebauthnBadgeListener\:\:__construct\(\) has parameter \$userProvider with generic interface Symfony\\Component\\Security\\Core\\User\\UserProviderInterface but does not specify its types\: TUser$#' + rawMessage: 'Method Webauthn\Bundle\Security\Authentication\WebauthnBadgeListener::__construct() has parameter $userProvider with generic interface Symfony\Component\Security\Core\User\UserProviderInterface but does not specify its types: TUser' identifier: missingType.generics count: 1 path: src/symfony/src/Security/Authentication/WebauthnBadgeListener.php - - message: '#^Webauthn\\Bundle\\Security\\Authentication\\WebauthnPassport\:\:__construct\(\) does not call parent constructor from Symfony\\Component\\Security\\Http\\Authenticator\\Passport\\Passport\.$#' + rawMessage: 'Webauthn\Bundle\Security\Authentication\WebauthnPassport::__construct() does not call parent constructor from Symfony\Component\Security\Http\Authenticator\Passport\Passport.' identifier: constructor.missingParentCall count: 1 path: src/symfony/src/Security/Authentication/WebauthnPassport.php - - message: '#^Method Webauthn\\Bundle\\Security\\Http\\Authenticator\\WebauthnAuthenticator\:\:__construct\(\) has parameter \$userProvider with generic interface Symfony\\Component\\Security\\Core\\User\\UserProviderInterface but does not specify its types\: TUser$#' + rawMessage: 'Method Webauthn\Bundle\Security\Http\Authenticator\WebauthnAuthenticator::__construct() has parameter $userProvider with generic interface Symfony\Component\Security\Core\User\UserProviderInterface but does not specify its types: TUser' identifier: missingType.generics count: 1 path: src/symfony/src/Security/Http/Authenticator/WebauthnAuthenticator.php - - message: '#^Method Webauthn\\Bundle\\Security\\Http\\Authenticator\\WebauthnAuthenticator\:\:onAuthenticationFailure\(\) never returns null so it can be removed from the return type\.$#' - identifier: return.unusedType - count: 1 - path: src/symfony/src/Security/Http/Authenticator/WebauthnAuthenticator.php - - - - message: '#^Method Webauthn\\Bundle\\Security\\Http\\Authenticator\\WebauthnAuthenticator\:\:supports\(\) never returns null so it can be removed from the return type\.$#' - identifier: return.unusedType - count: 1 - path: src/symfony/src/Security/Http/Authenticator/WebauthnAuthenticator.php - - - - message: '#^Cannot access offset ''enabled'' on mixed\.$#' + rawMessage: Cannot access offset 'enabled' on mixed. identifier: offsetAccess.nonOffsetAccessible count: 2 path: src/symfony/src/Security/WebauthnFirewallConfig.php - - message: '#^Cannot access offset ''host'' on mixed\.$#' + rawMessage: Cannot access offset 'host' on mixed. identifier: offsetAccess.nonOffsetAccessible count: 2 path: src/symfony/src/Security/WebauthnFirewallConfig.php - - message: '#^Cannot access offset ''options_handler'' on mixed\.$#' + rawMessage: Cannot access offset 'options_handler' on mixed. identifier: offsetAccess.nonOffsetAccessible count: 2 path: src/symfony/src/Security/WebauthnFirewallConfig.php - - message: '#^Cannot access offset ''options_method'' on mixed\.$#' + rawMessage: Cannot access offset 'options_method' on mixed. identifier: offsetAccess.nonOffsetAccessible count: 2 path: src/symfony/src/Security/WebauthnFirewallConfig.php - - message: '#^Cannot access offset ''options_path'' on mixed\.$#' + rawMessage: Cannot access offset 'options_path' on mixed. identifier: offsetAccess.nonOffsetAccessible count: 2 path: src/symfony/src/Security/WebauthnFirewallConfig.php - - message: '#^Cannot access offset ''profile'' on mixed\.$#' + rawMessage: Cannot access offset 'profile' on mixed. identifier: offsetAccess.nonOffsetAccessible count: 2 path: src/symfony/src/Security/WebauthnFirewallConfig.php - - message: '#^Cannot access offset ''result_method'' on mixed\.$#' + rawMessage: Cannot access offset 'result_method' on mixed. identifier: offsetAccess.nonOffsetAccessible count: 2 path: src/symfony/src/Security/WebauthnFirewallConfig.php - - message: '#^Cannot access offset ''result_path'' on mixed\.$#' + rawMessage: Cannot access offset 'result_path' on mixed. identifier: offsetAccess.nonOffsetAccessible count: 2 path: src/symfony/src/Security/WebauthnFirewallConfig.php - - message: '#^Cannot access offset ''routes'' on mixed\.$#' + rawMessage: Cannot access offset 'routes' on mixed. identifier: offsetAccess.nonOffsetAccessible count: 10 path: src/symfony/src/Security/WebauthnFirewallConfig.php - - message: '#^Method Webauthn\\Bundle\\Security\\WebauthnFirewallConfig\:\:getAuthenticationHost\(\) should return string\|null but returns mixed\.$#' + rawMessage: 'Method Webauthn\Bundle\Security\WebauthnFirewallConfig::getAuthenticationHost() should return string|null but returns mixed.' identifier: return.type count: 1 path: src/symfony/src/Security/WebauthnFirewallConfig.php - - message: '#^Method Webauthn\\Bundle\\Security\\WebauthnFirewallConfig\:\:getAuthenticationOptionsHandler\(\) should return string but returns mixed\.$#' + rawMessage: 'Method Webauthn\Bundle\Security\WebauthnFirewallConfig::getAuthenticationOptionsHandler() should return string but returns mixed.' identifier: return.type count: 1 path: src/symfony/src/Security/WebauthnFirewallConfig.php - - message: '#^Method Webauthn\\Bundle\\Security\\WebauthnFirewallConfig\:\:getAuthenticationOptionsMethod\(\) should return string but returns mixed\.$#' + rawMessage: 'Method Webauthn\Bundle\Security\WebauthnFirewallConfig::getAuthenticationOptionsMethod() should return string but returns mixed.' identifier: return.type count: 1 path: src/symfony/src/Security/WebauthnFirewallConfig.php - - message: '#^Method Webauthn\\Bundle\\Security\\WebauthnFirewallConfig\:\:getAuthenticationOptionsPath\(\) should return string but returns mixed\.$#' + rawMessage: 'Method Webauthn\Bundle\Security\WebauthnFirewallConfig::getAuthenticationOptionsPath() should return string but returns mixed.' identifier: return.type count: 1 path: src/symfony/src/Security/WebauthnFirewallConfig.php - - message: '#^Method Webauthn\\Bundle\\Security\\WebauthnFirewallConfig\:\:getAuthenticationProfile\(\) should return string but returns mixed\.$#' + rawMessage: 'Method Webauthn\Bundle\Security\WebauthnFirewallConfig::getAuthenticationProfile() should return string but returns mixed.' identifier: return.type count: 1 path: src/symfony/src/Security/WebauthnFirewallConfig.php - - message: '#^Method Webauthn\\Bundle\\Security\\WebauthnFirewallConfig\:\:getAuthenticationResultMethod\(\) should return string but returns mixed\.$#' + rawMessage: 'Method Webauthn\Bundle\Security\WebauthnFirewallConfig::getAuthenticationResultMethod() should return string but returns mixed.' identifier: return.type count: 1 path: src/symfony/src/Security/WebauthnFirewallConfig.php - - message: '#^Method Webauthn\\Bundle\\Security\\WebauthnFirewallConfig\:\:getAuthenticationResultPath\(\) should return string but returns mixed\.$#' + rawMessage: 'Method Webauthn\Bundle\Security\WebauthnFirewallConfig::getAuthenticationResultPath() should return string but returns mixed.' identifier: return.type count: 1 path: src/symfony/src/Security/WebauthnFirewallConfig.php - - message: '#^Method Webauthn\\Bundle\\Security\\WebauthnFirewallConfig\:\:getFailureHandler\(\) should return string but returns mixed\.$#' + rawMessage: 'Method Webauthn\Bundle\Security\WebauthnFirewallConfig::getFailureHandler() should return string but returns mixed.' identifier: return.type count: 1 path: src/symfony/src/Security/WebauthnFirewallConfig.php - - message: '#^Method Webauthn\\Bundle\\Security\\WebauthnFirewallConfig\:\:getOptionsStorage\(\) should return string\|null but returns mixed\.$#' + rawMessage: 'Method Webauthn\Bundle\Security\WebauthnFirewallConfig::getOptionsStorage() should return string|null but returns mixed.' identifier: return.type count: 1 path: src/symfony/src/Security/WebauthnFirewallConfig.php - - message: '#^Method Webauthn\\Bundle\\Security\\WebauthnFirewallConfig\:\:getRegistrationHost\(\) should return string\|null but returns mixed\.$#' + rawMessage: 'Method Webauthn\Bundle\Security\WebauthnFirewallConfig::getRegistrationHost() should return string|null but returns mixed.' identifier: return.type count: 1 path: src/symfony/src/Security/WebauthnFirewallConfig.php - - message: '#^Method Webauthn\\Bundle\\Security\\WebauthnFirewallConfig\:\:getRegistrationOptionsHandler\(\) should return string but returns mixed\.$#' + rawMessage: 'Method Webauthn\Bundle\Security\WebauthnFirewallConfig::getRegistrationOptionsHandler() should return string but returns mixed.' identifier: return.type count: 1 path: src/symfony/src/Security/WebauthnFirewallConfig.php - - message: '#^Method Webauthn\\Bundle\\Security\\WebauthnFirewallConfig\:\:getRegistrationOptionsMethod\(\) should return string but returns mixed\.$#' + rawMessage: 'Method Webauthn\Bundle\Security\WebauthnFirewallConfig::getRegistrationOptionsMethod() should return string but returns mixed.' identifier: return.type count: 1 path: src/symfony/src/Security/WebauthnFirewallConfig.php - - message: '#^Method Webauthn\\Bundle\\Security\\WebauthnFirewallConfig\:\:getRegistrationOptionsPath\(\) should return string but returns mixed\.$#' + rawMessage: 'Method Webauthn\Bundle\Security\WebauthnFirewallConfig::getRegistrationOptionsPath() should return string but returns mixed.' identifier: return.type count: 1 path: src/symfony/src/Security/WebauthnFirewallConfig.php - - message: '#^Method Webauthn\\Bundle\\Security\\WebauthnFirewallConfig\:\:getRegistrationProfile\(\) should return string but returns mixed\.$#' + rawMessage: 'Method Webauthn\Bundle\Security\WebauthnFirewallConfig::getRegistrationProfile() should return string but returns mixed.' identifier: return.type count: 1 path: src/symfony/src/Security/WebauthnFirewallConfig.php - - message: '#^Method Webauthn\\Bundle\\Security\\WebauthnFirewallConfig\:\:getRegistrationResultMethod\(\) should return string but returns mixed\.$#' + rawMessage: 'Method Webauthn\Bundle\Security\WebauthnFirewallConfig::getRegistrationResultMethod() should return string but returns mixed.' identifier: return.type count: 1 path: src/symfony/src/Security/WebauthnFirewallConfig.php - - message: '#^Method Webauthn\\Bundle\\Security\\WebauthnFirewallConfig\:\:getRegistrationResultPath\(\) should return string but returns mixed\.$#' + rawMessage: 'Method Webauthn\Bundle\Security\WebauthnFirewallConfig::getRegistrationResultPath() should return string but returns mixed.' identifier: return.type count: 1 path: src/symfony/src/Security/WebauthnFirewallConfig.php - - message: '#^Method Webauthn\\Bundle\\Security\\WebauthnFirewallConfig\:\:getSecuredRpIds\(\) should return array\ but returns mixed\.$#' + rawMessage: 'Method Webauthn\Bundle\Security\WebauthnFirewallConfig::getSecuredRpIds() should return array but returns mixed.' identifier: return.type count: 1 path: src/symfony/src/Security/WebauthnFirewallConfig.php - - message: '#^Method Webauthn\\Bundle\\Security\\WebauthnFirewallConfig\:\:getSuccessHandler\(\) should return string but returns mixed\.$#' + rawMessage: 'Method Webauthn\Bundle\Security\WebauthnFirewallConfig::getSuccessHandler() should return string but returns mixed.' identifier: return.type count: 1 path: src/symfony/src/Security/WebauthnFirewallConfig.php - - message: '#^Method Webauthn\\Bundle\\Security\\WebauthnFirewallConfig\:\:getUserProvider\(\) should return string\|null but returns mixed\.$#' + rawMessage: 'Method Webauthn\Bundle\Security\WebauthnFirewallConfig::getUserProvider() should return string|null but returns mixed.' identifier: return.type count: 1 path: src/symfony/src/Security/WebauthnFirewallConfig.php - - message: '#^Method Webauthn\\Bundle\\Security\\WebauthnFirewallConfig\:\:isAuthenticationEnabled\(\) should return bool but returns mixed\.$#' + rawMessage: 'Method Webauthn\Bundle\Security\WebauthnFirewallConfig::isAuthenticationEnabled() should return bool but returns mixed.' identifier: return.type count: 1 path: src/symfony/src/Security/WebauthnFirewallConfig.php - - message: '#^Method Webauthn\\Bundle\\Security\\WebauthnFirewallConfig\:\:isRegistrationEnabled\(\) should return bool but returns mixed\.$#' + rawMessage: 'Method Webauthn\Bundle\Security\WebauthnFirewallConfig::isRegistrationEnabled() should return bool but returns mixed.' identifier: return.type count: 1 path: src/symfony/src/Security/WebauthnFirewallConfig.php - - message: '#^Cannot access offset ''attestation_conveyance'' on mixed\.$#' + rawMessage: Cannot access offset 'attestation_conveyance' on mixed. identifier: offsetAccess.nonOffsetAccessible count: 1 path: src/symfony/src/Service/PublicKeyCredentialCreationOptionsFactory.php - - message: '#^Cannot access offset ''authenticator_attachment'' on mixed\.$#' + rawMessage: Cannot access offset 'authenticator_attachment' on mixed. identifier: offsetAccess.nonOffsetAccessible count: 1 path: src/symfony/src/Service/PublicKeyCredentialCreationOptionsFactory.php - - message: '#^Cannot access offset ''challenge_length'' on mixed\.$#' + rawMessage: Cannot access offset 'challenge_length' on mixed. identifier: offsetAccess.nonOffsetAccessible count: 1 path: src/symfony/src/Service/PublicKeyCredentialCreationOptionsFactory.php - - message: '#^Cannot access offset ''id'' on mixed\.$#' + rawMessage: Cannot access offset 'id' on mixed. identifier: offsetAccess.nonOffsetAccessible count: 1 path: src/symfony/src/Service/PublicKeyCredentialCreationOptionsFactory.php - - message: '#^Cannot access offset ''name'' on mixed\.$#' + rawMessage: Cannot access offset 'name' on mixed. identifier: offsetAccess.nonOffsetAccessible count: 1 path: src/symfony/src/Service/PublicKeyCredentialCreationOptionsFactory.php - - message: '#^Cannot access offset ''resident_key'' on mixed\.$#' + rawMessage: Cannot access offset 'resident_key' on mixed. identifier: offsetAccess.nonOffsetAccessible count: 1 path: src/symfony/src/Service/PublicKeyCredentialCreationOptionsFactory.php - - message: '#^Cannot access offset ''timeout'' on mixed\.$#' + rawMessage: Cannot access offset 'timeout' on mixed. identifier: offsetAccess.nonOffsetAccessible count: 1 path: src/symfony/src/Service/PublicKeyCredentialCreationOptionsFactory.php - - message: '#^Cannot access offset ''user_verification'' on mixed\.$#' + rawMessage: Cannot access offset 'user_verification' on mixed. identifier: offsetAccess.nonOffsetAccessible count: 1 path: src/symfony/src/Service/PublicKeyCredentialCreationOptionsFactory.php - - message: '#^Parameter \#1 \$array of function array_keys expects array, mixed given\.$#' + rawMessage: 'Parameter #1 $array of function array_keys expects array, mixed given.' identifier: argument.type count: 1 path: src/symfony/src/Service/PublicKeyCredentialCreationOptionsFactory.php - - message: '#^Parameter \#1 \$authenticatorAttachment of static method Webauthn\\AuthenticatorSelectionCriteria\:\:create\(\) expects string\|null, mixed given\.$#' + rawMessage: 'Parameter #1 $authenticatorAttachment of static method Webauthn\AuthenticatorSelectionCriteria::create() expects string|null, mixed given.' identifier: argument.type count: 1 path: src/symfony/src/Service/PublicKeyCredentialCreationOptionsFactory.php - - message: '#^Parameter \#1 \$callback of function array_map expects \(callable\(int\|string, mixed\)\: mixed\)\|null, Closure\(string, mixed\)\: Webauthn\\AuthenticationExtensions\\AuthenticationExtension given\.$#' + rawMessage: 'Parameter #1 $callback of function array_map expects (callable(int|string, mixed): mixed)|null, Closure(string, mixed): Webauthn\AuthenticationExtensions\AuthenticationExtension given.' identifier: argument.type count: 1 path: src/symfony/src/Service/PublicKeyCredentialCreationOptionsFactory.php - - message: '#^Parameter \#1 \$length of function random_bytes expects int\<1, max\>, mixed given\.$#' + rawMessage: 'Parameter #1 $length of function random_bytes expects int<1, max>, mixed given.' identifier: argument.type count: 1 path: src/symfony/src/Service/PublicKeyCredentialCreationOptionsFactory.php - - message: '#^Parameter \#1 \$name of static method Webauthn\\PublicKeyCredentialRpEntity\:\:create\(\) expects string, mixed given\.$#' + rawMessage: 'Parameter #1 $name of static method Webauthn\PublicKeyCredentialRpEntity::create() expects string, mixed given.' identifier: argument.type count: 1 path: src/symfony/src/Service/PublicKeyCredentialCreationOptionsFactory.php - - message: '#^Parameter \#1 \$profile of method Webauthn\\Bundle\\Service\\PublicKeyCredentialCreationOptionsFactory\:\:createAuthenticatorSelectionCriteria\(\) expects array\, mixed given\.$#' + rawMessage: 'Parameter #1 $profile of method Webauthn\Bundle\Service\PublicKeyCredentialCreationOptionsFactory::createAuthenticatorSelectionCriteria() expects array, mixed given.' identifier: argument.type count: 1 path: src/symfony/src/Service/PublicKeyCredentialCreationOptionsFactory.php - - message: '#^Parameter \#1 \$profile of method Webauthn\\Bundle\\Service\\PublicKeyCredentialCreationOptionsFactory\:\:createCredentialParameters\(\) expects array\, mixed given\.$#' + rawMessage: 'Parameter #1 $profile of method Webauthn\Bundle\Service\PublicKeyCredentialCreationOptionsFactory::createCredentialParameters() expects array, mixed given.' identifier: argument.type count: 1 path: src/symfony/src/Service/PublicKeyCredentialCreationOptionsFactory.php - - message: '#^Parameter \#1 \$profile of method Webauthn\\Bundle\\Service\\PublicKeyCredentialCreationOptionsFactory\:\:createExtensions\(\) expects array\, mixed given\.$#' + rawMessage: 'Parameter #1 $profile of method Webauthn\Bundle\Service\PublicKeyCredentialCreationOptionsFactory::createExtensions() expects array, mixed given.' identifier: argument.type count: 1 path: src/symfony/src/Service/PublicKeyCredentialCreationOptionsFactory.php - - message: '#^Parameter \#1 \$profile of method Webauthn\\Bundle\\Service\\PublicKeyCredentialCreationOptionsFactory\:\:createRpEntity\(\) expects array\, mixed given\.$#' + rawMessage: 'Parameter #1 $profile of method Webauthn\Bundle\Service\PublicKeyCredentialCreationOptionsFactory::createRpEntity() expects array, mixed given.' identifier: argument.type count: 1 path: src/symfony/src/Service/PublicKeyCredentialCreationOptionsFactory.php - - message: '#^Parameter \#2 \$alg of static method Webauthn\\PublicKeyCredentialParameters\:\:create\(\) expects int, mixed given\.$#' + rawMessage: 'Parameter #2 $alg of static method Webauthn\PublicKeyCredentialParameters::create() expects int, mixed given.' identifier: argument.type count: 1 path: src/symfony/src/Service/PublicKeyCredentialCreationOptionsFactory.php - - message: '#^Parameter \#2 \$array of function array_map expects array, mixed given\.$#' + rawMessage: 'Parameter #2 $array of function array_map expects array, mixed given.' identifier: argument.type count: 1 path: src/symfony/src/Service/PublicKeyCredentialCreationOptionsFactory.php - - message: '#^Parameter \#2 \$id of static method Webauthn\\PublicKeyCredentialRpEntity\:\:create\(\) expects string\|null, mixed given\.$#' + rawMessage: 'Parameter #2 $id of static method Webauthn\PublicKeyCredentialRpEntity::create() expects string|null, mixed given.' identifier: argument.type count: 1 path: src/symfony/src/Service/PublicKeyCredentialCreationOptionsFactory.php - - message: '#^Parameter \#2 \$userVerification of static method Webauthn\\AuthenticatorSelectionCriteria\:\:create\(\) expects string, mixed given\.$#' + rawMessage: 'Parameter #2 $userVerification of static method Webauthn\AuthenticatorSelectionCriteria::create() expects string, mixed given.' identifier: argument.type count: 1 path: src/symfony/src/Service/PublicKeyCredentialCreationOptionsFactory.php - - message: '#^Parameter \#3 \$residentKey of static method Webauthn\\AuthenticatorSelectionCriteria\:\:create\(\) expects string\|null, mixed given\.$#' + rawMessage: 'Parameter #3 $residentKey of static method Webauthn\AuthenticatorSelectionCriteria::create() expects string|null, mixed given.' identifier: argument.type count: 1 path: src/symfony/src/Service/PublicKeyCredentialCreationOptionsFactory.php - - message: '#^Parameter \#3 \.\.\.\$arrays of function array_map expects array, mixed given\.$#' + rawMessage: 'Parameter #3 ...$arrays of function array_map expects array, mixed given.' identifier: argument.type count: 1 path: src/symfony/src/Service/PublicKeyCredentialCreationOptionsFactory.php - - message: '#^Cannot access offset ''challenge_length'' on mixed\.$#' + rawMessage: Cannot access offset 'challenge_length' on mixed. identifier: offsetAccess.nonOffsetAccessible count: 1 path: src/symfony/src/Service/PublicKeyCredentialRequestOptionsFactory.php - - message: '#^Cannot access offset ''rp_id'' on mixed\.$#' + rawMessage: Cannot access offset 'rp_id' on mixed. identifier: offsetAccess.nonOffsetAccessible count: 1 path: src/symfony/src/Service/PublicKeyCredentialRequestOptionsFactory.php - - message: '#^Cannot access offset ''timeout'' on mixed\.$#' + rawMessage: Cannot access offset 'timeout' on mixed. identifier: offsetAccess.nonOffsetAccessible count: 1 path: src/symfony/src/Service/PublicKeyCredentialRequestOptionsFactory.php - - message: '#^Cannot access offset ''user_verification'' on mixed\.$#' + rawMessage: Cannot access offset 'user_verification' on mixed. identifier: offsetAccess.nonOffsetAccessible count: 1 path: src/symfony/src/Service/PublicKeyCredentialRequestOptionsFactory.php - - message: '#^Parameter \#1 \$array of function array_keys expects array, mixed given\.$#' + rawMessage: 'Parameter #1 $array of function array_keys expects array, mixed given.' identifier: argument.type count: 1 path: src/symfony/src/Service/PublicKeyCredentialRequestOptionsFactory.php - - message: '#^Parameter \#1 \$callback of function array_map expects \(callable\(int\|string, mixed\)\: mixed\)\|null, Closure\(string, mixed\)\: Webauthn\\AuthenticationExtensions\\AuthenticationExtension given\.$#' + rawMessage: 'Parameter #1 $callback of function array_map expects (callable(int|string, mixed): mixed)|null, Closure(string, mixed): Webauthn\AuthenticationExtensions\AuthenticationExtension given.' identifier: argument.type count: 1 path: src/symfony/src/Service/PublicKeyCredentialRequestOptionsFactory.php - - message: '#^Parameter \#1 \$length of function random_bytes expects int\<1, max\>, mixed given\.$#' + rawMessage: 'Parameter #1 $length of function random_bytes expects int<1, max>, mixed given.' identifier: argument.type count: 1 path: src/symfony/src/Service/PublicKeyCredentialRequestOptionsFactory.php - - message: '#^Parameter \#1 \$profile of method Webauthn\\Bundle\\Service\\PublicKeyCredentialRequestOptionsFactory\:\:createExtensions\(\) expects array\, mixed given\.$#' + rawMessage: 'Parameter #1 $profile of method Webauthn\Bundle\Service\PublicKeyCredentialRequestOptionsFactory::createExtensions() expects array, mixed given.' identifier: argument.type count: 1 path: src/symfony/src/Service/PublicKeyCredentialRequestOptionsFactory.php - - message: '#^Parameter \#3 \.\.\.\$arrays of function array_map expects array, mixed given\.$#' + rawMessage: 'Parameter #3 ...$arrays of function array_map expects array, mixed given.' identifier: argument.type count: 1 path: src/symfony/src/Service/PublicKeyCredentialRequestOptionsFactory.php - - message: '#^Method Webauthn\\Bundle\\WebauthnBundle\:\:getContainerExtension\(\) never returns null so it can be removed from the return type\.$#' - identifier: return.unusedType - count: 1 - path: src/symfony/src/WebauthnBundle.php - - - - message: '#^Cannot access offset ''x5c'' on mixed\.$#' + rawMessage: Cannot access offset 'x5c' on mixed. identifier: offsetAccess.nonOffsetAccessible count: 1 path: src/webauthn/src/AttestationStatement/AndroidKeyAttestationStatementSupport.php - - message: '#^Cannot cast mixed to int\.$#' + rawMessage: Cannot cast mixed to int. identifier: cast.int count: 1 path: src/webauthn/src/AttestationStatement/AndroidKeyAttestationStatementSupport.php - - message: '#^Parameter \#1 \$data of static method Cose\\Key\\Key\:\:createFromData\(\) expects array\, mixed given\.$#' + rawMessage: 'Parameter #1 $data of static method Cose\Key\Key::createFromData() expects array, mixed given.' identifier: argument.type count: 1 path: src/webauthn/src/AttestationStatement/AndroidKeyAttestationStatementSupport.php - - message: '#^Parameter \#1 \$data of static method SpomkyLabs\\Pki\\ASN1\\Element\:\:fromDER\(\) expects string, mixed given\.$#' + rawMessage: 'Parameter #1 $data of static method SpomkyLabs\Pki\ASN1\Element::fromDER() expects string, mixed given.' identifier: argument.type count: 1 path: src/webauthn/src/AttestationStatement/AndroidKeyAttestationStatementSupport.php - - message: '#^Parameter \#1 \$data of static method Webauthn\\MetadataService\\CertificateChain\\CertificateToolbox\:\:convertAllDERToPEM\(\) expects array\, mixed given\.$#' + rawMessage: 'Parameter #1 $data of static method Webauthn\MetadataService\CertificateChain\CertificateToolbox::convertAllDERToPEM() expects array, mixed given.' identifier: argument.type count: 1 path: src/webauthn/src/AttestationStatement/AndroidKeyAttestationStatementSupport.php - - message: '#^Parameter \#1 \$fmt of static method Webauthn\\AttestationStatement\\AttestationStatement\:\:createBasic\(\) expects string, mixed given\.$#' + rawMessage: 'Parameter #1 $fmt of static method Webauthn\AttestationStatement\AttestationStatement::createBasic() expects string, mixed given.' identifier: argument.type count: 1 path: src/webauthn/src/AttestationStatement/AndroidKeyAttestationStatementSupport.php - - message: '#^Parameter \#1 \$key of function openssl_pkey_get_details expects OpenSSLAsymmetricKey, OpenSSLAsymmetricKey\|false given\.$#' + rawMessage: 'Parameter #1 $key of function openssl_pkey_get_details expects OpenSSLAsymmetricKey, OpenSSLAsymmetricKey|false given.' identifier: argument.type count: 1 path: src/webauthn/src/AttestationStatement/AndroidKeyAttestationStatementSupport.php - - message: '#^Parameter \#2 \$array of function array_key_exists expects array, mixed given\.$#' + rawMessage: 'Parameter #2 $array of function array_key_exists expects array, mixed given.' identifier: argument.type count: 1 path: src/webauthn/src/AttestationStatement/AndroidKeyAttestationStatementSupport.php - - message: '#^Parameter \#2 \$attStmt of static method Webauthn\\AttestationStatement\\AttestationStatement\:\:createBasic\(\) expects array\, mixed given\.$#' + rawMessage: 'Parameter #2 $attStmt of static method Webauthn\AttestationStatement\AttestationStatement::createBasic() expects array, mixed given.' identifier: argument.type count: 1 path: src/webauthn/src/AttestationStatement/AndroidKeyAttestationStatementSupport.php - - message: '#^Parameter \#2 \$signature of function openssl_verify expects string, mixed given\.$#' + rawMessage: 'Parameter #2 $signature of function openssl_verify expects string, mixed given.' identifier: argument.type count: 1 path: src/webauthn/src/AttestationStatement/AndroidKeyAttestationStatementSupport.php - - message: '#^Cannot cast mixed to string\.$#' + rawMessage: Cannot cast mixed to string. identifier: cast.string count: 1 path: src/webauthn/src/AttestationStatement/AppleAttestationStatementSupport.php - - message: '#^Parameter \#1 \$data of static method Cose\\Key\\Key\:\:createFromData\(\) expects array\, mixed given\.$#' + rawMessage: 'Parameter #1 $data of static method Cose\Key\Key::createFromData() expects array, mixed given.' identifier: argument.type count: 1 path: src/webauthn/src/AttestationStatement/AppleAttestationStatementSupport.php - - message: '#^Parameter \#1 \$data of static method Webauthn\\MetadataService\\CertificateChain\\CertificateToolbox\:\:convertAllDERToPEM\(\) expects array\, mixed given\.$#' + rawMessage: 'Parameter #1 $data of static method Webauthn\MetadataService\CertificateChain\CertificateToolbox::convertAllDERToPEM() expects array, mixed given.' identifier: argument.type count: 1 path: src/webauthn/src/AttestationStatement/AppleAttestationStatementSupport.php - - message: '#^Parameter \#1 \$fmt of static method Webauthn\\AttestationStatement\\AttestationStatement\:\:createAnonymizationCA\(\) expects string, mixed given\.$#' + rawMessage: 'Parameter #1 $fmt of static method Webauthn\AttestationStatement\AttestationStatement::createAnonymizationCA() expects string, mixed given.' identifier: argument.type count: 1 path: src/webauthn/src/AttestationStatement/AppleAttestationStatementSupport.php - - message: '#^Parameter \#1 \$key of function openssl_pkey_get_details expects OpenSSLAsymmetricKey, OpenSSLAsymmetricKey\|false given\.$#' + rawMessage: 'Parameter #1 $key of function openssl_pkey_get_details expects OpenSSLAsymmetricKey, OpenSSLAsymmetricKey|false given.' identifier: argument.type count: 1 path: src/webauthn/src/AttestationStatement/AppleAttestationStatementSupport.php - - message: '#^Parameter \#2 \$array of function array_key_exists expects array, mixed given\.$#' + rawMessage: 'Parameter #2 $array of function array_key_exists expects array, mixed given.' identifier: argument.type count: 1 path: src/webauthn/src/AttestationStatement/AppleAttestationStatementSupport.php - - message: '#^Parameter \#2 \$attStmt of static method Webauthn\\AttestationStatement\\AttestationStatement\:\:createAnonymizationCA\(\) expects array\, array given\.$#' + rawMessage: 'Parameter #2 $attStmt of static method Webauthn\AttestationStatement\AttestationStatement::createAnonymizationCA() expects array, array given.' identifier: argument.type count: 1 path: src/webauthn/src/AttestationStatement/AppleAttestationStatementSupport.php - - message: '#^Parameter \#1 \$attestation of method Webauthn\\AttestationStatement\\AttestationStatementSupport\:\:load\(\) expects array\, array given\.$#' + rawMessage: 'Parameter #1 $attestation of method Webauthn\AttestationStatement\AttestationStatementSupport::load() expects array, array given.' identifier: argument.type count: 1 path: src/webauthn/src/AttestationStatement/AttestationObjectLoader.php - - message: '#^Parameter \#1 \$authData of method Webauthn\\AuthenticatorDataLoader\:\:load\(\) expects string, mixed given\.$#' + rawMessage: 'Parameter #1 $authData of method Webauthn\AuthenticatorDataLoader::load() expects string, mixed given.' identifier: argument.type count: 1 path: src/webauthn/src/AttestationStatement/AttestationObjectLoader.php - - message: '#^Parameter \#1 \$name of method Webauthn\\AttestationStatement\\AttestationStatementSupportManager\:\:get\(\) expects string, mixed given\.$#' + rawMessage: 'Parameter #1 $name of method Webauthn\AttestationStatement\AttestationStatementSupportManager::get() expects string, mixed given.' identifier: argument.type count: 1 path: src/webauthn/src/AttestationStatement/AttestationObjectLoader.php - - message: '#^Method Webauthn\\AttestationStatement\\AttestationStatement\:\:create\(\) has parameter \$attStmt with no value type specified in iterable type array\.$#' + rawMessage: 'Method Webauthn\AttestationStatement\AttestationStatement::create() has parameter $attStmt with no value type specified in iterable type array.' identifier: missingType.iterableValue count: 1 path: src/webauthn/src/AttestationStatement/AttestationStatement.php - - message: '#^Parameter \#2 \$attStmt of class Webauthn\\AttestationStatement\\AttestationStatement constructor expects array\, array given\.$#' + rawMessage: 'Parameter #2 $attStmt of class Webauthn\AttestationStatement\AttestationStatement constructor expects array, array given.' identifier: argument.type count: 1 path: src/webauthn/src/AttestationStatement/AttestationStatement.php - - message: '#^Cannot access offset ''x5c'' on mixed\.$#' + rawMessage: Cannot access offset 'x5c' on mixed. identifier: offsetAccess.nonOffsetAccessible count: 1 path: src/webauthn/src/AttestationStatement/FidoU2FAttestationStatementSupport.php - - message: '#^Parameter \#1 \$data of static method Webauthn\\MetadataService\\CertificateChain\\CertificateToolbox\:\:convertAllDERToPEM\(\) expects array\, array\ given\.$#' + rawMessage: 'Parameter #1 $data of static method Webauthn\MetadataService\CertificateChain\CertificateToolbox::convertAllDERToPEM() expects array, array given.' identifier: argument.type count: 1 path: src/webauthn/src/AttestationStatement/FidoU2FAttestationStatementSupport.php - - message: '#^Parameter \#1 \$fmt of static method Webauthn\\AttestationStatement\\AttestationStatement\:\:createBasic\(\) expects string, mixed given\.$#' + rawMessage: 'Parameter #1 $fmt of static method Webauthn\AttestationStatement\AttestationStatement::createBasic() expects string, mixed given.' identifier: argument.type count: 1 path: src/webauthn/src/AttestationStatement/FidoU2FAttestationStatementSupport.php - - message: '#^Parameter \#1 \$key of function openssl_pkey_get_details expects OpenSSLAsymmetricKey, OpenSSLAsymmetricKey\|false given\.$#' + rawMessage: 'Parameter #1 $key of function openssl_pkey_get_details expects OpenSSLAsymmetricKey, OpenSSLAsymmetricKey|false given.' identifier: argument.type count: 1 path: src/webauthn/src/AttestationStatement/FidoU2FAttestationStatementSupport.php - - message: '#^Parameter \#2 \$array of function array_key_exists expects array, mixed given\.$#' + rawMessage: 'Parameter #2 $array of function array_key_exists expects array, mixed given.' identifier: argument.type count: 2 path: src/webauthn/src/AttestationStatement/FidoU2FAttestationStatementSupport.php - - message: '#^Parameter \#2 \$attStmt of static method Webauthn\\AttestationStatement\\AttestationStatement\:\:createBasic\(\) expects array\, mixed given\.$#' + rawMessage: 'Parameter #2 $attStmt of static method Webauthn\AttestationStatement\AttestationStatement::createBasic() expects array, mixed given.' identifier: argument.type count: 1 path: src/webauthn/src/AttestationStatement/FidoU2FAttestationStatementSupport.php - - message: '#^Parameter \#2 \$signature of function openssl_verify expects string, mixed given\.$#' + rawMessage: 'Parameter #2 $signature of function openssl_verify expects string, mixed given.' identifier: argument.type count: 1 path: src/webauthn/src/AttestationStatement/FidoU2FAttestationStatementSupport.php - - message: '#^Cannot access offset ''x5c'' on mixed\.$#' + rawMessage: Cannot access offset 'x5c' on mixed. identifier: offsetAccess.nonOffsetAccessible count: 1 path: src/webauthn/src/AttestationStatement/PackedAttestationStatementSupport.php - - message: '#^Cannot cast mixed to int\.$#' + rawMessage: Cannot cast mixed to int. identifier: cast.int count: 3 path: src/webauthn/src/AttestationStatement/PackedAttestationStatementSupport.php - - message: '#^Cannot cast mixed to string\.$#' + rawMessage: Cannot cast mixed to string. identifier: cast.string count: 1 path: src/webauthn/src/AttestationStatement/PackedAttestationStatementSupport.php - - message: '#^Parameter \#1 \$data of static method Webauthn\\MetadataService\\CertificateChain\\CertificateToolbox\:\:convertAllDERToPEM\(\) expects array\, array\ given\.$#' + rawMessage: 'Parameter #1 $data of static method Webauthn\MetadataService\CertificateChain\CertificateToolbox::convertAllDERToPEM() expects array, array given.' identifier: argument.type count: 1 path: src/webauthn/src/AttestationStatement/PackedAttestationStatementSupport.php - - message: '#^Parameter \#1 \$fmt of static method Webauthn\\AttestationStatement\\AttestationStatement\:\:createBasic\(\) expects string, mixed given\.$#' + rawMessage: 'Parameter #1 $fmt of static method Webauthn\AttestationStatement\AttestationStatement::createBasic() expects string, mixed given.' identifier: argument.type count: 1 path: src/webauthn/src/AttestationStatement/PackedAttestationStatementSupport.php - - message: '#^Parameter \#1 \$fmt of static method Webauthn\\AttestationStatement\\AttestationStatement\:\:createSelf\(\) expects string, mixed given\.$#' + rawMessage: 'Parameter #1 $fmt of static method Webauthn\AttestationStatement\AttestationStatement::createSelf() expects string, mixed given.' identifier: argument.type count: 1 path: src/webauthn/src/AttestationStatement/PackedAttestationStatementSupport.php - - message: '#^Parameter \#1 \$signature of static method Webauthn\\Util\\CoseSignatureFixer\:\:fix\(\) expects string, mixed given\.$#' + rawMessage: 'Parameter #1 $signature of static method Webauthn\Util\CoseSignatureFixer::fix() expects string, mixed given.' identifier: argument.type count: 1 path: src/webauthn/src/AttestationStatement/PackedAttestationStatementSupport.php - - message: '#^Parameter \#2 \$array of function array_key_exists expects array, mixed given\.$#' + rawMessage: 'Parameter #2 $array of function array_key_exists expects array, mixed given.' identifier: argument.type count: 1 path: src/webauthn/src/AttestationStatement/PackedAttestationStatementSupport.php - - message: '#^Parameter \#2 \$attStmt of static method Webauthn\\AttestationStatement\\AttestationStatement\:\:createBasic\(\) expects array\, mixed given\.$#' + rawMessage: 'Parameter #2 $attStmt of static method Webauthn\AttestationStatement\AttestationStatement::createBasic() expects array, mixed given.' identifier: argument.type count: 1 path: src/webauthn/src/AttestationStatement/PackedAttestationStatementSupport.php - - message: '#^Parameter \#2 \$attStmt of static method Webauthn\\AttestationStatement\\AttestationStatement\:\:createSelf\(\) expects array\, mixed given\.$#' + rawMessage: 'Parameter #2 $attStmt of static method Webauthn\AttestationStatement\AttestationStatement::createSelf() expects array, mixed given.' identifier: argument.type count: 1 path: src/webauthn/src/AttestationStatement/PackedAttestationStatementSupport.php - - message: '#^Parameter \#2 \$signature of function openssl_verify expects string, mixed given\.$#' + rawMessage: 'Parameter #2 $signature of function openssl_verify expects string, mixed given.' identifier: argument.type count: 1 path: src/webauthn/src/AttestationStatement/PackedAttestationStatementSupport.php - - message: '#^Parameter \#2 \$user_string of function hash_equals expects string, mixed given\.$#' + rawMessage: 'Parameter #2 $user_string of function hash_equals expects string, mixed given.' identifier: argument.type count: 1 path: src/webauthn/src/AttestationStatement/PackedAttestationStatementSupport.php - - message: '#^Cannot access offset ''certInfo'' on mixed\.$#' + rawMessage: Cannot access offset 'certInfo' on mixed. identifier: offsetAccess.nonOffsetAccessible count: 1 path: src/webauthn/src/AttestationStatement/TPMAttestationStatementSupport.php - - message: '#^Cannot access offset ''extraData'' on mixed\.$#' + rawMessage: Cannot access offset 'extraData' on mixed. identifier: offsetAccess.nonOffsetAccessible count: 1 path: src/webauthn/src/AttestationStatement/TPMAttestationStatementSupport.php - - message: '#^Cannot access offset ''parsedCertInfo'' on mixed\.$#' + rawMessage: Cannot access offset 'parsedCertInfo' on mixed. identifier: offsetAccess.nonOffsetAccessible count: 1 path: src/webauthn/src/AttestationStatement/TPMAttestationStatementSupport.php - - message: '#^Cannot access offset ''parsedPubArea'' on mixed\.$#' + rawMessage: Cannot access offset 'parsedPubArea' on mixed. identifier: offsetAccess.nonOffsetAccessible count: 1 path: src/webauthn/src/AttestationStatement/TPMAttestationStatementSupport.php - - message: '#^Cannot access offset ''pubArea'' on mixed\.$#' + rawMessage: Cannot access offset 'pubArea' on mixed. identifier: offsetAccess.nonOffsetAccessible count: 2 path: src/webauthn/src/AttestationStatement/TPMAttestationStatementSupport.php - - message: '#^Cannot access offset ''unique'' on mixed\.$#' + rawMessage: Cannot access offset 'unique' on mixed. identifier: offsetAccess.nonOffsetAccessible count: 1 path: src/webauthn/src/AttestationStatement/TPMAttestationStatementSupport.php - - message: '#^Cannot access offset ''ver'' on mixed\.$#' + rawMessage: Cannot access offset 'ver' on mixed. identifier: offsetAccess.nonOffsetAccessible count: 1 path: src/webauthn/src/AttestationStatement/TPMAttestationStatementSupport.php - - message: '#^Cannot access offset ''x5c'' on mixed\.$#' + rawMessage: Cannot access offset 'x5c' on mixed. identifier: offsetAccess.nonOffsetAccessible count: 1 path: src/webauthn/src/AttestationStatement/TPMAttestationStatementSupport.php - - message: '#^Cannot access offset 1 on array\|false\.$#' + rawMessage: Cannot access offset 1 on array|false. identifier: offsetAccess.nonOffsetAccessible count: 9 path: src/webauthn/src/AttestationStatement/TPMAttestationStatementSupport.php - - message: '#^Cannot cast mixed to int\.$#' + rawMessage: Cannot cast mixed to int. identifier: cast.int count: 2 path: src/webauthn/src/AttestationStatement/TPMAttestationStatementSupport.php - - message: '#^Cannot cast mixed to string\.$#' + rawMessage: Cannot cast mixed to string. identifier: cast.string count: 3 path: src/webauthn/src/AttestationStatement/TPMAttestationStatementSupport.php - - message: '#^Parameter \#1 \$data of function openssl_verify expects string, mixed given\.$#' + rawMessage: 'Parameter #1 $data of function openssl_verify expects string, mixed given.' identifier: argument.type count: 1 path: src/webauthn/src/AttestationStatement/TPMAttestationStatementSupport.php - - message: '#^Parameter \#1 \$data of method Webauthn\\AttestationStatement\\TPMAttestationStatementSupport\:\:checkCertInfo\(\) expects string, mixed given\.$#' + rawMessage: 'Parameter #1 $data of method Webauthn\AttestationStatement\TPMAttestationStatementSupport::checkCertInfo() expects string, mixed given.' identifier: argument.type count: 1 path: src/webauthn/src/AttestationStatement/TPMAttestationStatementSupport.php - - message: '#^Parameter \#1 \$data of method Webauthn\\AttestationStatement\\TPMAttestationStatementSupport\:\:checkPubArea\(\) expects string, mixed given\.$#' + rawMessage: 'Parameter #1 $data of method Webauthn\AttestationStatement\TPMAttestationStatementSupport::checkPubArea() expects string, mixed given.' identifier: argument.type count: 1 path: src/webauthn/src/AttestationStatement/TPMAttestationStatementSupport.php - - message: '#^Parameter \#1 \$data of static method Webauthn\\MetadataService\\CertificateChain\\CertificateToolbox\:\:convertAllDERToPEM\(\) expects array\, mixed given\.$#' + rawMessage: 'Parameter #1 $data of static method Webauthn\MetadataService\CertificateChain\CertificateToolbox::convertAllDERToPEM() expects array, mixed given.' identifier: argument.type count: 1 path: src/webauthn/src/AttestationStatement/TPMAttestationStatementSupport.php - - message: '#^Parameter \#1 \$length of method Webauthn\\StringStream\:\:read\(\) expects int, mixed given\.$#' + rawMessage: 'Parameter #1 $length of method Webauthn\StringStream::read() expects int, mixed given.' identifier: argument.type count: 8 path: src/webauthn/src/AttestationStatement/TPMAttestationStatementSupport.php - - message: '#^Parameter \#1 \$unique of method Webauthn\\AttestationStatement\\TPMAttestationStatementSupport\:\:checkUniquePublicKey\(\) expects string, mixed given\.$#' + rawMessage: 'Parameter #1 $unique of method Webauthn\AttestationStatement\TPMAttestationStatementSupport::checkUniquePublicKey() expects string, mixed given.' identifier: argument.type count: 1 path: src/webauthn/src/AttestationStatement/TPMAttestationStatementSupport.php - - message: '#^Parameter \#2 \$array of function array_key_exists expects array, mixed given\.$#' + rawMessage: 'Parameter #2 $array of function array_key_exists expects array, mixed given.' identifier: argument.type count: 1 path: src/webauthn/src/AttestationStatement/TPMAttestationStatementSupport.php - - message: '#^Parameter \#2 \$attStmt of static method Webauthn\\AttestationStatement\\AttestationStatement\:\:createAttCA\(\) expects array\, mixed given\.$#' + rawMessage: 'Parameter #2 $attStmt of static method Webauthn\AttestationStatement\AttestationStatement::createAttCA() expects array, mixed given.' identifier: argument.type count: 1 path: src/webauthn/src/AttestationStatement/TPMAttestationStatementSupport.php - - message: '#^Parameter \#2 \$signature of function openssl_verify expects string, mixed given\.$#' + rawMessage: 'Parameter #2 $signature of function openssl_verify expects string, mixed given.' identifier: argument.type count: 1 path: src/webauthn/src/AttestationStatement/TPMAttestationStatementSupport.php - - message: '#^Parameter \#2 \$user_string of function hash_equals expects string, mixed given\.$#' + rawMessage: 'Parameter #2 $user_string of function hash_equals expects string, mixed given.' identifier: argument.type count: 1 path: src/webauthn/src/AttestationStatement/TPMAttestationStatementSupport.php - - message: '#^Parameter \#1 \$callback of function array_map expects \(callable\(mixed, int\|string\)\: mixed\)\|null, Closure\(mixed, string\)\: Webauthn\\AuthenticationExtensions\\AuthenticationExtension given\.$#' + rawMessage: 'Parameter #1 $callback of function array_map expects (callable(mixed, int|string): mixed)|null, Closure(mixed, string): Webauthn\AuthenticationExtensions\AuthenticationExtension given.' identifier: argument.type count: 1 path: src/webauthn/src/AuthenticationExtensions/AuthenticationExtensionLoader.php - - message: '#^@readonly property Webauthn\\AuthenticationExtensions\\AuthenticationExtensions\:\:\$extensions is assigned outside of the constructor\.$#' + rawMessage: @@readonly property Webauthn\AuthenticationExtensions\AuthenticationExtensions::$extensions is assigned outside of the constructor. identifier: property.readOnlyByPhpDocAssignNotInConstructor count: 3 path: src/webauthn/src/AuthenticationExtensions/AuthenticationExtensions.php - - message: '#^Class Webauthn\\AuthenticationExtensions\\AuthenticationExtensions implements generic interface ArrayAccess but does not specify its types\: TKey, TValue$#' + rawMessage: 'Class Webauthn\AuthenticationExtensions\AuthenticationExtensions implements generic interface ArrayAccess but does not specify its types: TKey, TValue' identifier: missingType.generics count: 1 path: src/webauthn/src/AuthenticationExtensions/AuthenticationExtensions.php - - message: '#^Parameter \#1 \$key of function array_key_exists expects int\|string, mixed given\.$#' + rawMessage: 'Parameter #1 $key of function array_key_exists expects int|string, mixed given.' identifier: argument.type count: 1 path: src/webauthn/src/AuthenticationExtensions/AuthenticationExtensions.php - - message: '#^Parameter \#2 \$mode of function count expects 0\|1, int given\.$#' + rawMessage: 'Parameter #2 $mode of function count expects 0|1, int given.' identifier: argument.type count: 1 path: src/webauthn/src/AuthenticationExtensions/AuthenticationExtensions.php - - message: '#^Cannot access offset string on mixed\.$#' + rawMessage: Possibly invalid array key type mixed. + identifier: offsetAccess.invalidOffset + count: 2 + path: src/webauthn/src/AuthenticationExtensions/AuthenticationExtensions.php + + - + rawMessage: Cannot access offset string on mixed. identifier: offsetAccess.nonOffsetAccessible count: 1 path: src/webauthn/src/AuthenticationExtensions/PseudoRandomFunctionInputExtensionBuilder.php - - message: '#^PHPDoc tag @var has invalid value \(array\{eval\?\: array\{first\: string, second\?\: string\}, evalByCredential\?\: array\\)\: Unexpected token "\*/", expected ''\}'' at offset 145 on line 3$#' + rawMessage: 'PHPDoc tag @var has invalid value (array{eval?: array{first: string, second?: string}, evalByCredential?: array): Unexpected token "*/", expected ''}'' at offset 145 on line 3' identifier: phpDoc.parseError count: 1 path: src/webauthn/src/AuthenticationExtensions/PseudoRandomFunctionInputExtensionBuilder.php - - message: '#^Property Webauthn\\AuthenticationExtensions\\PseudoRandomFunctionInputExtensionBuilder\:\:\$values type has no value type specified in iterable type array\.$#' + rawMessage: Property Webauthn\AuthenticationExtensions\PseudoRandomFunctionInputExtensionBuilder::$values type has no value type specified in iterable type array. identifier: missingType.iterableValue count: 1 path: src/webauthn/src/AuthenticationExtensions/PseudoRandomFunctionInputExtensionBuilder.php - - message: '#^Cannot access offset 1 on array\|false\.$#' + rawMessage: Cannot access offset 1 on array|false. identifier: offsetAccess.nonOffsetAccessible count: 2 path: src/webauthn/src/AuthenticatorDataLoader.php - - message: '#^Parameter \#1 \$length of method Webauthn\\StringStream\:\:read\(\) expects int, mixed given\.$#' + rawMessage: 'Parameter #1 $length of method Webauthn\StringStream::read() expects int, mixed given.' identifier: argument.type count: 1 path: src/webauthn/src/AuthenticatorDataLoader.php - - message: '#^Parameter \#1 \$search of function str_replace expects array\\|string, string\|false given\.$#' + rawMessage: 'Parameter #1 $search of function str_replace expects array|string, string|false given.' identifier: argument.type count: 1 path: src/webauthn/src/AuthenticatorDataLoader.php - - message: '#^Parameter \#2 \$callback of function array_reduce expects callable\(string, mixed\)\: string, Closure\(string, string\)\: non\-empty\-string given\.$#' + rawMessage: 'Parameter #2 $callback of function array_reduce expects callable(string, mixed): string, Closure(string, string): non-empty-string given.' identifier: argument.type count: 1 path: src/webauthn/src/AuthenticatorDataLoader.php - - message: '#^Parameter \#2 \$replace of function str_replace expects array\\|string, string\|false given\.$#' + rawMessage: 'Parameter #2 $replace of function str_replace expects array|string, string|false given.' identifier: argument.type count: 1 path: src/webauthn/src/AuthenticatorDataLoader.php - - message: '#^Parameter \#4 \$signCount of static method Webauthn\\AuthenticatorData\:\:create\(\) expects int, mixed given\.$#' + rawMessage: 'Parameter #4 $signCount of static method Webauthn\AuthenticatorData::create() expects int, mixed given.' identifier: argument.type count: 1 path: src/webauthn/src/AuthenticatorDataLoader.php - - message: ''' - #^Instantiation of deprecated class Webauthn\\CeremonyStep\\CheckOrigin\: - since 5\.2\.0 and will be removed in 6\.0\.0\. Will be replaced by CheckAllowedOrigins$# + rawMessage: ''' + Call to method __construct() of deprecated class Webauthn\CeremonyStep\CheckOrigin: + since 5.2.0 and will be removed in 6.0.0. Will be replaced by CheckAllowedOrigins ''' - identifier: new.deprecated + identifier: method.deprecatedClass count: 2 path: src/webauthn/src/CeremonyStep/CeremonyStepManagerFactory.php - - message: '#^Access to an undefined property Webauthn\\PublicKeyCredentialCreationOptions\|Webauthn\\PublicKeyCredentialRequestOptions\:\:\$rp\.$#' - identifier: property.notFound - count: 1 - path: src/webauthn/src/CeremonyStep/CheckAllowedOrigins.php - - - - message: '#^Access to an undefined property Webauthn\\PublicKeyCredentialCreationOptions\|Webauthn\\PublicKeyCredentialRequestOptions\:\:\$rp\.$#' - identifier: property.notFound - count: 1 - path: src/webauthn/src/CeremonyStep/CheckOrigin.php - - - - message: '#^Access to an undefined property Webauthn\\PublicKeyCredentialCreationOptions\|Webauthn\\PublicKeyCredentialRequestOptions\:\:\$rp\.$#' - identifier: property.notFound - count: 1 - path: src/webauthn/src/CeremonyStep/CheckRelyingPartyIdIdHash.php + rawMessage: ''' + Instantiation of deprecated class Webauthn\CeremonyStep\CheckOrigin: + since 5.2.0 and will be removed in 6.0.0. Will be replaced by CheckAllowedOrigins + ''' + identifier: new.deprecatedClass + count: 2 + path: src/webauthn/src/CeremonyStep/CeremonyStepManagerFactory.php - - message: '#^Property Webauthn\\CollectedClientData\:\:\$crossOrigin \(bool\) does not accept mixed\.$#' + rawMessage: 'Property Webauthn\CollectedClientData::$crossOrigin (bool) does not accept mixed.' identifier: assign.propertyType count: 1 path: src/webauthn/src/CollectedClientData.php - - message: '#^Property Webauthn\\CollectedClientData\:\:\$topOrigin \(string\|null\) does not accept mixed\.$#' + rawMessage: 'Property Webauthn\CollectedClientData::$topOrigin (string|null) does not accept mixed.' identifier: assign.propertyType count: 1 path: src/webauthn/src/CollectedClientData.php - - message: '#^Cannot access offset ''authData'' on mixed\.$#' + rawMessage: Cannot access offset 'authData' on mixed. identifier: offsetAccess.nonOffsetAccessible count: 1 path: src/webauthn/src/Denormalizer/AttestationObjectDenormalizer.php - - message: '#^Parameter \#1 \$data of class Webauthn\\StringStream constructor expects string, mixed given\.$#' + rawMessage: 'Parameter #1 $data of class Webauthn\StringStream constructor expects string, mixed given.' identifier: argument.type count: 1 path: src/webauthn/src/Denormalizer/AttestationObjectDenormalizer.php - - message: '#^Parameter \#1 \$rawAttestationObject of static method Webauthn\\AttestationStatement\\AttestationObject\:\:create\(\) expects string, mixed given\.$#' + rawMessage: 'Parameter #1 $rawAttestationObject of static method Webauthn\AttestationStatement\AttestationObject::create() expects string, mixed given.' identifier: argument.type count: 1 path: src/webauthn/src/Denormalizer/AttestationObjectDenormalizer.php - - message: '#^Cannot access offset ''fmt'' on mixed\.$#' + rawMessage: Cannot access offset 'fmt' on mixed. identifier: offsetAccess.nonOffsetAccessible count: 1 path: src/webauthn/src/Denormalizer/AttestationStatementDenormalizer.php - - message: '#^Parameter \#1 \$attestation of method Webauthn\\AttestationStatement\\AttestationStatementSupport\:\:load\(\) expects array\, mixed given\.$#' + rawMessage: 'Parameter #1 $attestation of method Webauthn\AttestationStatement\AttestationStatementSupport::load() expects array, mixed given.' identifier: argument.type count: 1 path: src/webauthn/src/Denormalizer/AttestationStatementDenormalizer.php - - message: '#^Parameter \#1 \$name of method Webauthn\\AttestationStatement\\AttestationStatementSupportManager\:\:get\(\) expects string, mixed given\.$#' + rawMessage: 'Parameter #1 $name of method Webauthn\AttestationStatement\AttestationStatementSupportManager::get() expects string, mixed given.' identifier: argument.type count: 1 path: src/webauthn/src/Denormalizer/AttestationStatementDenormalizer.php - - message: '#^Method Webauthn\\Denormalizer\\AuthenticationExtensionNormalizer\:\:normalize\(\) should return array\ but returns mixed\.$#' + rawMessage: 'Method Webauthn\Denormalizer\AuthenticationExtensionNormalizer::normalize() should return array but returns mixed.' identifier: return.type count: 1 path: src/webauthn/src/Denormalizer/AuthenticationExtensionNormalizer.php - - message: '#^Parameter \#1 \$extensions of static method Webauthn\\AuthenticationExtensions\\AuthenticationExtensions\:\:create\(\) expects array\, array given\.$#' + rawMessage: 'Parameter #1 $extensions of static method Webauthn\AuthenticationExtensions\AuthenticationExtensions::create() expects array, array given.' identifier: argument.type count: 1 path: src/webauthn/src/Denormalizer/AuthenticationExtensionsDenormalizer.php - - message: '#^Cannot access offset ''attestationObject'' on mixed\.$#' + rawMessage: Cannot access offset 'attestationObject' on mixed. identifier: offsetAccess.nonOffsetAccessible count: 1 path: src/webauthn/src/Denormalizer/AuthenticatorAssertionResponseDenormalizer.php - - message: '#^Cannot access offset ''authenticatorData'' on mixed\.$#' + rawMessage: Cannot access offset 'authenticatorData' on mixed. identifier: offsetAccess.nonOffsetAccessible count: 3 path: src/webauthn/src/Denormalizer/AuthenticatorAssertionResponseDenormalizer.php - - message: '#^Cannot access offset ''clientDataJSON'' on mixed\.$#' + rawMessage: Cannot access offset 'clientDataJSON' on mixed. identifier: offsetAccess.nonOffsetAccessible count: 2 path: src/webauthn/src/Denormalizer/AuthenticatorAssertionResponseDenormalizer.php - - message: '#^Cannot access offset ''signature'' on mixed\.$#' + rawMessage: Cannot access offset 'signature' on mixed. identifier: offsetAccess.nonOffsetAccessible count: 3 path: src/webauthn/src/Denormalizer/AuthenticatorAssertionResponseDenormalizer.php - - message: '#^Cannot access offset ''userHandle'' on mixed\.$#' + rawMessage: Cannot access offset 'userHandle' on mixed. identifier: offsetAccess.nonOffsetAccessible count: 1 path: src/webauthn/src/Denormalizer/AuthenticatorAssertionResponseDenormalizer.php - - message: '#^Parameter \#1 \$data of static method Webauthn\\Util\\Base64\:\:decode\(\) expects string, mixed given\.$#' + rawMessage: 'Parameter #1 $data of static method Webauthn\Util\Base64::decode() expects string, mixed given.' identifier: argument.type count: 3 path: src/webauthn/src/Denormalizer/AuthenticatorAssertionResponseDenormalizer.php - - message: '#^Parameter \#1 \$encodedString of static method ParagonIE\\ConstantTime\\Base64\:\:decodeNoPadding\(\) expects string, mixed given\.$#' + rawMessage: 'Parameter #1 $encodedString of static method ParagonIE\ConstantTime\Base64::decodeNoPadding() expects string, mixed given.' identifier: argument.type count: 1 path: src/webauthn/src/Denormalizer/AuthenticatorAssertionResponseDenormalizer.php - - message: '#^Parameter \#3 \$signature of static method Webauthn\\AuthenticatorAssertionResponse\:\:create\(\) expects string, mixed given\.$#' + rawMessage: 'Parameter #3 $signature of static method Webauthn\AuthenticatorAssertionResponse::create() expects string, mixed given.' identifier: argument.type count: 1 path: src/webauthn/src/Denormalizer/AuthenticatorAssertionResponseDenormalizer.php - - message: '#^Cannot access offset ''attestationObject'' on mixed\.$#' + rawMessage: Cannot access offset 'attestationObject' on mixed. identifier: offsetAccess.nonOffsetAccessible count: 2 path: src/webauthn/src/Denormalizer/AuthenticatorAttestationResponseDenormalizer.php - - message: '#^Cannot access offset ''clientDataJSON'' on mixed\.$#' + rawMessage: Cannot access offset 'clientDataJSON' on mixed. identifier: offsetAccess.nonOffsetAccessible count: 3 path: src/webauthn/src/Denormalizer/AuthenticatorAttestationResponseDenormalizer.php - - message: '#^Cannot access offset ''transports'' on mixed\.$#' + rawMessage: Cannot access offset 'transports' on mixed. identifier: offsetAccess.nonOffsetAccessible count: 1 path: src/webauthn/src/Denormalizer/AuthenticatorAttestationResponseDenormalizer.php - - message: '#^Parameter \#1 \$data of static method Webauthn\\Util\\Base64\:\:decode\(\) expects string, mixed given\.$#' + rawMessage: 'Parameter #1 $data of static method Webauthn\Util\Base64::decode() expects string, mixed given.' identifier: argument.type count: 1 path: src/webauthn/src/Denormalizer/AuthenticatorAttestationResponseDenormalizer.php - - message: '#^Parameter \#1 \$encodedString of static method ParagonIE\\ConstantTime\\Base64\:\:decodeNoPadding\(\) expects string, mixed given\.$#' + rawMessage: 'Parameter #1 $encodedString of static method ParagonIE\ConstantTime\Base64::decodeNoPadding() expects string, mixed given.' identifier: argument.type count: 1 path: src/webauthn/src/Denormalizer/AuthenticatorAttestationResponseDenormalizer.php - - message: '#^Parameter \#3 \$transports of static method Webauthn\\AuthenticatorAttestationResponse\:\:create\(\) expects array\, mixed given\.$#' + rawMessage: 'Parameter #3 $transports of static method Webauthn\AuthenticatorAttestationResponse::create() expects array, mixed given.' identifier: argument.type count: 1 path: src/webauthn/src/Denormalizer/AuthenticatorAttestationResponseDenormalizer.php - - message: '#^Cannot access offset 1 on array\|false\.$#' + rawMessage: Cannot access offset 1 on array|false. identifier: offsetAccess.nonOffsetAccessible count: 2 path: src/webauthn/src/Denormalizer/AuthenticatorDataDenormalizer.php - - message: '#^Parameter \#1 \$data of method Webauthn\\Denormalizer\\AuthenticatorDataDenormalizer\:\:fixIncorrectEdDSAKey\(\) expects string, mixed given\.$#' + rawMessage: 'Parameter #1 $data of method Webauthn\Denormalizer\AuthenticatorDataDenormalizer::fixIncorrectEdDSAKey() expects string, mixed given.' identifier: argument.type count: 1 path: src/webauthn/src/Denormalizer/AuthenticatorDataDenormalizer.php - - message: '#^Parameter \#1 \$length of method Webauthn\\StringStream\:\:read\(\) expects int, mixed given\.$#' + rawMessage: 'Parameter #1 $length of method Webauthn\StringStream::read() expects int, mixed given.' identifier: argument.type count: 1 path: src/webauthn/src/Denormalizer/AuthenticatorDataDenormalizer.php - - message: '#^Parameter \#1 \$search of function str_replace expects array\\|string, string\|false given\.$#' + rawMessage: 'Parameter #1 $search of function str_replace expects array|string, string|false given.' identifier: argument.type count: 1 path: src/webauthn/src/Denormalizer/AuthenticatorDataDenormalizer.php - - message: '#^Parameter \#2 \$callback of function array_reduce expects callable\(string, mixed\)\: string, Closure\(string, string\)\: non\-empty\-string given\.$#' + rawMessage: 'Parameter #2 $callback of function array_reduce expects callable(string, mixed): string, Closure(string, string): non-empty-string given.' identifier: argument.type count: 1 path: src/webauthn/src/Denormalizer/AuthenticatorDataDenormalizer.php - - message: '#^Parameter \#2 \$replace of function str_replace expects array\\|string, string\|false given\.$#' + rawMessage: 'Parameter #2 $replace of function str_replace expects array|string, string|false given.' identifier: argument.type count: 1 path: src/webauthn/src/Denormalizer/AuthenticatorDataDenormalizer.php - - message: '#^Parameter \#4 \$signCount of static method Webauthn\\AuthenticatorData\:\:create\(\) expects int, mixed given\.$#' + rawMessage: 'Parameter #4 $signCount of static method Webauthn\AuthenticatorData::create() expects int, mixed given.' identifier: argument.type count: 1 path: src/webauthn/src/Denormalizer/AuthenticatorDataDenormalizer.php - - message: '#^Parameter \#2 \$array of function array_key_exists expects array, mixed given\.$#' + rawMessage: 'Parameter #2 $array of function array_key_exists expects array, mixed given.' identifier: argument.type - count: 2 + count: 1 path: src/webauthn/src/Denormalizer/AuthenticatorResponseDenormalizer.php - - message: '#^Parameter \#1 \$json of function json_decode expects string, mixed given\.$#' + rawMessage: 'Parameter #1 $json of function json_decode expects string, mixed given.' identifier: argument.type count: 1 path: src/webauthn/src/Denormalizer/CollectedClientDataDenormalizer.php - - message: '#^Parameter \#1 \$rawData of static method Webauthn\\CollectedClientData\:\:create\(\) expects string, mixed given\.$#' + rawMessage: 'Parameter #1 $rawData of static method Webauthn\CollectedClientData::create() expects string, mixed given.' identifier: argument.type count: 1 path: src/webauthn/src/Denormalizer/CollectedClientDataDenormalizer.php - - message: '#^Parameter \#2 \$data of static method Webauthn\\CollectedClientData\:\:create\(\) expects array\, mixed given\.$#' + rawMessage: 'Parameter #2 $data of static method Webauthn\CollectedClientData::create() expects array, mixed given.' identifier: argument.type count: 1 path: src/webauthn/src/Denormalizer/CollectedClientDataDenormalizer.php - - message: '#^Only iterables can be unpacked, mixed given in argument \#1\.$#' - identifier: argument.unpackNonIterable - count: 1 - path: src/webauthn/src/Denormalizer/ExtensionDescriptorDenormalizer.php - - - - message: '#^Parameter \#1 \$id of static method Webauthn\\MetadataService\\Statement\\ExtensionDescriptor\:\:create\(\) expects string, mixed given\.$#' + rawMessage: 'Parameter #1 $id of static method Webauthn\MetadataService\Statement\ExtensionDescriptor::create() expects string, mixed given.' identifier: argument.type count: 1 path: src/webauthn/src/Denormalizer/ExtensionDescriptorDenormalizer.php - - message: '#^Parameter \#2 \$array of function array_key_exists expects array, mixed given\.$#' + rawMessage: 'Parameter #2 $array of function array_key_exists expects array, mixed given.' identifier: argument.type count: 1 path: src/webauthn/src/Denormalizer/ExtensionDescriptorDenormalizer.php - - message: '#^Parameter \#1 \$data of static method Webauthn\\Util\\Base64\:\:decode\(\) expects string, mixed given\.$#' + rawMessage: 'Parameter #1 $data of static method Webauthn\Util\Base64::decode() expects string, mixed given.' identifier: argument.type count: 1 path: src/webauthn/src/Denormalizer/PublicKeyCredentialDenormalizer.php - - message: '#^Parameter \#1 \$encodedString of static method ParagonIE\\ConstantTime\\Base64\:\:decodeNoPadding\(\) expects string, mixed given\.$#' + rawMessage: 'Parameter #1 $encodedString of static method ParagonIE\ConstantTime\Base64::decodeNoPadding() expects string, mixed given.' identifier: argument.type count: 1 path: src/webauthn/src/Denormalizer/PublicKeyCredentialDenormalizer.php - - message: '#^Parameter \#1 \$type of static method Webauthn\\PublicKeyCredential\:\:create\(\) expects string, mixed given\.$#' + rawMessage: 'Parameter #1 $type of static method Webauthn\PublicKeyCredential::create() expects string, mixed given.' identifier: argument.type count: 1 path: src/webauthn/src/Denormalizer/PublicKeyCredentialDenormalizer.php - - message: '#^Parameter \#2 \$array of function array_key_exists expects array, mixed given\.$#' + rawMessage: 'Parameter #2 $array of function array_key_exists expects array, mixed given.' identifier: argument.type count: 1 path: src/webauthn/src/Denormalizer/PublicKeyCredentialDenormalizer.php - - message: '#^Argument of an invalid type mixed supplied for foreach, only iterables are supported\.$#' + rawMessage: 'Argument of an invalid type mixed supplied for foreach, only iterables are supported.' identifier: foreach.nonIterable count: 1 path: src/webauthn/src/Denormalizer/PublicKeyCredentialOptionsDenormalizer.php - - message: '#^Cannot access offset ''allowCredentials'' on mixed\.$#' - identifier: offsetAccess.nonOffsetAccessible - count: 1 - path: src/webauthn/src/Denormalizer/PublicKeyCredentialOptionsDenormalizer.php - - - - message: '#^Cannot access offset ''allowCredentials''\|''excludeCredentials'' on mixed\.$#' - identifier: offsetAccess.nonOffsetAccessible - count: 1 - path: src/webauthn/src/Denormalizer/PublicKeyCredentialOptionsDenormalizer.php - - - - message: '#^Cannot access offset ''attestation'' on mixed\.$#' - identifier: offsetAccess.nonOffsetAccessible - count: 1 - path: src/webauthn/src/Denormalizer/PublicKeyCredentialOptionsDenormalizer.php - - - - message: '#^Cannot access offset ''authenticatorSelection'' on mixed\.$#' - identifier: offsetAccess.nonOffsetAccessible - count: 1 - path: src/webauthn/src/Denormalizer/PublicKeyCredentialOptionsDenormalizer.php - - - - message: '#^Cannot access offset ''challenge'' on mixed\.$#' + rawMessage: Cannot access offset 'id' on mixed. identifier: offsetAccess.nonOffsetAccessible count: 2 path: src/webauthn/src/Denormalizer/PublicKeyCredentialOptionsDenormalizer.php - - message: '#^Cannot access offset ''excludeCredentials'' on mixed\.$#' + rawMessage: Cannot access offset mixed on mixed. identifier: offsetAccess.nonOffsetAccessible count: 1 path: src/webauthn/src/Denormalizer/PublicKeyCredentialOptionsDenormalizer.php - - message: '#^Cannot access offset ''extensions'' on mixed\.$#' - identifier: offsetAccess.nonOffsetAccessible - count: 2 - path: src/webauthn/src/Denormalizer/PublicKeyCredentialOptionsDenormalizer.php - - - - message: '#^Cannot access offset ''id'' on mixed\.$#' - identifier: offsetAccess.nonOffsetAccessible - count: 2 - path: src/webauthn/src/Denormalizer/PublicKeyCredentialOptionsDenormalizer.php - - - - message: '#^Cannot access offset ''pubKeyCredParams'' on mixed\.$#' - identifier: offsetAccess.nonOffsetAccessible - count: 1 - path: src/webauthn/src/Denormalizer/PublicKeyCredentialOptionsDenormalizer.php - - - - message: '#^Cannot access offset ''rp'' on mixed\.$#' - identifier: offsetAccess.nonOffsetAccessible - count: 1 - path: src/webauthn/src/Denormalizer/PublicKeyCredentialOptionsDenormalizer.php - - - - message: '#^Cannot access offset ''rpId'' on mixed\.$#' - identifier: offsetAccess.nonOffsetAccessible - count: 1 - path: src/webauthn/src/Denormalizer/PublicKeyCredentialOptionsDenormalizer.php - - - - message: '#^Cannot access offset ''timeout'' on mixed\.$#' - identifier: offsetAccess.nonOffsetAccessible - count: 2 - path: src/webauthn/src/Denormalizer/PublicKeyCredentialOptionsDenormalizer.php - - - - message: '#^Cannot access offset ''user'' on mixed\.$#' - identifier: offsetAccess.nonOffsetAccessible - count: 1 - path: src/webauthn/src/Denormalizer/PublicKeyCredentialOptionsDenormalizer.php - - - - message: '#^Cannot access offset ''userVerification'' on mixed\.$#' - identifier: offsetAccess.nonOffsetAccessible - count: 1 - path: src/webauthn/src/Denormalizer/PublicKeyCredentialOptionsDenormalizer.php - - - - message: '#^Cannot access offset mixed on mixed\.$#' - identifier: offsetAccess.nonOffsetAccessible - count: 1 - path: src/webauthn/src/Denormalizer/PublicKeyCredentialOptionsDenormalizer.php - - - - message: '#^Parameter \#1 \$challenge of static method Webauthn\\PublicKeyCredentialRequestOptions\:\:create\(\) expects string, mixed given\.$#' + rawMessage: 'Parameter #1 $challenge of static method Webauthn\PublicKeyCredentialRequestOptions::create() expects string, mixed given.' identifier: argument.type count: 1 path: src/webauthn/src/Denormalizer/PublicKeyCredentialOptionsDenormalizer.php - - message: '#^Parameter \#1 \$encodedString of static method ParagonIE\\ConstantTime\\Base64\:\:decodeNoPadding\(\) expects string, mixed given\.$#' + rawMessage: 'Parameter #1 $encodedString of static method ParagonIE\ConstantTime\Base64::decodeNoPadding() expects string, mixed given.' identifier: argument.type count: 2 path: src/webauthn/src/Denormalizer/PublicKeyCredentialOptionsDenormalizer.php - - message: '#^Parameter \#2 \$array of function array_key_exists expects array, mixed given\.$#' + rawMessage: 'Parameter #2 $array of function array_key_exists expects array, mixed given.' identifier: argument.type - count: 2 + count: 1 path: src/webauthn/src/Denormalizer/PublicKeyCredentialOptionsDenormalizer.php - - message: '#^Parameter \#2 \$rpId of static method Webauthn\\PublicKeyCredentialRequestOptions\:\:create\(\) expects string\|null, mixed given\.$#' + rawMessage: 'Parameter #2 $rpId of static method Webauthn\PublicKeyCredentialRequestOptions::create() expects string|null, mixed given.' identifier: argument.type count: 1 path: src/webauthn/src/Denormalizer/PublicKeyCredentialOptionsDenormalizer.php - - message: '#^Parameter \#3 \$challenge of static method Webauthn\\PublicKeyCredentialCreationOptions\:\:create\(\) expects string, mixed given\.$#' + rawMessage: 'Parameter #3 $challenge of static method Webauthn\PublicKeyCredentialCreationOptions::create() expects string, mixed given.' identifier: argument.type count: 1 path: src/webauthn/src/Denormalizer/PublicKeyCredentialOptionsDenormalizer.php - - message: '#^Parameter \#4 \$userVerification of static method Webauthn\\PublicKeyCredentialRequestOptions\:\:create\(\) expects string\|null, mixed given\.$#' + rawMessage: 'Parameter #4 $userVerification of static method Webauthn\PublicKeyCredentialRequestOptions::create() expects string|null, mixed given.' identifier: argument.type count: 1 path: src/webauthn/src/Denormalizer/PublicKeyCredentialOptionsDenormalizer.php - - message: '#^Parameter \#5 \$timeout of static method Webauthn\\PublicKeyCredentialRequestOptions\:\:create\(\) expects int\<1, max\>\|null, mixed given\.$#' + rawMessage: 'Parameter #5 $timeout of static method Webauthn\PublicKeyCredentialRequestOptions::create() expects int<1, max>|null, mixed given.' identifier: argument.type count: 1 path: src/webauthn/src/Denormalizer/PublicKeyCredentialOptionsDenormalizer.php - - message: '#^Parameter \#6 \$attestation of static method Webauthn\\PublicKeyCredentialCreationOptions\:\:create\(\) expects string\|null, mixed given\.$#' + rawMessage: 'Parameter #6 $attestation of static method Webauthn\PublicKeyCredentialCreationOptions::create() expects string|null, mixed given.' identifier: argument.type count: 1 path: src/webauthn/src/Denormalizer/PublicKeyCredentialOptionsDenormalizer.php - - message: '#^Parameter \#8 \$timeout of static method Webauthn\\PublicKeyCredentialCreationOptions\:\:create\(\) expects int\<1, max\>\|null, mixed given\.$#' + rawMessage: 'Parameter #8 $timeout of static method Webauthn\PublicKeyCredentialCreationOptions::create() expects int<1, max>|null, mixed given.' identifier: argument.type count: 1 path: src/webauthn/src/Denormalizer/PublicKeyCredentialOptionsDenormalizer.php - - message: '#^Parameter \#1 \$type of static method Webauthn\\PublicKeyCredentialParameters\:\:create\(\) expects string, mixed given\.$#' + rawMessage: 'Parameter #1 $type of static method Webauthn\PublicKeyCredentialParameters::create() expects string, mixed given.' identifier: argument.type count: 1 path: src/webauthn/src/Denormalizer/PublicKeyCredentialParametersDenormalizer.php - - message: '#^Parameter \#2 \$alg of static method Webauthn\\PublicKeyCredentialParameters\:\:create\(\) expects int, mixed given\.$#' + rawMessage: 'Parameter #2 $alg of static method Webauthn\PublicKeyCredentialParameters::create() expects int, mixed given.' identifier: argument.type count: 1 path: src/webauthn/src/Denormalizer/PublicKeyCredentialParametersDenormalizer.php - - message: '#^Parameter \#2 \$array of function array_key_exists expects array, mixed given\.$#' + rawMessage: 'Parameter #2 $array of function array_key_exists expects array, mixed given.' identifier: argument.type count: 1 path: src/webauthn/src/Denormalizer/PublicKeyCredentialParametersDenormalizer.php - - message: '#^Cannot access offset ''aaguid'' on mixed\.$#' + rawMessage: Cannot access offset 'aaguid' on mixed. identifier: offsetAccess.nonOffsetAccessible count: 1 path: src/webauthn/src/Denormalizer/PublicKeyCredentialSourceDenormalizer.php - - message: '#^Cannot access offset ''attestationType'' on mixed\.$#' + rawMessage: Cannot access offset 'attestationType' on mixed. identifier: offsetAccess.nonOffsetAccessible count: 1 path: src/webauthn/src/Denormalizer/PublicKeyCredentialSourceDenormalizer.php - - message: '#^Cannot access offset ''backupEligible'' on mixed\.$#' + rawMessage: Cannot access offset 'backupEligible' on mixed. identifier: offsetAccess.nonOffsetAccessible count: 1 path: src/webauthn/src/Denormalizer/PublicKeyCredentialSourceDenormalizer.php - - message: '#^Cannot access offset ''backupStatus'' on mixed\.$#' + rawMessage: Cannot access offset 'backupStatus' on mixed. identifier: offsetAccess.nonOffsetAccessible count: 1 path: src/webauthn/src/Denormalizer/PublicKeyCredentialSourceDenormalizer.php - - message: '#^Cannot access offset ''counter'' on mixed\.$#' + rawMessage: Cannot access offset 'counter' on mixed. identifier: offsetAccess.nonOffsetAccessible count: 1 path: src/webauthn/src/Denormalizer/PublicKeyCredentialSourceDenormalizer.php - - message: '#^Cannot access offset ''credentialPublicKey'' on mixed\.$#' + rawMessage: Cannot access offset 'credentialPublicKey' on mixed. identifier: offsetAccess.nonOffsetAccessible count: 1 path: src/webauthn/src/Denormalizer/PublicKeyCredentialSourceDenormalizer.php - - message: '#^Cannot access offset ''otherUI'' on mixed\.$#' + rawMessage: Cannot access offset 'otherUI' on mixed. identifier: offsetAccess.nonOffsetAccessible count: 1 path: src/webauthn/src/Denormalizer/PublicKeyCredentialSourceDenormalizer.php - - message: '#^Cannot access offset ''publicKeyCredentialId'' on mixed\.$#' + rawMessage: Cannot access offset 'publicKeyCredentialId' on mixed. identifier: offsetAccess.nonOffsetAccessible count: 1 path: src/webauthn/src/Denormalizer/PublicKeyCredentialSourceDenormalizer.php - - message: '#^Cannot access offset ''transports'' on mixed\.$#' + rawMessage: Cannot access offset 'transports' on mixed. identifier: offsetAccess.nonOffsetAccessible count: 1 path: src/webauthn/src/Denormalizer/PublicKeyCredentialSourceDenormalizer.php - - message: '#^Cannot access offset ''trustPath'' on mixed\.$#' + rawMessage: Cannot access offset 'trustPath' on mixed. identifier: offsetAccess.nonOffsetAccessible count: 1 path: src/webauthn/src/Denormalizer/PublicKeyCredentialSourceDenormalizer.php - - message: '#^Cannot access offset ''type'' on mixed\.$#' + rawMessage: Cannot access offset 'type' on mixed. identifier: offsetAccess.nonOffsetAccessible count: 1 path: src/webauthn/src/Denormalizer/PublicKeyCredentialSourceDenormalizer.php - - message: '#^Cannot access offset ''userHandle'' on mixed\.$#' + rawMessage: Cannot access offset 'userHandle' on mixed. identifier: offsetAccess.nonOffsetAccessible count: 1 path: src/webauthn/src/Denormalizer/PublicKeyCredentialSourceDenormalizer.php - - message: '#^Cannot access offset ''uvInitialized'' on mixed\.$#' + rawMessage: Cannot access offset 'uvInitialized' on mixed. identifier: offsetAccess.nonOffsetAccessible count: 1 path: src/webauthn/src/Denormalizer/PublicKeyCredentialSourceDenormalizer.php - - message: '#^Parameter \#1 \$data of static method Webauthn\\Util\\Base64\:\:decode\(\) expects string, mixed given\.$#' + rawMessage: 'Parameter #1 $data of static method Webauthn\Util\Base64::decode() expects string, mixed given.' identifier: argument.type count: 1 path: src/webauthn/src/Denormalizer/PublicKeyCredentialSourceDenormalizer.php - - message: '#^Parameter \#1 \$publicKeyCredentialId of static method Webauthn\\PublicKeyCredentialSource\:\:create\(\) expects string, mixed given\.$#' + rawMessage: 'Parameter #1 $publicKeyCredentialId of static method Webauthn\PublicKeyCredentialSource::create() expects string, mixed given.' identifier: argument.type count: 1 path: src/webauthn/src/Denormalizer/PublicKeyCredentialSourceDenormalizer.php - - message: '#^Parameter \#1 \$uuid of static method Symfony\\Component\\Uid\\Uuid\:\:fromString\(\) expects string, mixed given\.$#' + rawMessage: 'Parameter #1 $uuid of static method Symfony\Component\Uid\Uuid::fromString() expects string, mixed given.' identifier: argument.type count: 1 path: src/webauthn/src/Denormalizer/PublicKeyCredentialSourceDenormalizer.php - - message: '#^Parameter \#10 \$otherUI of static method Webauthn\\PublicKeyCredentialSource\:\:create\(\) expects array\\|null, mixed given\.$#' + rawMessage: 'Parameter #10 $otherUI of static method Webauthn\PublicKeyCredentialSource::create() expects array|null, mixed given.' identifier: argument.type count: 1 path: src/webauthn/src/Denormalizer/PublicKeyCredentialSourceDenormalizer.php - - message: '#^Parameter \#11 \$backupEligible of static method Webauthn\\PublicKeyCredentialSource\:\:create\(\) expects bool\|null, mixed given\.$#' + rawMessage: 'Parameter #11 $backupEligible of static method Webauthn\PublicKeyCredentialSource::create() expects bool|null, mixed given.' identifier: argument.type count: 1 path: src/webauthn/src/Denormalizer/PublicKeyCredentialSourceDenormalizer.php - - message: '#^Parameter \#12 \$backupStatus of static method Webauthn\\PublicKeyCredentialSource\:\:create\(\) expects bool\|null, mixed given\.$#' + rawMessage: 'Parameter #12 $backupStatus of static method Webauthn\PublicKeyCredentialSource::create() expects bool|null, mixed given.' identifier: argument.type count: 1 path: src/webauthn/src/Denormalizer/PublicKeyCredentialSourceDenormalizer.php - - message: '#^Parameter \#13 \$uvInitialized of static method Webauthn\\PublicKeyCredentialSource\:\:create\(\) expects bool\|null, mixed given\.$#' + rawMessage: 'Parameter #13 $uvInitialized of static method Webauthn\PublicKeyCredentialSource::create() expects bool|null, mixed given.' identifier: argument.type count: 1 path: src/webauthn/src/Denormalizer/PublicKeyCredentialSourceDenormalizer.php - - message: '#^Parameter \#2 \$array of function array_key_exists expects array, mixed given\.$#' + rawMessage: 'Parameter #2 $array of function array_key_exists expects array, mixed given.' identifier: argument.type count: 1 path: src/webauthn/src/Denormalizer/PublicKeyCredentialSourceDenormalizer.php - - message: '#^Parameter \#2 \$type of static method Webauthn\\PublicKeyCredentialSource\:\:create\(\) expects string, mixed given\.$#' + rawMessage: 'Parameter #2 $type of static method Webauthn\PublicKeyCredentialSource::create() expects string, mixed given.' identifier: argument.type count: 1 path: src/webauthn/src/Denormalizer/PublicKeyCredentialSourceDenormalizer.php - - message: '#^Parameter \#3 \$transports of static method Webauthn\\PublicKeyCredentialSource\:\:create\(\) expects array\, mixed given\.$#' + rawMessage: 'Parameter #3 $transports of static method Webauthn\PublicKeyCredentialSource::create() expects array, mixed given.' identifier: argument.type count: 1 path: src/webauthn/src/Denormalizer/PublicKeyCredentialSourceDenormalizer.php - - message: '#^Parameter \#4 \$attestationType of static method Webauthn\\PublicKeyCredentialSource\:\:create\(\) expects string, mixed given\.$#' + rawMessage: 'Parameter #4 $attestationType of static method Webauthn\PublicKeyCredentialSource::create() expects string, mixed given.' identifier: argument.type count: 1 path: src/webauthn/src/Denormalizer/PublicKeyCredentialSourceDenormalizer.php - - message: '#^Parameter \#7 \$credentialPublicKey of static method Webauthn\\PublicKeyCredentialSource\:\:create\(\) expects string, mixed given\.$#' + rawMessage: 'Parameter #7 $credentialPublicKey of static method Webauthn\PublicKeyCredentialSource::create() expects string, mixed given.' identifier: argument.type count: 1 path: src/webauthn/src/Denormalizer/PublicKeyCredentialSourceDenormalizer.php - - message: '#^Parameter \#8 \$userHandle of static method Webauthn\\PublicKeyCredentialSource\:\:create\(\) expects string, mixed given\.$#' + rawMessage: 'Parameter #8 $userHandle of static method Webauthn\PublicKeyCredentialSource::create() expects string, mixed given.' identifier: argument.type count: 1 path: src/webauthn/src/Denormalizer/PublicKeyCredentialSourceDenormalizer.php - - message: '#^Parameter \#9 \$counter of static method Webauthn\\PublicKeyCredentialSource\:\:create\(\) expects int, mixed given\.$#' + rawMessage: 'Parameter #9 $counter of static method Webauthn\PublicKeyCredentialSource::create() expects int, mixed given.' identifier: argument.type count: 1 path: src/webauthn/src/Denormalizer/PublicKeyCredentialSourceDenormalizer.php - - message: '#^Parameter \#1 \$data of static method Webauthn\\Util\\Base64\:\:decode\(\) expects string, mixed given\.$#' + rawMessage: 'Parameter #1 $data of static method Webauthn\Util\Base64::decode() expects string, mixed given.' identifier: argument.type count: 1 path: src/webauthn/src/Denormalizer/PublicKeyCredentialUserEntityDenormalizer.php - - message: '#^Parameter \#1 \$name of static method Webauthn\\PublicKeyCredentialUserEntity\:\:create\(\) expects string, mixed given\.$#' + rawMessage: 'Parameter #1 $name of static method Webauthn\PublicKeyCredentialUserEntity::create() expects string, mixed given.' identifier: argument.type count: 1 path: src/webauthn/src/Denormalizer/PublicKeyCredentialUserEntityDenormalizer.php - - message: '#^Parameter \#2 \$array of function array_key_exists expects array, mixed given\.$#' + rawMessage: 'Parameter #2 $array of function array_key_exists expects array, mixed given.' identifier: argument.type count: 1 path: src/webauthn/src/Denormalizer/PublicKeyCredentialUserEntityDenormalizer.php - - message: '#^Parameter \#3 \$displayName of static method Webauthn\\PublicKeyCredentialUserEntity\:\:create\(\) expects string, mixed given\.$#' + rawMessage: 'Parameter #3 $displayName of static method Webauthn\PublicKeyCredentialUserEntity::create() expects string, mixed given.' identifier: argument.type count: 1 path: src/webauthn/src/Denormalizer/PublicKeyCredentialUserEntityDenormalizer.php - - message: '#^Cannot access offset ''type'' on mixed\.$#' + rawMessage: Cannot access offset 'type' on mixed. identifier: offsetAccess.nonOffsetAccessible count: 1 path: src/webauthn/src/Denormalizer/TrustPathDenormalizer.php - - message: '#^Parameter \#1 \$certificates of static method Webauthn\\TrustPath\\CertificateTrustPath\:\:create\(\) expects array\, array\ given\.$#' + rawMessage: 'Parameter #1 $certificates of static method Webauthn\TrustPath\CertificateTrustPath::create() expects array, array given.' identifier: argument.type count: 1 path: src/webauthn/src/Denormalizer/TrustPathDenormalizer.php - - message: '#^Parameter \#2 \$array of function array_key_exists expects array, mixed given\.$#' + rawMessage: 'Parameter #2 $array of function array_key_exists expects array, mixed given.' identifier: argument.type count: 1 path: src/webauthn/src/Denormalizer/TrustPathDenormalizer.php - - message: '#^Method Webauthn\\Denormalizer\\VerificationMethodANDCombinationsDenormalizer\:\:normalize\(\) should return array\ but returns array\\|ArrayObject\<\(int\|string\), mixed\>\|bool\|float\|int\|string\|null\>\.$#' + rawMessage: 'Method Webauthn\Denormalizer\VerificationMethodANDCombinationsDenormalizer::normalize() should return array but returns array|ArrayObject<(int|string), mixed>|bool|float|int|string|null>.' identifier: return.type count: 1 path: src/webauthn/src/Denormalizer/VerificationMethodANDCombinationsDenormalizer.php - - message: '#^Argument of an invalid type mixed supplied for foreach, only iterables are supported\.$#' + rawMessage: 'Argument of an invalid type mixed supplied for foreach, only iterables are supported.' identifier: foreach.nonIterable count: 1 path: src/webauthn/src/MetadataService/Psr18HttpClient.php - - message: '#^Binary operation "\." between mixed and string results in an error\.$#' + rawMessage: Binary operation "." between mixed and string results in an error. identifier: binaryOp.invalid count: 1 path: src/webauthn/src/MetadataService/Psr18HttpClient.php - - message: '#^Method Webauthn\\MetadataService\\Psr18HttpClient\:\:request\(\) has parameter \$options with no value type specified in iterable type array\.$#' + rawMessage: 'Method Webauthn\MetadataService\Psr18HttpClient::request() has parameter $options with no value type specified in iterable type array.' identifier: missingType.iterableValue count: 1 path: src/webauthn/src/MetadataService/Psr18HttpClient.php - - message: '#^Method Webauthn\\MetadataService\\Psr18HttpClient\:\:withOptions\(\) has parameter \$options with no value type specified in iterable type array\.$#' + rawMessage: 'Method Webauthn\MetadataService\Psr18HttpClient::withOptions() has parameter $options with no value type specified in iterable type array.' identifier: missingType.iterableValue count: 1 path: src/webauthn/src/MetadataService/Psr18HttpClient.php - - message: '#^Parameter \#1 \$content of method Psr\\Http\\Message\\StreamFactoryInterface\:\:createStream\(\) expects string, mixed given\.$#' + rawMessage: 'Parameter #1 $content of method Psr\Http\Message\StreamFactoryInterface::createStream() expects string, mixed given.' identifier: argument.type count: 1 path: src/webauthn/src/MetadataService/Psr18HttpClient.php - - message: '#^Parameter \#1 \$data of function http_build_query expects array\|object, mixed given\.$#' + rawMessage: 'Parameter #1 $data of function http_build_query expects array|object, mixed given.' identifier: argument.type count: 1 path: src/webauthn/src/MetadataService/Psr18HttpClient.php - - message: '#^Parameter \#1 \$name of method Psr\\Http\\Message\\MessageInterface\:\:withHeader\(\) expects string, mixed given\.$#' + rawMessage: 'Parameter #1 $name of method Psr\Http\Message\MessageInterface::withHeader() expects string, mixed given.' identifier: argument.type count: 1 path: src/webauthn/src/MetadataService/Psr18HttpClient.php - - message: '#^Parameter \#2 \$value of method Psr\\Http\\Message\\MessageInterface\:\:withHeader\(\) expects array\\|string, mixed given\.$#' + rawMessage: 'Parameter #2 $value of method Psr\Http\Message\MessageInterface::withHeader() expects array|string, mixed given.' identifier: argument.type count: 2 path: src/webauthn/src/MetadataService/Psr18HttpClient.php - - message: '#^Property Webauthn\\MetadataService\\Psr18HttpClient\:\:\$options type has no value type specified in iterable type array\.$#' + rawMessage: Property Webauthn\MetadataService\Psr18HttpClient::$options type has no value type specified in iterable type array. identifier: missingType.iterableValue count: 1 path: src/webauthn/src/MetadataService/Psr18HttpClient.php - - message: '#^Parameter &\$rootCertificates by\-ref type of method Webauthn\\MetadataService\\Service\\FidoAllianceCompliantMetadataService\:\:getJwsPayload\(\) expects array\, array\ given\.$#' + rawMessage: 'Return type (array>) of method Symfony\Contracts\HttpClient\ResponseInterface@anonymous/webauthn/src/MetadataService/Psr18HttpClient.php:75::getHeaders() should be covariant with return type (array>) of method Symfony\Contracts\HttpClient\ResponseInterface::getHeaders()' + identifier: method.childReturnType + count: 1 + path: src/webauthn/src/MetadataService/Psr18HttpClient.php + + - + rawMessage: 'Parameter &$rootCertificates by-ref type of method Webauthn\MetadataService\Service\FidoAllianceCompliantMetadataService::getJwsPayload() expects array, array given.' identifier: parameterByRef.type count: 1 path: src/webauthn/src/MetadataService/Service/FidoAllianceCompliantMetadataService.php - - message: '#^Property Webauthn\\MetadataService\\Service\\FidoAllianceCompliantMetadataService\:\:\$statusReports \(array\\>\) does not accept array\\>\.$#' + rawMessage: 'Property Webauthn\MetadataService\Service\FidoAllianceCompliantMetadataService::$statusReports (array>) does not accept array>.' identifier: assign.propertyType count: 1 path: src/webauthn/src/MetadataService/Service/FidoAllianceCompliantMetadataService.php - - message: '#^Parameter \#1 \$descriptions of static method Webauthn\\MetadataService\\Statement\\AlternativeDescriptions\:\:create\(\) expects array\, array\ given\.$#' + rawMessage: 'Parameter #1 $descriptions of static method Webauthn\MetadataService\Statement\AlternativeDescriptions::create() expects array, array given.' identifier: argument.type count: 1 path: src/webauthn/src/MetadataService/Statement/MetadataStatement.php - - message: '#^Parameter \#1 \$extensions of static method Webauthn\\AuthenticationExtensions\\AuthenticationExtensions\:\:create\(\) expects array\, array\ given\.$#' + rawMessage: 'Parameter #1 $extensions of static method Webauthn\AuthenticationExtensions\AuthenticationExtensions::create() expects array, array given.' identifier: argument.type count: 1 path: src/webauthn/src/PublicKeyCredentialOptions.php - - message: '#^Parameter \#3 \$extensions of method Webauthn\\PublicKeyCredentialOptions\:\:__construct\(\) expects array\\|Webauthn\\AuthenticationExtensions\\AuthenticationExtensions\|null, array\\|Webauthn\\AuthenticationExtensions\\AuthenticationExtensions\|null given\.$#' + rawMessage: 'Parameter #3 $extensions of method Webauthn\PublicKeyCredentialOptions::__construct() expects array|Webauthn\AuthenticationExtensions\AuthenticationExtensions|null, array|Webauthn\AuthenticationExtensions\AuthenticationExtensions|null given.' identifier: argument.type count: 1 path: src/webauthn/src/PublicKeyCredentialRequestOptions.php - - message: '#^Method Webauthn\\SimpleFakeCredentialGenerator\:\:generate\(\) should return array\ but returns mixed\.$#' + rawMessage: 'Method Webauthn\SimpleFakeCredentialGenerator::generate() should return array but returns mixed.' identifier: return.type count: 1 path: src/webauthn/src/SimpleFakeCredentialGenerator.php + + - + rawMessage: 'Call to static method fromAsn1() of internal class Cose\Algorithm\Signature\ECDSA\ECSignature from outside its root namespace Cose.' + identifier: staticMethod.internalClass + count: 3 + path: src/webauthn/src/Util/CoseSignatureFixer.php diff --git a/src/symfony/src/DependencyInjection/WebauthnExtension.php b/src/symfony/src/DependencyInjection/WebauthnExtension.php index d8ac3664e..8950360d8 100644 --- a/src/symfony/src/DependencyInjection/WebauthnExtension.php +++ b/src/symfony/src/DependencyInjection/WebauthnExtension.php @@ -124,7 +124,7 @@ public function load(array $configs, ContainerBuilder $container): void } } - public function getConfiguration(array $config, ContainerBuilder $container): ?ConfigurationInterface + public function getConfiguration(array $config, ContainerBuilder $container): ConfigurationInterface { return new Configuration($this->alias); } diff --git a/src/symfony/src/Security/Http/Authenticator/WebauthnAuthenticator.php b/src/symfony/src/Security/Http/Authenticator/WebauthnAuthenticator.php index 7fa6920cc..2d9502890 100644 --- a/src/symfony/src/Security/Http/Authenticator/WebauthnAuthenticator.php +++ b/src/symfony/src/Security/Http/Authenticator/WebauthnAuthenticator.php @@ -68,7 +68,7 @@ public function setLogger(LoggerInterface $logger): void $this->logger = $logger; } - public function supports(Request $request): ?bool + public function supports(Request $request): bool { if ($request->getMethod() !== Request::METHOD_POST) { return false; @@ -144,7 +144,7 @@ public function onAuthenticationSuccess(Request $request, TokenInterface $token, return $this->successHandler->onAuthenticationSuccess($request, $token); } - public function onAuthenticationFailure(Request $request, AuthenticationException $exception): ?Response + public function onAuthenticationFailure(Request $request, AuthenticationException $exception): Response { $this->logger->info('Webauthn authentication request failed.', [ 'request' => $request, diff --git a/src/symfony/src/WebauthnBundle.php b/src/symfony/src/WebauthnBundle.php index 698ca568d..dac61e081 100644 --- a/src/symfony/src/WebauthnBundle.php +++ b/src/symfony/src/WebauthnBundle.php @@ -26,7 +26,7 @@ final class WebauthnBundle extends Bundle { - public function getContainerExtension(): ?ExtensionInterface + public function getContainerExtension(): ExtensionInterface { return new WebauthnExtension('webauthn'); } diff --git a/src/webauthn/src/AttestationStatement/TPMAttestationStatementSupport.php b/src/webauthn/src/AttestationStatement/TPMAttestationStatementSupport.php index 4c7f08c47..c389cfc1a 100644 --- a/src/webauthn/src/AttestationStatement/TPMAttestationStatementSupport.php +++ b/src/webauthn/src/AttestationStatement/TPMAttestationStatementSupport.php @@ -41,9 +41,8 @@ final class TPMAttestationStatementSupport implements AttestationStatementSuppor private readonly ClockInterface $clock; - public function __construct( - null|ClockInterface $clock = null - ) { + public function __construct(null|ClockInterface $clock = null) + { $this->clock = $clock ?? new NativeClock(); $this->dispatcher = new NullEventDispatcher(); } diff --git a/src/webauthn/src/CeremonyStep/CeremonyStepManagerFactory.php b/src/webauthn/src/CeremonyStep/CeremonyStepManagerFactory.php index 3dfacefd4..bbdabb5b8 100644 --- a/src/webauthn/src/CeremonyStep/CeremonyStepManagerFactory.php +++ b/src/webauthn/src/CeremonyStep/CeremonyStepManagerFactory.php @@ -161,7 +161,7 @@ public function requestCeremony(): CeremonyStepManager $this->allowedOrigins === null ? new CheckOrigin( $this->securedRelyingPartyId ?? [] ) : new CheckAllowedOrigins($this->allowedOrigins, $this->allowSubdomains), - new CheckTopOrigin(null), + new CheckTopOrigin(), new CheckRelyingPartyIdIdHash(), new CheckUserWasPresent(), new CheckUserVerification(), diff --git a/src/webauthn/src/CeremonyStep/CheckClientDataCollectorType.php b/src/webauthn/src/CeremonyStep/CheckClientDataCollectorType.php index 1dd256c49..8a4f22fdc 100644 --- a/src/webauthn/src/CeremonyStep/CheckClientDataCollectorType.php +++ b/src/webauthn/src/CeremonyStep/CheckClientDataCollectorType.php @@ -16,9 +16,8 @@ { private ClientDataCollectorManager $clientDataCollectorManager; - public function __construct( - null|ClientDataCollectorManager $clientDataCollectorManager = null, - ) { + public function __construct(null|ClientDataCollectorManager $clientDataCollectorManager = null) + { $this->clientDataCollectorManager = $clientDataCollectorManager ?? new ClientDataCollectorManager([ new WebauthnAuthenticationCollector(), ]); diff --git a/src/webauthn/src/CeremonyStep/CheckSignature.php b/src/webauthn/src/CeremonyStep/CheckSignature.php index 0c51026e4..d9caa1c23 100644 --- a/src/webauthn/src/CeremonyStep/CheckSignature.php +++ b/src/webauthn/src/CeremonyStep/CheckSignature.php @@ -26,9 +26,8 @@ { private Manager $algorithmManager; - public function __construct( - null|Manager $algorithmManager = null, - ) { + public function __construct(null|Manager $algorithmManager = null) + { $this->algorithmManager = $algorithmManager ?? Manager::create()->add(ES256::create(), RS256::create()); } diff --git a/src/webauthn/src/MetadataService/Service/JsonMetadataService.php b/src/webauthn/src/MetadataService/Service/JsonMetadataService.php index 36cc68d43..5372ea063 100644 --- a/src/webauthn/src/MetadataService/Service/JsonMetadataService.php +++ b/src/webauthn/src/MetadataService/Service/JsonMetadataService.php @@ -30,10 +30,8 @@ final class JsonMetadataService implements MetadataService, CanDispatchEvents /** * @param string[] $statements */ - public function __construct( - array $statements, - ?SerializerInterface $serializer = null, - ) { + public function __construct(array $statements, ?SerializerInterface $serializer = null) + { $this->dispatcher = new NullEventDispatcher(); $this->serializer = $serializer ?? (new WebauthnSerializerFactory( AttestationStatementSupportManager::create() diff --git a/src/webauthn/src/MetadataService/Statement/DisplayPNGCharacteristicsDescriptor.php b/src/webauthn/src/MetadataService/Statement/DisplayPNGCharacteristicsDescriptor.php index d0ceeb359..38a32dfde 100644 --- a/src/webauthn/src/MetadataService/Statement/DisplayPNGCharacteristicsDescriptor.php +++ b/src/webauthn/src/MetadataService/Statement/DisplayPNGCharacteristicsDescriptor.php @@ -19,7 +19,9 @@ public function __construct( public readonly int $compression, public readonly int $filter, public readonly int $interlace, - /** @readonly */ + /** + * @readonly + */ public array $plte = [], ) { $width >= 0 || throw MetadataStatementLoadingException::create('Invalid width'); diff --git a/src/webauthn/src/MetadataService/Statement/VerificationMethodANDCombinations.php b/src/webauthn/src/MetadataService/Statement/VerificationMethodANDCombinations.php index 396e43800..edd24b2d3 100644 --- a/src/webauthn/src/MetadataService/Statement/VerificationMethodANDCombinations.php +++ b/src/webauthn/src/MetadataService/Statement/VerificationMethodANDCombinations.php @@ -10,7 +10,9 @@ class VerificationMethodANDCombinations * @param VerificationMethodDescriptor[] $verificationMethods */ public function __construct( - /** @readonly */ + /** + * @readonly + */ public array $verificationMethods = [] ) { } diff --git a/tests/MDS/Unit/BiometricAccuracyDescriptorObjectTest.php b/tests/MDS/Unit/BiometricAccuracyDescriptorObjectTest.php index 92a993480..13710a489 100644 --- a/tests/MDS/Unit/BiometricAccuracyDescriptorObjectTest.php +++ b/tests/MDS/Unit/BiometricAccuracyDescriptorObjectTest.php @@ -39,7 +39,7 @@ public function validObject( public static function validObjectData(): iterable { yield [ - BiometricAccuracyDescriptor::create(125.21, null, null, null, null), + BiometricAccuracyDescriptor::create(125.21, null, null), 125.21, null, null, @@ -48,7 +48,7 @@ public static function validObjectData(): iterable '{"selfAttestedFRR":125.21}', ]; yield [ - BiometricAccuracyDescriptor::create(125.21, 0.001, null, null, null), + BiometricAccuracyDescriptor::create(125.21, 0.001, null), 125.21, 0.001, null, @@ -57,7 +57,7 @@ public static function validObjectData(): iterable '{"selfAttestedFRR":125.21,"selfAttestedFAR":0.001}', ]; yield [ - BiometricAccuracyDescriptor::create(125.21, 0.001, 12.3, null, null), + BiometricAccuracyDescriptor::create(125.21, 0.001, 12.3), 125.21, 0.001, 12.3, @@ -66,7 +66,7 @@ public static function validObjectData(): iterable '{"selfAttestedFRR":125.21,"selfAttestedFAR":0.001,"maxTemplates":12.3}', ]; yield [ - BiometricAccuracyDescriptor::create(125.21, null, null, 50, null), + BiometricAccuracyDescriptor::create(125.21, null, null, 50), 125.21, null, null, diff --git a/tests/MDS/Unit/VerificationMethodANDCombinationsObjectTest.php b/tests/MDS/Unit/VerificationMethodANDCombinationsObjectTest.php index 84295f4d9..30cda678a 100644 --- a/tests/MDS/Unit/VerificationMethodANDCombinationsObjectTest.php +++ b/tests/MDS/Unit/VerificationMethodANDCombinationsObjectTest.php @@ -35,7 +35,7 @@ public static function validObjectData(): iterable VerificationMethodDescriptor::create( VerificationMethodDescriptor::USER_VERIFY_PATTERN_EXTERNAL, CodeAccuracyDescriptor::create(35, 5), - BiometricAccuracyDescriptor::create(0.12, null, null, null, null), + BiometricAccuracyDescriptor::create(0.12, null, null), PatternAccuracyDescriptor::create(50) ), VerificationMethodDescriptor::create(VerificationMethodDescriptor::USER_VERIFY_FINGERPRINT_INTERNAL), diff --git a/tests/MDS/Unit/VerificationMethodDescriptorObjectTest.php b/tests/MDS/Unit/VerificationMethodDescriptorObjectTest.php index e87862d0a..1306e8cec 100644 --- a/tests/MDS/Unit/VerificationMethodDescriptorObjectTest.php +++ b/tests/MDS/Unit/VerificationMethodDescriptorObjectTest.php @@ -30,19 +30,14 @@ public function validObject(VerificationMethodDescriptor $object, string $expect public static function validObjectData(): iterable { yield [ - VerificationMethodDescriptor::create( - VerificationMethodDescriptor::USER_VERIFY_FINGERPRINT_INTERNAL, - null, - null, - null - ), + VerificationMethodDescriptor::create(VerificationMethodDescriptor::USER_VERIFY_FINGERPRINT_INTERNAL), '{"userVerificationMethod":"fingerprint_internal"}', ]; yield [ VerificationMethodDescriptor::create( VerificationMethodDescriptor::USER_VERIFY_PATTERN_EXTERNAL, CodeAccuracyDescriptor::create(35, 5), - BiometricAccuracyDescriptor::create(0.12, null, null, null, null), + BiometricAccuracyDescriptor::create(0.12, null, null), PatternAccuracyDescriptor::create(50) ), '{"userVerificationMethod":"pattern_external","caDesc":{"base":35,"minLength":5},"baDesc":{"selfAttestedFRR":0.12},"paDesc":{"minComplexity":50}}', diff --git a/tests/library/Unit/AttestationStatement/AttestationObjectTest.php b/tests/library/Unit/AttestationStatement/AttestationObjectTest.php index ec129b4f1..4a60c14e0 100644 --- a/tests/library/Unit/AttestationStatement/AttestationObjectTest.php +++ b/tests/library/Unit/AttestationStatement/AttestationObjectTest.php @@ -20,7 +20,7 @@ final class AttestationObjectTest extends TestCase public function anAttestationObjectCanBeCreated(): void { $attestationStatement = AttestationStatement::create('', [], '', emptyTrustPath::create()); - $authenticatorData = AuthenticatorData::create('', '', '', 0, null, null); + $authenticatorData = AuthenticatorData::create('', '', '', 0); $object = AttestationObject::create('rawAttestationObject', $attestationStatement, $authenticatorData); diff --git a/tests/library/Unit/AttestationStatement/FidoU2FAttestationStatementSupportTest.php b/tests/library/Unit/AttestationStatement/FidoU2FAttestationStatementSupportTest.php index 47177f5c5..250665f4c 100644 --- a/tests/library/Unit/AttestationStatement/FidoU2FAttestationStatementSupportTest.php +++ b/tests/library/Unit/AttestationStatement/FidoU2FAttestationStatementSupportTest.php @@ -124,7 +124,7 @@ public function theAttestationStatementContain(): void ])) ); - $authenticatorData = AuthenticatorData::create('', 'FOO', '', 0, $attestedCredentialData, null); + $authenticatorData = AuthenticatorData::create('', 'FOO', '', 0, $attestedCredentialData); static::assertSame('fido-u2f', $support->name()); static::assertFalse($support->isValid('FOO', $attestationStatement, $authenticatorData)); diff --git a/tests/library/Unit/AttestationStatement/NoneAttestationStatementSupportTest.php b/tests/library/Unit/AttestationStatement/NoneAttestationStatementSupportTest.php index c58c01d40..a7ce5a6cb 100644 --- a/tests/library/Unit/AttestationStatement/NoneAttestationStatementSupportTest.php +++ b/tests/library/Unit/AttestationStatement/NoneAttestationStatementSupportTest.php @@ -22,7 +22,7 @@ public function theAttestationStatementIsNotValid(): void $support = new NoneAttestationStatementSupport(); $attestationStatement = AttestationStatement::create('none', [], '', EmptyTrustPath::create()); - $authenticatorData = AuthenticatorData::create('', '', '', 0, null, null); + $authenticatorData = AuthenticatorData::create('', '', '', 0); static::assertSame('none', $support->name()); static::assertTrue($support->isValid('FOO', $attestationStatement, $authenticatorData)); @@ -36,7 +36,7 @@ public function theAttestationStatementIsValid(): void $attestationStatement = AttestationStatement::create('none', [ 'x5c' => ['FOO'], ], '', EmptyTrustPath::create()); - $authenticatorData = AuthenticatorData::create('', '', '', 0, null, null); + $authenticatorData = AuthenticatorData::create('', '', '', 0); static::assertSame('none', $support->name()); static::assertFalse($support->isValid('FOO', $attestationStatement, $authenticatorData)); diff --git a/tests/library/Unit/AuthenticatorDataTest.php b/tests/library/Unit/AuthenticatorDataTest.php index 757ef1df9..8cddea76a 100644 --- a/tests/library/Unit/AuthenticatorDataTest.php +++ b/tests/library/Unit/AuthenticatorDataTest.php @@ -19,7 +19,7 @@ final class AuthenticatorDataTest extends TestCase #[Test] public function anAuthenticatorDataCanBeCreatedAndValueAccessed(): void { - $attestedCredentialData = AttestedCredentialData::create(Uuid::v4(), '', null); + $attestedCredentialData = AttestedCredentialData::create(Uuid::v4(), ''); $extensions = AuthenticationExtensions::create(); $authenticatorData = AuthenticatorData::create( diff --git a/tests/symfony/config/config.yml b/tests/symfony/config/config.yml index 48b8f2523..d6115f5ae 100644 --- a/tests/symfony/config/config.yml +++ b/tests/symfony/config/config.yml @@ -37,6 +37,7 @@ services: Symfony\Component\Serializer\Normalizer\ObjectNormalizer: tags: [ serializer.normalizer ] + autowire: true Webauthn\Tests\Bundle\Functional\MockClientCallback: ~ diff --git a/tests/symfony/functional/AppKernel.php b/tests/symfony/functional/AppKernel.php index da4f8faf5..ccc8d7352 100644 --- a/tests/symfony/functional/AppKernel.php +++ b/tests/symfony/functional/AppKernel.php @@ -16,9 +16,8 @@ final class AppKernel extends Kernel { - public function __construct( - string $environment, - ) { + public function __construct(string $environment) + { parent::__construct($environment, true); } diff --git a/tests/symfony/functional/Attestation/AdditionalAuthenticatorTest.php b/tests/symfony/functional/Attestation/AdditionalAuthenticatorTest.php index 4907532f2..046313851 100644 --- a/tests/symfony/functional/Attestation/AdditionalAuthenticatorTest.php +++ b/tests/symfony/functional/Attestation/AdditionalAuthenticatorTest.php @@ -24,7 +24,6 @@ use Webauthn\Tests\Bundle\Functional\PublicKeyCredentialSourceRepository; use Webauthn\Tests\Bundle\Functional\User; use Webauthn\Tests\Bundle\Functional\WebauthnTestCase; -use function assert; use function base64_decode; use function count; use const JSON_THROW_ON_ERROR; @@ -72,7 +71,7 @@ public function thePublicKeyCredentialDataCanBeLoaded(): void { $data = '{"id":"mMihuIx9LukswxBOMjMHDf6EAONOy7qdWhaQQ7dOtViR2cVB_MNbZxURi2cvgSvKSILb3mISe9lPNG9sYgojuY5iNinYOg6hRVxmm0VssuNG2pm1-RIuTF9DUtEJZEEK","type":"public-key","rawId":"mMihuIx9LukswxBOMjMHDf6EAONOy7qdWhaQQ7dOtViR2cVB/MNbZxURi2cvgSvKSILb3mISe9lPNG9sYgojuY5iNinYOg6hRVxmm0VssuNG2pm1+RIuTF9DUtEJZEEK","response":{"clientDataJSON":"eyJjaGFsbGVuZ2UiOiI5V3FncFJJWXZHTUNVWWlGVDIwbzFVN2hTRDE5M2sxMXp1NHRLUDd3UmNyRTI2enMxemM0TEh5UGludlBHUzg2d3U2YkR2cHdidDhYcDJiUTNWQlJTUSIsImNsaWVudEV4dGVuc2lvbnMiOnt9LCJoYXNoQWxnb3JpdGhtIjoiU0hBLTI1NiIsIm9yaWdpbiI6Imh0dHBzOi8vbG9jYWxob3N0Ojg0NDMiLCJ0eXBlIjoid2ViYXV0aG4uY3JlYXRlIn0","attestationObject":"o2NmbXRkbm9uZWdhdHRTdG10oGhhdXRoRGF0YVjkSZYN5YgOjGh0NBcPZHZgW4/krrmihjLHmVzzuoMdl2NBAAAAAAAAAAAAAAAAAAAAAAAAAAAAYJjIobiMfS7pLMMQTjIzBw3+hADjTsu6nVoWkEO3TrVYkdnFQfzDW2cVEYtnL4ErykiC295iEnvZTzRvbGIKI7mOYjYp2DoOoUVcZptFbLLjRtqZtfkSLkxfQ1LRCWRBCqUBAgMmIAEhWCAcPxwKyHADVjTgTsat4R/Jax6PWte50A8ZasMm4w6RxCJYILt0FCiGwC6rBrh3ySNy0yiUjZpNGAhW+aM9YYyYnUTJ"}}'; $serializer = static::getContainer()->get(SerializerInterface::class); - assert($serializer instanceof SerializerInterface); + static::assertInstanceOf(SerializerInterface::class, $serializer); $publicKeyCredential = $serializer->deserialize($data, PublicKeyCredential::class, 'json'); static::assertInstanceOf(PublicKeyCredential::class, $publicKeyCredential); diff --git a/tests/symfony/functional/MockClientCallback.php b/tests/symfony/functional/MockClientCallback.php index b699dc378..cafa017c0 100644 --- a/tests/symfony/functional/MockClientCallback.php +++ b/tests/symfony/functional/MockClientCallback.php @@ -18,7 +18,7 @@ final class MockClientCallback */ private array $responses = []; - public function __invoke(string $method, string $url): ?ResponseInterface + public function __invoke(string $method, string $url): ResponseInterface { $key = $method . '-' . $url; if (! isset($this->responses[$key])) { diff --git a/tests/symfony/functional/UserProvider.php b/tests/symfony/functional/UserProvider.php index e90353f25..4ec224acb 100644 --- a/tests/symfony/functional/UserProvider.php +++ b/tests/symfony/functional/UserProvider.php @@ -31,7 +31,7 @@ public function refreshUser(UserInterface $user): UserInterface return $this->loadUserByIdentifier($user->getUserIdentifier()); } - public function supportsClass($class): bool + public function supportsClass(string $class): bool { return $class === User::class || is_subclass_of($class, User::class); } diff --git a/tests/symfony/functional/WebauthnAuthenticator.php b/tests/symfony/functional/WebauthnAuthenticator.php index f7473cd02..214d3d87b 100644 --- a/tests/symfony/functional/WebauthnAuthenticator.php +++ b/tests/symfony/functional/WebauthnAuthenticator.php @@ -28,7 +28,7 @@ public function authenticate(Request $request): Passport ); } - public function onAuthenticationSuccess(Request $request, TokenInterface $token, string $firewallName): ?Response + public function onAuthenticationSuccess(Request $request, TokenInterface $token, string $firewallName): Response { return new JsonResponse([ 'success' => true, From 77b66508d338449b5ffa0d29399ff258b86add41 Mon Sep 17 00:00:00 2001 From: Florent Morselli Date: Sat, 20 Dec 2025 11:31:30 +0100 Subject: [PATCH 04/10] fix: use spomky-labs/pki-framework to replace native php openssl functions for attestation statements (backport to 5.2.x) (#790) * refactor: use spomky-labs/pki-framework to replace native php openssl functions for attestation statements * chore: apply code style fixes and update PHPStan baseline - Fix code style (ECS) in AndroidKey and Apple attestation statement supports - Regenerate PHPStan baseline to account for removed openssl_* function calls --------- Co-authored-by: zll600 <3400692417@qq.com> --- phpstan-baseline.neon | 42 ------- .../AndroidKeyAttestationStatementSupport.php | 92 ++++++++------- .../AppleAttestationStatementSupport.php | 76 +++++++----- .../PackedAttestationStatementSupport.php | 78 ++++++++----- .../TPMAttestationStatementSupport.php | 109 +++++++++--------- 5 files changed, 202 insertions(+), 195 deletions(-) diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index d72dbf52e..d26070934 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -1125,12 +1125,6 @@ parameters: count: 1 path: src/webauthn/src/AttestationStatement/AndroidKeyAttestationStatementSupport.php - - - rawMessage: 'Parameter #1 $data of static method SpomkyLabs\Pki\ASN1\Element::fromDER() expects string, mixed given.' - identifier: argument.type - count: 1 - path: src/webauthn/src/AttestationStatement/AndroidKeyAttestationStatementSupport.php - - rawMessage: 'Parameter #1 $data of static method Webauthn\MetadataService\CertificateChain\CertificateToolbox::convertAllDERToPEM() expects array, mixed given.' identifier: argument.type @@ -1143,12 +1137,6 @@ parameters: count: 1 path: src/webauthn/src/AttestationStatement/AndroidKeyAttestationStatementSupport.php - - - rawMessage: 'Parameter #1 $key of function openssl_pkey_get_details expects OpenSSLAsymmetricKey, OpenSSLAsymmetricKey|false given.' - identifier: argument.type - count: 1 - path: src/webauthn/src/AttestationStatement/AndroidKeyAttestationStatementSupport.php - - rawMessage: 'Parameter #2 $array of function array_key_exists expects array, mixed given.' identifier: argument.type @@ -1167,12 +1155,6 @@ parameters: count: 1 path: src/webauthn/src/AttestationStatement/AndroidKeyAttestationStatementSupport.php - - - rawMessage: Cannot cast mixed to string. - identifier: cast.string - count: 1 - path: src/webauthn/src/AttestationStatement/AppleAttestationStatementSupport.php - - rawMessage: 'Parameter #1 $data of static method Cose\Key\Key::createFromData() expects array, mixed given.' identifier: argument.type @@ -1191,12 +1173,6 @@ parameters: count: 1 path: src/webauthn/src/AttestationStatement/AppleAttestationStatementSupport.php - - - rawMessage: 'Parameter #1 $key of function openssl_pkey_get_details expects OpenSSLAsymmetricKey, OpenSSLAsymmetricKey|false given.' - identifier: argument.type - count: 1 - path: src/webauthn/src/AttestationStatement/AppleAttestationStatementSupport.php - - rawMessage: 'Parameter #2 $array of function array_key_exists expects array, mixed given.' identifier: argument.type @@ -1293,12 +1269,6 @@ parameters: count: 3 path: src/webauthn/src/AttestationStatement/PackedAttestationStatementSupport.php - - - rawMessage: Cannot cast mixed to string. - identifier: cast.string - count: 1 - path: src/webauthn/src/AttestationStatement/PackedAttestationStatementSupport.php - - rawMessage: 'Parameter #1 $data of static method Webauthn\MetadataService\CertificateChain\CertificateToolbox::convertAllDERToPEM() expects array, array given.' identifier: argument.type @@ -1347,12 +1317,6 @@ parameters: count: 1 path: src/webauthn/src/AttestationStatement/PackedAttestationStatementSupport.php - - - rawMessage: 'Parameter #2 $user_string of function hash_equals expects string, mixed given.' - identifier: argument.type - count: 1 - path: src/webauthn/src/AttestationStatement/PackedAttestationStatementSupport.php - - rawMessage: Cannot access offset 'certInfo' on mixed. identifier: offsetAccess.nonOffsetAccessible @@ -1473,12 +1437,6 @@ parameters: count: 1 path: src/webauthn/src/AttestationStatement/TPMAttestationStatementSupport.php - - - rawMessage: 'Parameter #2 $user_string of function hash_equals expects string, mixed given.' - identifier: argument.type - count: 1 - path: src/webauthn/src/AttestationStatement/TPMAttestationStatementSupport.php - - rawMessage: 'Parameter #1 $callback of function array_map expects (callable(mixed, int|string): mixed)|null, Closure(mixed, string): Webauthn\AuthenticationExtensions\AuthenticationExtension given.' identifier: argument.type diff --git a/src/webauthn/src/AttestationStatement/AndroidKeyAttestationStatementSupport.php b/src/webauthn/src/AttestationStatement/AndroidKeyAttestationStatementSupport.php index 002423545..873b2e24e 100644 --- a/src/webauthn/src/AttestationStatement/AndroidKeyAttestationStatementSupport.php +++ b/src/webauthn/src/AttestationStatement/AndroidKeyAttestationStatementSupport.php @@ -14,6 +14,9 @@ use SpomkyLabs\Pki\ASN1\Type\Constructed\Sequence; use SpomkyLabs\Pki\ASN1\Type\Primitive\OctetString; use SpomkyLabs\Pki\ASN1\Type\Tagged\ExplicitTagging; +use SpomkyLabs\Pki\CryptoEncoding\PEM; +use SpomkyLabs\Pki\X509\Certificate\Certificate; +use SpomkyLabs\Pki\X509\Certificate\Extension\UnknownExtension; use Webauthn\AuthenticatorData; use Webauthn\Event\AttestationStatementLoaded; use Webauthn\Event\CanDispatchEvents; @@ -26,13 +29,19 @@ use Webauthn\TrustPath\CertificateTrustPath; use function array_key_exists; use function count; -use function is_array; -use function openssl_pkey_get_public; use function openssl_verify; use function sprintf; final class AndroidKeyAttestationStatementSupport implements AttestationStatementSupport, CanDispatchEvents { + private const OID_ANDROID = '1.3.6.1.4.1.11129.2.1.17'; + + /** + * Tag 600 (allApplications) + * @see https://source.android.com/docs/security/features/keystore/attestation#version-1 + */ + private const ANDROID_TAG_ALL_APPLICATIONS = 600; + private readonly Decoder $decoder; private EventDispatcherInterface $dispatcher; @@ -117,17 +126,14 @@ public function isValid( ) === 1; } + /** + * @see https://www.w3.org/TR/webauthn-3/#sctn-android-key-attestation + */ private function checkCertificate( string $certificate, string $clientDataHash, AuthenticatorData $authenticatorData ): void { - $resource = openssl_pkey_get_public($certificate); - $details = openssl_pkey_get_details($resource); - is_array($details) || throw AttestationStatementVerificationException::create( - 'Unable to read the certificate' - ); - //Check that authData publicKey matches the public key in the attestation certificate $attestedCredentialData = $authenticatorData->attestedCredentialData; $attestedCredentialData !== null || throw AttestationStatementVerificationException::create( @@ -148,45 +154,45 @@ private function checkCertificate( ); $publicDataStream->close(); $publicKey = Key::createFromData($coseKey->normalize()); - ($publicKey instanceof Ec2Key) || ($publicKey instanceof RsaKey) || throw AttestationStatementVerificationException::create( 'Unsupported key type' ); - $publicKey->asPEM() === $details['key'] || throw AttestationStatementVerificationException::create( - 'Invalid key' - ); /*---------------------------*/ - $certDetails = openssl_x509_parse($certificate); - - //Find Android KeyStore Extension with OID "1.3.6.1.4.1.11129.2.1.17" in certificate extensions - is_array( - $certDetails - ) || throw AttestationStatementVerificationException::create('The certificate is not valid'); - array_key_exists('extensions', $certDetails) || throw AttestationStatementVerificationException::create( - 'The certificate has no extension' - ); - is_array($certDetails['extensions']) || throw AttestationStatementVerificationException::create( - 'The certificate has no extension' - ); - array_key_exists( - '1.3.6.1.4.1.11129.2.1.17', - $certDetails['extensions'] - ) || throw AttestationStatementVerificationException::create( - 'The certificate extension "1.3.6.1.4.1.11129.2.1.17" is missing' - ); - $extension = $certDetails['extensions']['1.3.6.1.4.1.11129.2.1.17']; - $extensionAsAsn1 = Sequence::fromDER($extension); - $extensionAsAsn1->has(4); + /** + * @see https://w3c.github.io/webauthn/#sctn-key-attstn-cert-requirements + * @see https://source.android.com/docs/security/features/keystore/attestation#attestation-certificate + */ + $cert = Certificate::fromPEM(PEM::fromString($certificate)); + //We check the attested key corresponds to the key in the certificate + PEM::fromString($publicKey->asPEM())->string() === $cert->tbsCertificate() + ->subjectPublicKeyInfo() + ->toPEM() + ->string() || throw AttestationStatementVerificationException::create('Invalid key'); + + $extensions = $cert->tbsCertificate() + ->extensions(); + + //Find Android KeyStore Extension with OID self::OID_ANDROID in certificate extensions + $extensions->has(self::OID_ANDROID) || throw AttestationStatementVerificationException::create( + 'The certificate extension "' . self::OID_ANDROID . '" is missing' + ); + /** @var UnknownExtension $androidExtension */ + $androidExtension = $extensions->get(self::OID_ANDROID); + /** + * Parse the Android extension value structure + * @see https://source.android.com/docs/security/features/keystore/attestation#attestation-extension + */ + $extensionAsAsn1 = Sequence::fromDER($androidExtension->extensionValue()); //Check that attestationChallenge is set to the clientDataHash. $extensionAsAsn1->has(4) || throw AttestationStatementVerificationException::create( - 'The certificate extension "1.3.6.1.4.1.11129.2.1.17" is invalid' + 'The attestationChallenge field is missing' ); $ext = $extensionAsAsn1->at(4) ->asElement(); $ext instanceof OctetString || throw AttestationStatementVerificationException::create( - 'The certificate extension "1.3.6.1.4.1.11129.2.1.17" is invalid' + 'The attestationChallenge field must be an OctetString' ); $clientDataHash === $ext->string() || throw AttestationStatementVerificationException::create( 'The client data hash is not valid' @@ -194,23 +200,23 @@ private function checkCertificate( //Check that both teeEnforced and softwareEnforced structures don't contain allApplications(600) tag. $extensionAsAsn1->has(6) || throw AttestationStatementVerificationException::create( - 'The certificate extension "1.3.6.1.4.1.11129.2.1.17" is invalid' + 'The softwareEnforced field is missing' ); $softwareEnforcedFlags = $extensionAsAsn1->at(6) ->asElement(); $softwareEnforcedFlags instanceof Sequence || throw AttestationStatementVerificationException::create( - 'The certificate extension "1.3.6.1.4.1.11129.2.1.17" is invalid' + 'The softwareEnforced field must be a Sequence' ); $this->checkAbsenceOfAllApplicationsTag($softwareEnforcedFlags); $extensionAsAsn1->has(7) || throw AttestationStatementVerificationException::create( - 'The certificate extension "1.3.6.1.4.1.11129.2.1.17" is invalid' + 'The teeEnforced field is missing' ); $teeEnforcedFlags = $extensionAsAsn1->at(7) ->asElement(); $teeEnforcedFlags instanceof Sequence || throw AttestationStatementVerificationException::create( - 'The certificate extension "1.3.6.1.4.1.11129.2.1.17" is invalid' + 'The teeEnforced field must be a Sequence' ); $this->checkAbsenceOfAllApplicationsTag($teeEnforcedFlags); } @@ -218,11 +224,13 @@ private function checkCertificate( private function checkAbsenceOfAllApplicationsTag(Sequence $sequence): void { foreach ($sequence->elements() as $tag) { - $tag->asElement() instanceof ExplicitTagging || throw AttestationStatementVerificationException::create( + $element = $tag->asElement(); + $element instanceof ExplicitTagging || throw AttestationStatementVerificationException::create( 'Invalid tag' ); - $tag->asElement() - ->tag() !== 600 || throw AttestationStatementVerificationException::create('Forbidden tag 600 found'); + $element->tag() !== self::ANDROID_TAG_ALL_APPLICATIONS || throw AttestationStatementVerificationException::create( + 'The allApplications tag (' . self::ANDROID_TAG_ALL_APPLICATIONS . ') is forbidden - key must be bound to specific application' + ); } } } diff --git a/src/webauthn/src/AttestationStatement/AppleAttestationStatementSupport.php b/src/webauthn/src/AttestationStatement/AppleAttestationStatementSupport.php index e57c33830..79f0a443c 100644 --- a/src/webauthn/src/AttestationStatement/AppleAttestationStatementSupport.php +++ b/src/webauthn/src/AttestationStatement/AppleAttestationStatementSupport.php @@ -10,6 +10,12 @@ use Cose\Key\Key; use Cose\Key\RsaKey; use Psr\EventDispatcher\EventDispatcherInterface; +use SpomkyLabs\Pki\ASN1\Type\Constructed\Sequence; +use SpomkyLabs\Pki\ASN1\Type\Primitive\OctetString; +use SpomkyLabs\Pki\ASN1\Type\Tagged\ExplicitTagging; +use SpomkyLabs\Pki\CryptoEncoding\PEM; +use SpomkyLabs\Pki\X509\Certificate\Certificate; +use SpomkyLabs\Pki\X509\Certificate\Extension\UnknownExtension; use Webauthn\AuthenticatorData; use Webauthn\Event\AttestationStatementLoaded; use Webauthn\Event\CanDispatchEvents; @@ -22,11 +28,11 @@ use Webauthn\TrustPath\CertificateTrustPath; use function array_key_exists; use function count; -use function is_array; -use function openssl_pkey_get_public; final class AppleAttestationStatementSupport implements AttestationStatementSupport, CanDispatchEvents { + private const OID_APPLE = '1.2.840.113635.100.8.2'; + private readonly Decoder $decoder; private EventDispatcherInterface $dispatcher; @@ -105,17 +111,14 @@ public function isValid( return true; } + /** + * @see https://www.w3.org/TR/webauthn-3/#sctn-apple-anonymous-attestation + */ private function checkCertificateAndGetPublicKey( string $certificate, string $clientDataHash, AuthenticatorData $authenticatorData ): void { - $resource = openssl_pkey_get_public($certificate); - $details = openssl_pkey_get_details($resource); - is_array($details) || throw AttestationStatementVerificationException::create( - 'Unable to read the certificate' - ); - //Check that authData publicKey matches the public key in the attestation certificate $attestedCredentialData = $authenticatorData->attestedCredentialData; $attestedCredentialData !== null || throw AttestationStatementVerificationException::create( @@ -140,38 +143,49 @@ private function checkCertificateAndGetPublicKey( 'Unsupported key type' ); + /*---------------------------*/ + $cert = Certificate::fromPEM(PEM::fromString($certificate)); + //We check the attested key corresponds to the key in the certificate - $publicKey->asPEM() === $details['key'] || throw AttestationStatementVerificationException::create( - 'Invalid key' - ); + PEM::fromString($publicKey->asPEM())->string() === $cert->tbsCertificate() + ->subjectPublicKeyInfo() + ->toPEM() + ->string() || throw AttestationStatementVerificationException::create('Invalid key'); - /*---------------------------*/ - $certDetails = openssl_x509_parse($certificate); + $extensions = $cert->tbsCertificate() + ->extensions(); //Find Apple Extension with OID "1.2.840.113635.100.8.2" in certificate extensions - is_array( - $certDetails - ) || throw AttestationStatementVerificationException::create('The certificate is not valid'); - array_key_exists('extensions', $certDetails) || throw AttestationStatementVerificationException::create( - 'The certificate has no extension' + $extensions->has(self::OID_APPLE) || throw AttestationStatementVerificationException::create( + 'The certificate extension "' . self::OID_APPLE . '" is missing' ); - is_array($certDetails['extensions']) || throw AttestationStatementVerificationException::create( - 'The certificate has no extension' + /** @var UnknownExtension $appleExtension */ + $appleExtension = $extensions->get(self::OID_APPLE); + $extensionSequence = Sequence::fromDER($appleExtension->extensionValue()); + $extensionSequence->has(0) || throw AttestationStatementVerificationException::create( + 'The certificate extension "' . self::OID_APPLE . '" is message' ); - array_key_exists( - '1.2.840.113635.100.8.2', - $certDetails['extensions'] - ) || throw AttestationStatementVerificationException::create( - 'The certificate extension "1.2.840.113635.100.8.2" is missing' + $firstExtension = $extensionSequence->at(0); + $firstExtension->isTagged() || throw AttestationStatementVerificationException::create( + 'The certificate extension "' . self::OID_APPLE . '" is invalid' ); - $extension = $certDetails['extensions']['1.2.840.113635.100.8.2']; + $taggedExtension = $firstExtension->asTagged() + ->asElement(); + $taggedExtension instanceof ExplicitTagging || throw AttestationStatementVerificationException::create( + 'The certificate extension "' . self::OID_APPLE . '" is invalid' + ); + $explicitExtension = $taggedExtension->explicit() + ->asElement(); + $explicitExtension instanceof OctetString || throw AttestationStatementVerificationException::create( + 'The certificate extension "' . self::OID_APPLE . '" is invalid' + ); + $extensionData = $explicitExtension->string(); $nonceToHash = $authenticatorData->authData . $clientDataHash; - $nonce = hash('sha256', $nonceToHash); + $nonce = hash('sha256', $nonceToHash, true); - //'3024a1220420' corresponds to the Sequence+Explicitly Tagged Object + Octet Object - '3024a1220420' . $nonce === bin2hex( - (string) $extension - ) || throw AttestationStatementVerificationException::create('The client data hash is not valid'); + hash_equals($nonce, $extensionData) || throw AttestationStatementVerificationException::create( + 'The client data hash is not valid' + ); } } diff --git a/src/webauthn/src/AttestationStatement/PackedAttestationStatementSupport.php b/src/webauthn/src/AttestationStatement/PackedAttestationStatementSupport.php index ec967e0c6..78c12ab4c 100644 --- a/src/webauthn/src/AttestationStatement/PackedAttestationStatementSupport.php +++ b/src/webauthn/src/AttestationStatement/PackedAttestationStatementSupport.php @@ -11,6 +11,13 @@ use Cose\Algorithms; use Cose\Key\Key; use Psr\EventDispatcher\EventDispatcherInterface; +use SpomkyLabs\Pki\ASN1\Type\Primitive\OctetString; +use SpomkyLabs\Pki\ASN1\Type\UnspecifiedType; +use SpomkyLabs\Pki\CryptoEncoding\PEM; +use SpomkyLabs\Pki\X501\ASN1\AttributeType; +use SpomkyLabs\Pki\X509\Certificate\Certificate; +use SpomkyLabs\Pki\X509\Certificate\Extension\UnknownExtension; +use SpomkyLabs\Pki\X509\Certificate\TBSCertificate; use Webauthn\AuthenticatorData; use Webauthn\Event\AttestationStatementLoaded; use Webauthn\Event\CanDispatchEvents; @@ -26,13 +33,14 @@ use Webauthn\Util\CoseSignatureFixer; use function array_key_exists; use function count; -use function in_array; use function is_array; use function is_string; use function openssl_verify; final class PackedAttestationStatementSupport implements AttestationStatementSupport, CanDispatchEvents { + private const OID_FIDO_GEN_CE_AAGUID = '1.3.6.1.4.1.45724.1.1.4'; + private readonly Decoder $decoder; private EventDispatcherInterface $dispatcher; @@ -148,45 +156,48 @@ private function loadEmptyType(array $attestation): AttestationStatement return $attestationStatement; } + // https://www.w3.org/TR/webauthn-3/#sctn-packed-attestation-cert-requirements private function checkCertificate(string $attestnCert, AuthenticatorData $authenticatorData): void { - $parsed = openssl_x509_parse($attestnCert); - is_array($parsed) || throw AttestationStatementVerificationException::create('Invalid certificate'); + $certificate = Certificate::fromPEM(PEM::fromString($attestnCert)); + $tbsCertificate = $certificate->tbsCertificate(); - //Check version - isset($parsed['version']) || throw AttestationStatementVerificationException::create( - 'Invalid certificate version' - ); - $parsed['version'] === 2 || throw AttestationStatementVerificationException::create( + //Check version (X.509 version 3 is encoded as 2) + $tbsCertificate->version() === TBSCertificate::VERSION_3 || throw AttestationStatementVerificationException::create( 'Invalid certificate version' ); //Check subject field - isset($parsed['name']) || throw AttestationStatementVerificationException::create( - 'Invalid certificate name. The Subject Organization Unit must be "Authenticator Attestation"' - ); - str_contains( - (string) $parsed['name'], - '/OU=Authenticator Attestation' - ) || throw AttestationStatementVerificationException::create( + $subject = $tbsCertificate->subject(); + $subject->countOfType( + AttributeType::OID_COUNTRY_NAME + ) > 0 || throw AttestationStatementVerificationException::create('Certificate Subject-C must be set'); + $subject->countOfType( + AttributeType::OID_ORGANIZATION_NAME + ) > 0 || throw AttestationStatementVerificationException::create('Certificate Subject-O must be set'); + $subject->countOfType( + AttributeType::OID_ORGANIZATIONAL_UNIT_NAME + ) > 0 || throw AttestationStatementVerificationException::create('Certificate Subject-OU must be set'); + $subject->countOfType( + AttributeType::OID_COMMON_NAME + ) > 0 || throw AttestationStatementVerificationException::create('Certificate Subject-CN must be set'); + $ouValue = $subject->firstValueOf('OU') + ->stringValue(); + $ouValue === 'Authenticator Attestation' || throw AttestationStatementVerificationException::create( 'Invalid certificate name. The Subject Organization Unit must be "Authenticator Attestation"' ); //Check extensions - isset($parsed['extensions']) || throw AttestationStatementVerificationException::create( - 'Certificate extensions are missing' - ); - is_array($parsed['extensions']) || throw AttestationStatementVerificationException::create( - 'Certificate extensions are missing' - ); + $extensions = $tbsCertificate->extensions(); //Check certificate is not a CA cert - isset($parsed['extensions']['basicConstraints']) || throw AttestationStatementVerificationException::create( - 'The Basic Constraints extension must have the CA component set to false' - ); - $parsed['extensions']['basicConstraints'] === 'CA:FALSE' || throw AttestationStatementVerificationException::create( + $extensions->hasBasicConstraints() || throw AttestationStatementVerificationException::create( 'The Basic Constraints extension must have the CA component set to false' ); + ! $extensions->basicConstraints() + ->isCA() || throw AttestationStatementVerificationException::create( + 'The Basic Constraints extension must have the CA component set to false' + ); $attestedCredentialData = $authenticatorData->attestedCredentialData; $attestedCredentialData !== null || throw AttestationStatementVerificationException::create( @@ -194,13 +205,24 @@ private function checkCertificate(string $attestnCert, AuthenticatorData $authen ); // id-fido-gen-ce-aaguid OID check - if (in_array('1.3.6.1.4.1.45724.1.1.4', $parsed['extensions'], true)) { + if ($extensions->has(self::OID_FIDO_GEN_CE_AAGUID)) { + /** @var UnknownExtension $aaguidExtension */ + $aaguidExtension = $extensions->get(self::OID_FIDO_GEN_CE_AAGUID); + ! $aaguidExtension->isCritical() || throw AttestationStatementVerificationException::create( + 'Extension ' . self::OID_FIDO_GEN_CE_AAGUID . ' must not be marked as critical' + ); + + $aaguidElement = UnspecifiedType::fromDER($aaguidExtension->extensionValue())->asElement(); + $aaguidElement instanceof OctetString || throw AttestationStatementVerificationException::create( + 'Invalid ' . self::OID_FIDO_GEN_CE_AAGUID . ' extension format' + ); + $aaguidValue = $aaguidElement->string(); hash_equals( $attestedCredentialData->aaguid ->toBinary(), - $parsed['extensions']['1.3.6.1.4.1.45724.1.1.4'] + $aaguidValue ) || throw AttestationStatementVerificationException::create( - 'The value of the "aaguid" does not match with the certificate' + 'The value of the "aaguid" does not match with the certificate extension ' . self::OID_FIDO_GEN_CE_AAGUID ); } } diff --git a/src/webauthn/src/AttestationStatement/TPMAttestationStatementSupport.php b/src/webauthn/src/AttestationStatement/TPMAttestationStatementSupport.php index c389cfc1a..5a38f84ac 100644 --- a/src/webauthn/src/AttestationStatement/TPMAttestationStatementSupport.php +++ b/src/webauthn/src/AttestationStatement/TPMAttestationStatementSupport.php @@ -15,6 +15,12 @@ use ParagonIE\ConstantTime\Base64UrlSafe; use Psr\Clock\ClockInterface; use Psr\EventDispatcher\EventDispatcherInterface; +use SpomkyLabs\Pki\ASN1\Type\Primitive\OctetString; +use SpomkyLabs\Pki\ASN1\Type\UnspecifiedType; +use SpomkyLabs\Pki\CryptoEncoding\PEM; +use SpomkyLabs\Pki\X509\Certificate\Certificate; +use SpomkyLabs\Pki\X509\Certificate\Extension\UnknownExtension; +use SpomkyLabs\Pki\X509\Certificate\TBSCertificate; use Symfony\Component\Clock\NativeClock; use Webauthn\AuthenticatorData; use Webauthn\Event\AttestationStatementLoaded; @@ -28,15 +34,16 @@ use Webauthn\TrustPath\CertificateTrustPath; use function array_key_exists; use function count; -use function in_array; -use function is_array; -use function is_int; use function openssl_verify; use function sprintf; use function unpack; final class TPMAttestationStatementSupport implements AttestationStatementSupport, CanDispatchEvents { + private const OID_FIDO_GEN_CE_AAGUID = '1.3.6.1.4.1.45724.1.1.4'; + + private const OID_AIK_CERTIFICATE = '2.23.133.8.3'; + private EventDispatcherInterface $dispatcher; private readonly ClockInterface $clock; @@ -348,77 +355,75 @@ private function processWithCertificate( return $result === 1; } + // https://www.w3.org/TR/webauthn-3/#sctn-tpm-cert-requirements private function checkCertificate(string $attestnCert, AuthenticatorData $authenticatorData): void { - $parsed = openssl_x509_parse($attestnCert); - is_array($parsed) || throw AttestationStatementVerificationException::create('Invalid certificate'); + $certificate = Certificate::fromPEM(PEM::fromString($attestnCert)); + $tbsCertificate = $certificate->tbsCertificate(); - //Check version - (isset($parsed['version']) && $parsed['version'] === 2) || throw AttestationStatementVerificationException::create( + // Version MUST be set to 3 (X.509 version 3 is encoded as 2) + $tbsCertificate->version() === TBSCertificate::VERSION_3 || throw AttestationStatementVerificationException::create( 'Invalid certificate version' ); - //Check subject field is empty - isset($parsed['subject']) || throw AttestationStatementVerificationException::create( - 'Invalid certificate name. The Subject should be empty' - ); - is_array($parsed['subject']) || throw AttestationStatementVerificationException::create( - 'Invalid certificate name. The Subject should be empty' - ); - count($parsed['subject']) === 0 || throw AttestationStatementVerificationException::create( - 'Invalid certificate name. The Subject should be empty' - ); + // Subject field MUST be set to empty + $tbsCertificate->subject() + ->count() === 0 || throw AttestationStatementVerificationException::create( + 'Invalid certificate name. The Subject should be empty' + ); // Check period of validity - array_key_exists( - 'validFrom_time_t', - $parsed - ) || throw AttestationStatementVerificationException::create('Invalid certificate start date.'); - is_int($parsed['validFrom_time_t']) || throw AttestationStatementVerificationException::create( - 'Invalid certificate start date.' - ); - $startDate = (new DateTimeImmutable('now'))->setTimestamp($parsed['validFrom_time_t']); + $validity = $tbsCertificate->validity(); + $startDate = DateTimeImmutable::createFromInterface($validity->notBefore()->dateTime()); $startDate < $this->clock->now() || throw AttestationStatementVerificationException::create( 'Invalid certificate start date.' ); - array_key_exists('validTo_time_t', $parsed) || throw AttestationStatementVerificationException::create( - 'Invalid certificate end date.' - ); - is_int($parsed['validTo_time_t']) || throw AttestationStatementVerificationException::create( - 'Invalid certificate end date.' - ); - $endDate = (new DateTimeImmutable('now'))->setTimestamp($parsed['validTo_time_t']); + $endDate = DateTimeImmutable::createFromInterface($validity->notAfter()->dateTime()); $endDate > $this->clock->now() || throw AttestationStatementVerificationException::create( 'Invalid certificate end date.' ); - //Check extensions - (isset($parsed['extensions']) && is_array( - $parsed['extensions'] - )) || throw AttestationStatementVerificationException::create('Certificate extensions are missing'); + // Check extensions + $extensions = $tbsCertificate->extensions(); - //Check subjectAltName - isset($parsed['extensions']['subjectAltName']) || throw AttestationStatementVerificationException::create( - 'The "subjectAltName" is missing' + // Check Subject Alternative Name extension + $extensions->hasSubjectAlternativeName() || throw AttestationStatementVerificationException::create( + 'The Subject Alternative Name extension must be set' ); - //Check extendedKeyUsage - isset($parsed['extensions']['extendedKeyUsage']) || throw AttestationStatementVerificationException::create( - 'The "subjectAltName" is missing' + // Check Extended Key Usage extension MUST contain the OID 2.23.133.8.3 + $extensions->hasExtendedKeyUsage() || throw AttestationStatementVerificationException::create( + 'The Extended Key Usage extensions must contain ' . self::OID_AIK_CERTIFICATE, ); - $parsed['extensions']['extendedKeyUsage'] === '2.23.133.8.3' || throw AttestationStatementVerificationException::create( - 'The "extendedKeyUsage" is invalid' + $extendedKeyUsage = $extensions->extendedKeyUsage(); + $extendedKeyUsage->has(self::OID_AIK_CERTIFICATE) || throw AttestationStatementVerificationException::create( + 'The Extended Key Usage extensions must contain ' . self::OID_AIK_CERTIFICATE, ); + // The Basic Constraints extension MUST have the CA component set to false. + $extensions->basicConstraints() + ->isCA() === false || throw AttestationStatementVerificationException::create( + 'The Basic Constraints extension must have the CA component set to false' + ); + // id-fido-gen-ce-aaguid OID check - in_array('1.3.6.1.4.1.45724.1.1.4', $parsed['extensions'], true) && ! hash_equals( - $authenticatorData->attestedCredentialData - ?->aaguid - ->toBinary() ?? '', - $parsed['extensions']['1.3.6.1.4.1.45724.1.1.4'] - ) && throw AttestationStatementVerificationException::create( - 'The value of the "aaguid" does not match with the certificate' - ); + if ($extensions->has(self::OID_FIDO_GEN_CE_AAGUID)) { + /** @var UnknownExtension $aaguidExtension */ + $aaguidExtension = $extensions->get(self::OID_FIDO_GEN_CE_AAGUID); + $aaguidElement = UnspecifiedType::fromDER($aaguidExtension->extensionValue())->asElement(); + $aaguidElement instanceof OctetString || throw AttestationStatementVerificationException::create( + 'Invalid ' . self::OID_FIDO_GEN_CE_AAGUID . ' extension format' + ); + $aaguidValue = $aaguidElement->string(); + hash_equals( + $authenticatorData->attestedCredentialData + ?->aaguid + ->toBinary() ?? '', + $aaguidValue + ) || throw AttestationStatementVerificationException::create( + 'The value of the "aaguid" does not match with the certificate' + ); + } } } From 2121ea6268c0c6f2608f0f6694020dd7e9d601c9 Mon Sep 17 00:00:00 2001 From: Florent Morselli Date: Sat, 20 Dec 2025 14:49:22 +0100 Subject: [PATCH 05/10] test: refactor PhpCertificateChainValidatorTest for improved readability and consistency --- phpstan-baseline.neon | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 phpstan-baseline.neon diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon deleted file mode 100644 index e69de29bb..000000000 From 62150383c73139e4fe37564c9bfa5e86d6aec729 Mon Sep 17 00:00:00 2001 From: Florent Morselli Date: Sat, 20 Dec 2025 14:58:13 +0100 Subject: [PATCH 06/10] refactor: remove unused methods and clean up phpstan baseline --- .ci-tools/phpstan-baseline.neon | 90 ++----------------- .ci-tools/rector.php | 2 - .../CeremonyStepManagerFactory.php | 22 ----- tests/symfony/functional/User.php | 4 - 4 files changed, 6 insertions(+), 112 deletions(-) diff --git a/.ci-tools/phpstan-baseline.neon b/.ci-tools/phpstan-baseline.neon index 108c64340..a678d9fc6 100644 --- a/.ci-tools/phpstan-baseline.neon +++ b/.ci-tools/phpstan-baseline.neon @@ -1,41 +1,11 @@ parameters: ignoreErrors: - - - rawMessage: Binary operation "." between mixed and '/Resources/config…' results in an error. - identifier: binaryOp.invalid - count: 1 - path: ../src/stimulus/src/WebauthnStimulusBundle.php - - - - rawMessage: Cannot access offset 'path' on mixed. - identifier: offsetAccess.nonOffsetAccessible - count: 1 - path: ../src/stimulus/src/WebauthnStimulusBundle.php - - rawMessage: Class "Webauthn\Stimulus\WebauthnStimulusBundle" is not allowed to extend "Symfony\Component\HttpKernel\Bundle\AbstractBundle". identifier: ergebnis.noExtends count: 1 path: ../src/stimulus/src/WebauthnStimulusBundle.php - - - rawMessage: 'Language construct isset() should not be used.' - identifier: ergebnis.noIsset - count: 1 - path: ../src/stimulus/src/WebauthnStimulusBundle.php - - - - rawMessage: 'Method Webauthn\Stimulus\WebauthnStimulusBundle::isAssetMapperAvailable() has a parameter $container with a type declaration of Symfony\Component\DependencyInjection\ContainerBuilder, but containers should not be injected.' - identifier: ergebnis.noParameterWithContainerTypeDeclaration - count: 1 - path: ../src/stimulus/src/WebauthnStimulusBundle.php - - - - rawMessage: 'Method Webauthn\Stimulus\WebauthnStimulusBundle::prependExtension() has a parameter $builder with a type declaration of Symfony\Component\DependencyInjection\ContainerBuilder, but containers should not be injected.' - identifier: ergebnis.noParameterWithContainerTypeDeclaration - count: 1 - path: ../src/stimulus/src/WebauthnStimulusBundle.php - - rawMessage: 'Method Webauthn\Bundle\Controller\AssertionControllerFactory::createRequestController() has parameter $optionStorage with a nullable type declaration.' identifier: ergebnis.noParameterWithNullableTypeDeclaration @@ -615,6 +585,12 @@ parameters: count: 14 path: ../src/symfony/src/DependencyInjection/Factory/Security/WebauthnFactory.php + - + rawMessage: 'Method Webauthn\Bundle\DependencyInjection\Factory\Security\WebauthnFactory::addConfiguration() has parameter $builder with generic class Symfony\Component\Config\Definition\Builder\NodeDefinition but does not specify its types: TParent' + identifier: missingType.generics + count: 1 + path: ../src/symfony/src/DependencyInjection/Factory/Security/WebauthnFactory.php + - rawMessage: 'Method Webauthn\Bundle\DependencyInjection\Factory\Security\WebauthnFactory::createAssertionControllersAndRoutes() has a parameter $container with a type declaration of Symfony\Component\DependencyInjection\ContainerBuilder, but containers should not be injected.' identifier: ergebnis.noParameterWithContainerTypeDeclaration @@ -3105,12 +3081,6 @@ parameters: count: 1 path: ../src/webauthn/src/AttestationStatement/AndroidKeyAttestationStatementSupport.php - - - rawMessage: 'Parameter #1 $data of static method SpomkyLabs\Pki\ASN1\Element::fromDER() expects string, mixed given.' - identifier: argument.type - count: 1 - path: ../src/webauthn/src/AttestationStatement/AndroidKeyAttestationStatementSupport.php - - rawMessage: 'Parameter #1 $data of static method Webauthn\MetadataService\CertificateChain\CertificateToolbox::convertAllDERToPEM() expects array, mixed given.' identifier: argument.type @@ -3123,12 +3093,6 @@ parameters: count: 1 path: ../src/webauthn/src/AttestationStatement/AndroidKeyAttestationStatementSupport.php - - - rawMessage: 'Parameter #1 $key of function openssl_pkey_get_details expects OpenSSLAsymmetricKey, OpenSSLAsymmetricKey|false given.' - identifier: argument.type - count: 1 - path: ../src/webauthn/src/AttestationStatement/AndroidKeyAttestationStatementSupport.php - - rawMessage: 'Parameter #2 $array of function array_key_exists expects array, mixed given.' identifier: argument.type @@ -3147,12 +3111,6 @@ parameters: count: 1 path: ../src/webauthn/src/AttestationStatement/AndroidKeyAttestationStatementSupport.php - - - rawMessage: Cannot cast mixed to string. - identifier: cast.string - count: 1 - path: ../src/webauthn/src/AttestationStatement/AppleAttestationStatementSupport.php - - rawMessage: 'Parameter #1 $data of static method Cose\Key\Key::createFromData() expects array, mixed given.' identifier: argument.type @@ -3171,12 +3129,6 @@ parameters: count: 1 path: ../src/webauthn/src/AttestationStatement/AppleAttestationStatementSupport.php - - - rawMessage: 'Parameter #1 $key of function openssl_pkey_get_details expects OpenSSLAsymmetricKey, OpenSSLAsymmetricKey|false given.' - identifier: argument.type - count: 1 - path: ../src/webauthn/src/AttestationStatement/AppleAttestationStatementSupport.php - - rawMessage: 'Parameter #2 $array of function array_key_exists expects array, mixed given.' identifier: argument.type @@ -3357,18 +3309,6 @@ parameters: count: 3 path: ../src/webauthn/src/AttestationStatement/PackedAttestationStatementSupport.php - - - rawMessage: Cannot cast mixed to string. - identifier: cast.string - count: 1 - path: ../src/webauthn/src/AttestationStatement/PackedAttestationStatementSupport.php - - - - rawMessage: 'Language construct isset() should not be used.' - identifier: ergebnis.noIsset - count: 4 - path: ../src/webauthn/src/AttestationStatement/PackedAttestationStatementSupport.php - - rawMessage: 'Parameter #1 $data of static method Webauthn\MetadataService\CertificateChain\CertificateToolbox::convertAllDERToPEM() expects array, array given.' identifier: argument.type @@ -3417,12 +3357,6 @@ parameters: count: 1 path: ../src/webauthn/src/AttestationStatement/PackedAttestationStatementSupport.php - - - rawMessage: 'Parameter #2 $user_string of function hash_equals expects string, mixed given.' - identifier: argument.type - count: 1 - path: ../src/webauthn/src/AttestationStatement/PackedAttestationStatementSupport.php - - rawMessage: Cannot access offset 'certInfo' on mixed. identifier: offsetAccess.nonOffsetAccessible @@ -3501,12 +3435,6 @@ parameters: count: 2 path: ../src/webauthn/src/AttestationStatement/TPMAttestationStatementSupport.php - - - rawMessage: 'Language construct isset() should not be used.' - identifier: ergebnis.noIsset - count: 5 - path: ../src/webauthn/src/AttestationStatement/TPMAttestationStatementSupport.php - - rawMessage: 'Method Webauthn\AttestationStatement\TPMAttestationStatementSupport::__construct() has parameter $clock with a nullable type declaration.' identifier: ergebnis.noParameterWithNullableTypeDeclaration @@ -3585,12 +3513,6 @@ parameters: count: 1 path: ../src/webauthn/src/AttestationStatement/TPMAttestationStatementSupport.php - - - rawMessage: 'Parameter #2 $user_string of function hash_equals expects string, mixed given.' - identifier: argument.type - count: 1 - path: ../src/webauthn/src/AttestationStatement/TPMAttestationStatementSupport.php - - rawMessage: Class Webauthn\AttestedCredentialData is neither abstract nor final. identifier: ergebnis.final diff --git a/.ci-tools/rector.php b/.ci-tools/rector.php index 8a15e4a58..5846feca8 100644 --- a/.ci-tools/rector.php +++ b/.ci-tools/rector.php @@ -8,7 +8,6 @@ use Rector\PHPUnit\Set\PHPUnitSetList; use Rector\Set\ValueObject\LevelSetList; use Rector\Set\ValueObject\SetList; -use Rector\Symfony\Symfony73\Rector\Class_\InvokableCommandInputAttributeRector; use Rector\ValueObject\PhpVersion; $builder = RectorConfig::configure(); @@ -36,7 +35,6 @@ ] ); $builder->withSkip([ - InvokableCommandInputAttributeRector::class, PreferPHPUnitThisCallRector::class, __DIR__ . '/../src/Library/Core/JWKSet.php', __DIR__ . '/../src/Bundle/JoseFramework/DependencyInjection/Source/KeyManagement/JWKSource.php', diff --git a/src/webauthn/src/CeremonyStep/CeremonyStepManagerFactory.php b/src/webauthn/src/CeremonyStep/CeremonyStepManagerFactory.php index e5aa92799..a9b81c9b9 100644 --- a/src/webauthn/src/CeremonyStep/CeremonyStepManagerFactory.php +++ b/src/webauthn/src/CeremonyStep/CeremonyStepManagerFactory.php @@ -190,26 +190,4 @@ private function buildCreationCeremony(bool $requireUserPresence): CeremonyStepM new CheckCredentialId(), ]); } - - public function requestCeremony(): CeremonyStepManager - { - /* @see https://www.w3.org/TR/webauthn-3/#sctn-verifying-assertion */ - return new CeremonyStepManager([ - new CheckAllowedCredentialList(), - new CheckUserHandle(), - new CheckClientDataCollectorType(), - new CheckChallenge(), - $this->allowedOrigins === null ? new CheckOrigin( - $this->securedRelyingPartyId ?? [] - ) : new CheckAllowedOrigins($this->allowedOrigins, $this->allowSubdomains), - new CheckTopOrigin(null), - new CheckRelyingPartyIdIdHash(), - new CheckUserWasPresent(), - new CheckUserVerification(), - new CheckBackupBitsAreConsistent(), - new CheckExtensions($this->extensionOutputCheckerHandler), - new CheckSignature($this->algorithmManager), - new CheckCounter($this->counterChecker), - ]); - } } diff --git a/tests/symfony/functional/User.php b/tests/symfony/functional/User.php index 62f67274a..b5a95c784 100644 --- a/tests/symfony/functional/User.php +++ b/tests/symfony/functional/User.php @@ -39,10 +39,6 @@ public function getUsername(): string return $this->name; } - public function eraseCredentials(): void - { - } - public function getUserIdentifier(): string { return $this->name; From f1dac7dd56d06b32310a46bbad9e8d393baa2d4b Mon Sep 17 00:00:00 2001 From: Florent Morselli Date: Sat, 20 Dec 2025 15:31:19 +0100 Subject: [PATCH 07/10] feat: add eraseCredentials method and handle optional attributes in user loader --- src/symfony/src/Security/Authentication/WebauthnBadge.php | 2 +- tests/symfony/functional/User.php | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/symfony/src/Security/Authentication/WebauthnBadge.php b/src/symfony/src/Security/Authentication/WebauthnBadge.php index a735b6447..6ddd55854 100644 --- a/src/symfony/src/Security/Authentication/WebauthnBadge.php +++ b/src/symfony/src/Security/Authentication/WebauthnBadge.php @@ -105,7 +105,7 @@ public function markResolved( $this->publicKeyCredentialOptions = $publicKeyCredentialOptions; $this->publicKeyCredentialUserEntity = $publicKeyCredentialUserEntity; $this->publicKeyCredentialSource = $publicKeyCredentialSource; - $user = ($this->userLoader)($publicKeyCredentialUserEntity->name, $this->attributes); + $user = ($this->userLoader)($publicKeyCredentialUserEntity->name, $this->attributes ?? []); if ($user === null) { $exception = new UserNotFoundException(); $exception->setUserIdentifier($publicKeyCredentialSource->userHandle); diff --git a/tests/symfony/functional/User.php b/tests/symfony/functional/User.php index b5a95c784..62f67274a 100644 --- a/tests/symfony/functional/User.php +++ b/tests/symfony/functional/User.php @@ -39,6 +39,10 @@ public function getUsername(): string return $this->name; } + public function eraseCredentials(): void + { + } + public function getUserIdentifier(): string { return $this->name; From 8f1d5953862cdee3adf85967b3cce463144d6ed1 Mon Sep 17 00:00:00 2001 From: Florent Morselli Date: Sat, 20 Dec 2025 15:41:06 +0100 Subject: [PATCH 08/10] feat: add empty implementation for eraseCredentials method in User class --- tests/symfony/functional/User.php | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/symfony/functional/User.php b/tests/symfony/functional/User.php index 62f67274a..57d1d46c0 100644 --- a/tests/symfony/functional/User.php +++ b/tests/symfony/functional/User.php @@ -41,6 +41,7 @@ public function getUsername(): string public function eraseCredentials(): void { + // Intentionally left empty - required by UserInterface } public function getUserIdentifier(): string From da1663ba1dff340002c5fe544b3064320eb7470a Mon Sep 17 00:00:00 2001 From: Florent Morselli Date: Sat, 20 Dec 2025 16:14:23 +0100 Subject: [PATCH 09/10] feat: add missing type specifications for generics in Configuration class --- .ci-tools/phpstan-baseline.neon | 48 +++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/.ci-tools/phpstan-baseline.neon b/.ci-tools/phpstan-baseline.neon index a678d9fc6..45685d673 100644 --- a/.ci-tools/phpstan-baseline.neon +++ b/.ci-tools/phpstan-baseline.neon @@ -528,6 +528,54 @@ parameters: count: 3 path: ../src/symfony/src/DependencyInjection/Configuration.php + - + rawMessage: 'Method Webauthn\Bundle\DependencyInjection\Configuration::getConfigTreeBuilder() return type with generic class Symfony\Component\Config\Definition\Builder\TreeBuilder does not specify its types: T' + identifier: missingType.generics + count: 1 + path: ../src/symfony/src/DependencyInjection/Configuration.php + + - + rawMessage: 'PHPDoc tag `@var` for variable $rootNode contains generic class Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition but does not specify its types: TParent' + identifier: missingType.generics + count: 1 + path: ../src/symfony/src/DependencyInjection/Configuration.php + + - + rawMessage: 'Method Webauthn\Bundle\DependencyInjection\Configuration::addCreationProfilesConfig() has parameter $rootNode with generic class Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition but does not specify its types: TParent' + identifier: missingType.generics + count: 1 + path: ../src/symfony/src/DependencyInjection/Configuration.php + + - + rawMessage: 'Method Webauthn\Bundle\DependencyInjection\Configuration::addRequestProfilesConfig() has parameter $rootNode with generic class Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition but does not specify its types: TParent' + identifier: missingType.generics + count: 1 + path: ../src/symfony/src/DependencyInjection/Configuration.php + + - + rawMessage: 'Method Webauthn\Bundle\DependencyInjection\Configuration::addControllersConfig() has parameter $rootNode with generic class Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition but does not specify its types: TParent' + identifier: missingType.generics + count: 1 + path: ../src/symfony/src/DependencyInjection/Configuration.php + + - + rawMessage: 'Method Webauthn\Bundle\DependencyInjection\Configuration::addMetadataConfig() has parameter $rootNode with generic class Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition but does not specify its types: TParent' + identifier: missingType.generics + count: 1 + path: ../src/symfony/src/DependencyInjection/Configuration.php + + - + rawMessage: 'Method Webauthn\Bundle\DependencyInjection\Configuration::addPasskeyEndpointsConfig() has parameter $rootNode with generic class Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition but does not specify its types: TParent' + identifier: missingType.generics + count: 1 + path: ../src/symfony/src/DependencyInjection/Configuration.php + + - + rawMessage: 'Method Webauthn\Bundle\DependencyInjection\Configuration::getUrlNode() return type with generic class Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition does not specify its types: TParent' + identifier: missingType.generics + count: 1 + path: ../src/symfony/src/DependencyInjection/Configuration.php + - rawMessage: ''' Access to constant on deprecated interface Webauthn\Bundle\Repository\PublicKeyCredentialSourceRepositoryInterface: From 35406960ea044716dda83aa72160964a7eedb364 Mon Sep 17 00:00:00 2001 From: Florent Morselli Date: Sat, 20 Dec 2025 17:42:15 +0100 Subject: [PATCH 10/10] refactor: clean up configuration and security service definitions --- .ci-tools/phpstan-baseline.neon | 1 - src/symfony/src/Resources/config/security.php | 4 +--- tests/symfony/config/config.yml | 2 -- 3 files changed, 1 insertion(+), 6 deletions(-) diff --git a/.ci-tools/phpstan-baseline.neon b/.ci-tools/phpstan-baseline.neon index 45685d673..6629816c4 100644 --- a/.ci-tools/phpstan-baseline.neon +++ b/.ci-tools/phpstan-baseline.neon @@ -537,7 +537,6 @@ parameters: - rawMessage: 'PHPDoc tag `@var` for variable $rootNode contains generic class Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition but does not specify its types: TParent' identifier: missingType.generics - count: 1 path: ../src/symfony/src/DependencyInjection/Configuration.php - diff --git a/src/symfony/src/Resources/config/security.php b/src/symfony/src/Resources/config/security.php index 2390934c1..577a365ab 100644 --- a/src/symfony/src/Resources/config/security.php +++ b/src/symfony/src/Resources/config/security.php @@ -61,7 +61,5 @@ $service->set(CurrentUserEntityGuesser::class); $service->set(RequestBodyUserEntityGuesser::class); - $service->set(WebauthnBadgeListener::class) - ->arg('$userProvider', service('security.user_providers')) - ; + $service->set(WebauthnBadgeListener::class); }; diff --git a/tests/symfony/config/config.yml b/tests/symfony/config/config.yml index 06ce40149..8e7e8d127 100644 --- a/tests/symfony/config/config.yml +++ b/tests/symfony/config/config.yml @@ -177,10 +177,8 @@ security: providers: default: id: 'Webauthn\Tests\Bundle\Functional\UserProvider' - users_in_memory: { memory: null } firewalls: main: - provider: default custom_authenticator: 'Webauthn\Tests\Bundle\Functional\WebauthnAuthenticator' webauthn: failure_handler: 'Webauthn\Tests\Bundle\Functional\FailureHandler'