Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
137 changes: 53 additions & 84 deletions .ci-tools/phpstan-baseline.neon
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -558,6 +528,53 @@ 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
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:
Expand Down Expand Up @@ -615,6 +632,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
Expand Down Expand Up @@ -3105,12 +3128,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<string>, mixed given.'
identifier: argument.type
Expand All @@ -3123,12 +3140,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
Expand All @@ -3147,12 +3158,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<int, mixed>, mixed given.'
identifier: argument.type
Expand All @@ -3171,12 +3176,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
Expand Down Expand Up @@ -3357,18 +3356,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<string>, array<mixed, mixed> given.'
identifier: argument.type
Expand Down Expand Up @@ -3417,12 +3404,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
Expand Down Expand Up @@ -3501,12 +3482,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
Expand Down Expand Up @@ -3585,12 +3560,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
Expand Down
2 changes: 0 additions & 2 deletions .ci-tools/rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
xsi:schemaLocation="http://doctrine-project.org/schemas/orm/doctrine-mapping https://raw.github.com/doctrine/doctrine2/master/doctrine-mapping.xsd"
>
<mapped-superclass name="Webauthn\PublicKeyCredentialSource">
<field name="publicKeyCredentialId" type="base64" unique="true" length="250"/>
<field name="publicKeyCredentialId" type="base64"/>
<field name="type"/>
<field name="transports" type="json"/>
<field name="attestationType"/>
Expand Down
2 changes: 1 addition & 1 deletion src/symfony/src/Security/Authentication/WebauthnBadge.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Loading
Loading