Skip to content

Commit 2debe0c

Browse files
authored
Merge pull request #794 from web-auth/temp-ebe254
Merge up 5.2.3 to 5.3.x
2 parents db82ce1 + 3540696 commit 2debe0c

File tree

9 files changed

+259
-244
lines changed

9 files changed

+259
-244
lines changed

.ci-tools/phpstan-baseline.neon

Lines changed: 53 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,11 @@
11
parameters:
22
ignoreErrors:
3-
-
4-
rawMessage: Binary operation "." between mixed and '/Resources/config…' results in an error.
5-
identifier: binaryOp.invalid
6-
count: 1
7-
path: ../src/stimulus/src/WebauthnStimulusBundle.php
8-
9-
-
10-
rawMessage: Cannot access offset 'path' on mixed.
11-
identifier: offsetAccess.nonOffsetAccessible
12-
count: 1
13-
path: ../src/stimulus/src/WebauthnStimulusBundle.php
14-
153
-
164
rawMessage: Class "Webauthn\Stimulus\WebauthnStimulusBundle" is not allowed to extend "Symfony\Component\HttpKernel\Bundle\AbstractBundle".
175
identifier: ergebnis.noExtends
186
count: 1
197
path: ../src/stimulus/src/WebauthnStimulusBundle.php
208

21-
-
22-
rawMessage: 'Language construct isset() should not be used.'
23-
identifier: ergebnis.noIsset
24-
count: 1
25-
path: ../src/stimulus/src/WebauthnStimulusBundle.php
26-
27-
-
28-
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.'
29-
identifier: ergebnis.noParameterWithContainerTypeDeclaration
30-
count: 1
31-
path: ../src/stimulus/src/WebauthnStimulusBundle.php
32-
33-
-
34-
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.'
35-
identifier: ergebnis.noParameterWithContainerTypeDeclaration
36-
count: 1
37-
path: ../src/stimulus/src/WebauthnStimulusBundle.php
38-
399
-
4010
rawMessage: 'Method Webauthn\Bundle\Controller\AssertionControllerFactory::createRequestController() has parameter $optionStorage with a nullable type declaration.'
4111
identifier: ergebnis.noParameterWithNullableTypeDeclaration
@@ -558,6 +528,53 @@ parameters:
558528
count: 3
559529
path: ../src/symfony/src/DependencyInjection/Configuration.php
560530

531+
-
532+
rawMessage: 'Method Webauthn\Bundle\DependencyInjection\Configuration::getConfigTreeBuilder() return type with generic class Symfony\Component\Config\Definition\Builder\TreeBuilder does not specify its types: T'
533+
identifier: missingType.generics
534+
count: 1
535+
path: ../src/symfony/src/DependencyInjection/Configuration.php
536+
537+
-
538+
rawMessage: 'PHPDoc tag `@var` for variable $rootNode contains generic class Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition but does not specify its types: TParent'
539+
identifier: missingType.generics
540+
path: ../src/symfony/src/DependencyInjection/Configuration.php
541+
542+
-
543+
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'
544+
identifier: missingType.generics
545+
count: 1
546+
path: ../src/symfony/src/DependencyInjection/Configuration.php
547+
548+
-
549+
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'
550+
identifier: missingType.generics
551+
count: 1
552+
path: ../src/symfony/src/DependencyInjection/Configuration.php
553+
554+
-
555+
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'
556+
identifier: missingType.generics
557+
count: 1
558+
path: ../src/symfony/src/DependencyInjection/Configuration.php
559+
560+
-
561+
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'
562+
identifier: missingType.generics
563+
count: 1
564+
path: ../src/symfony/src/DependencyInjection/Configuration.php
565+
566+
-
567+
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'
568+
identifier: missingType.generics
569+
count: 1
570+
path: ../src/symfony/src/DependencyInjection/Configuration.php
571+
572+
-
573+
rawMessage: 'Method Webauthn\Bundle\DependencyInjection\Configuration::getUrlNode() return type with generic class Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition does not specify its types: TParent'
574+
identifier: missingType.generics
575+
count: 1
576+
path: ../src/symfony/src/DependencyInjection/Configuration.php
577+
561578
-
562579
rawMessage: '''
563580
Access to constant on deprecated interface Webauthn\Bundle\Repository\PublicKeyCredentialSourceRepositoryInterface:
@@ -615,6 +632,12 @@ parameters:
615632
count: 14
616633
path: ../src/symfony/src/DependencyInjection/Factory/Security/WebauthnFactory.php
617634

635+
-
636+
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'
637+
identifier: missingType.generics
638+
count: 1
639+
path: ../src/symfony/src/DependencyInjection/Factory/Security/WebauthnFactory.php
640+
618641
-
619642
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.'
620643
identifier: ergebnis.noParameterWithContainerTypeDeclaration
@@ -3105,12 +3128,6 @@ parameters:
31053128
count: 1
31063129
path: ../src/webauthn/src/AttestationStatement/AndroidKeyAttestationStatementSupport.php
31073130

3108-
-
3109-
rawMessage: 'Parameter #1 $data of static method SpomkyLabs\Pki\ASN1\Element::fromDER() expects string, mixed given.'
3110-
identifier: argument.type
3111-
count: 1
3112-
path: ../src/webauthn/src/AttestationStatement/AndroidKeyAttestationStatementSupport.php
3113-
31143131
-
31153132
rawMessage: 'Parameter #1 $data of static method Webauthn\MetadataService\CertificateChain\CertificateToolbox::convertAllDERToPEM() expects array<string>, mixed given.'
31163133
identifier: argument.type
@@ -3123,12 +3140,6 @@ parameters:
31233140
count: 1
31243141
path: ../src/webauthn/src/AttestationStatement/AndroidKeyAttestationStatementSupport.php
31253142

3126-
-
3127-
rawMessage: 'Parameter #1 $key of function openssl_pkey_get_details expects OpenSSLAsymmetricKey, OpenSSLAsymmetricKey|false given.'
3128-
identifier: argument.type
3129-
count: 1
3130-
path: ../src/webauthn/src/AttestationStatement/AndroidKeyAttestationStatementSupport.php
3131-
31323143
-
31333144
rawMessage: 'Parameter #2 $array of function array_key_exists expects array, mixed given.'
31343145
identifier: argument.type
@@ -3147,12 +3158,6 @@ parameters:
31473158
count: 1
31483159
path: ../src/webauthn/src/AttestationStatement/AndroidKeyAttestationStatementSupport.php
31493160

3150-
-
3151-
rawMessage: Cannot cast mixed to string.
3152-
identifier: cast.string
3153-
count: 1
3154-
path: ../src/webauthn/src/AttestationStatement/AppleAttestationStatementSupport.php
3155-
31563161
-
31573162
rawMessage: 'Parameter #1 $data of static method Cose\Key\Key::createFromData() expects array<int, mixed>, mixed given.'
31583163
identifier: argument.type
@@ -3171,12 +3176,6 @@ parameters:
31713176
count: 1
31723177
path: ../src/webauthn/src/AttestationStatement/AppleAttestationStatementSupport.php
31733178

3174-
-
3175-
rawMessage: 'Parameter #1 $key of function openssl_pkey_get_details expects OpenSSLAsymmetricKey, OpenSSLAsymmetricKey|false given.'
3176-
identifier: argument.type
3177-
count: 1
3178-
path: ../src/webauthn/src/AttestationStatement/AppleAttestationStatementSupport.php
3179-
31803179
-
31813180
rawMessage: 'Parameter #2 $array of function array_key_exists expects array, mixed given.'
31823181
identifier: argument.type
@@ -3357,18 +3356,6 @@ parameters:
33573356
count: 3
33583357
path: ../src/webauthn/src/AttestationStatement/PackedAttestationStatementSupport.php
33593358

3360-
-
3361-
rawMessage: Cannot cast mixed to string.
3362-
identifier: cast.string
3363-
count: 1
3364-
path: ../src/webauthn/src/AttestationStatement/PackedAttestationStatementSupport.php
3365-
3366-
-
3367-
rawMessage: 'Language construct isset() should not be used.'
3368-
identifier: ergebnis.noIsset
3369-
count: 4
3370-
path: ../src/webauthn/src/AttestationStatement/PackedAttestationStatementSupport.php
3371-
33723359
-
33733360
rawMessage: 'Parameter #1 $data of static method Webauthn\MetadataService\CertificateChain\CertificateToolbox::convertAllDERToPEM() expects array<string>, array<mixed, mixed> given.'
33743361
identifier: argument.type
@@ -3417,12 +3404,6 @@ parameters:
34173404
count: 1
34183405
path: ../src/webauthn/src/AttestationStatement/PackedAttestationStatementSupport.php
34193406

3420-
-
3421-
rawMessage: 'Parameter #2 $user_string of function hash_equals expects string, mixed given.'
3422-
identifier: argument.type
3423-
count: 1
3424-
path: ../src/webauthn/src/AttestationStatement/PackedAttestationStatementSupport.php
3425-
34263407
-
34273408
rawMessage: Cannot access offset 'certInfo' on mixed.
34283409
identifier: offsetAccess.nonOffsetAccessible
@@ -3501,12 +3482,6 @@ parameters:
35013482
count: 2
35023483
path: ../src/webauthn/src/AttestationStatement/TPMAttestationStatementSupport.php
35033484

3504-
-
3505-
rawMessage: 'Language construct isset() should not be used.'
3506-
identifier: ergebnis.noIsset
3507-
count: 5
3508-
path: ../src/webauthn/src/AttestationStatement/TPMAttestationStatementSupport.php
3509-
35103485
-
35113486
rawMessage: 'Method Webauthn\AttestationStatement\TPMAttestationStatementSupport::__construct() has parameter $clock with a nullable type declaration.'
35123487
identifier: ergebnis.noParameterWithNullableTypeDeclaration
@@ -3585,12 +3560,6 @@ parameters:
35853560
count: 1
35863561
path: ../src/webauthn/src/AttestationStatement/TPMAttestationStatementSupport.php
35873562

3588-
-
3589-
rawMessage: 'Parameter #2 $user_string of function hash_equals expects string, mixed given.'
3590-
identifier: argument.type
3591-
count: 1
3592-
path: ../src/webauthn/src/AttestationStatement/TPMAttestationStatementSupport.php
3593-
35943563
-
35953564
rawMessage: Class Webauthn\AttestedCredentialData is neither abstract nor final.
35963565
identifier: ergebnis.final

.ci-tools/rector.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
use Rector\PHPUnit\Set\PHPUnitSetList;
99
use Rector\Set\ValueObject\LevelSetList;
1010
use Rector\Set\ValueObject\SetList;
11-
use Rector\Symfony\Symfony73\Rector\Class_\InvokableCommandInputAttributeRector;
1211
use Rector\ValueObject\PhpVersion;
1312

1413
$builder = RectorConfig::configure();
@@ -36,7 +35,6 @@
3635
]
3736
);
3837
$builder->withSkip([
39-
InvokableCommandInputAttributeRector::class,
4038
PreferPHPUnitThisCallRector::class,
4139
__DIR__ . '/../src/Library/Core/JWKSet.php',
4240
__DIR__ . '/../src/Bundle/JoseFramework/DependencyInjection/Source/KeyManagement/JWKSource.php',

src/symfony/src/Resources/config/doctrine-mapping/PublicKeyCredentialSource.orm.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
xsi:schemaLocation="http://doctrine-project.org/schemas/orm/doctrine-mapping https://raw.github.com/doctrine/doctrine2/master/doctrine-mapping.xsd"
66
>
77
<mapped-superclass name="Webauthn\PublicKeyCredentialSource">
8-
<field name="publicKeyCredentialId" type="base64" unique="true" length="250"/>
8+
<field name="publicKeyCredentialId" type="base64"/>
99
<field name="type"/>
1010
<field name="transports" type="json"/>
1111
<field name="attestationType"/>

src/symfony/src/Security/Authentication/WebauthnBadge.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ public function markResolved(
105105
$this->publicKeyCredentialOptions = $publicKeyCredentialOptions;
106106
$this->publicKeyCredentialUserEntity = $publicKeyCredentialUserEntity;
107107
$this->publicKeyCredentialSource = $publicKeyCredentialSource;
108-
$user = ($this->userLoader)($publicKeyCredentialUserEntity->name, $this->attributes);
108+
$user = ($this->userLoader)($publicKeyCredentialUserEntity->name, $this->attributes ?? []);
109109
if ($user === null) {
110110
$exception = new UserNotFoundException();
111111
$exception->setUserIdentifier($publicKeyCredentialSource->userHandle);

0 commit comments

Comments
 (0)