Skip to content

Commit 281025e

Browse files
authored
Add index on publicKeyCredentialId in Doctrine mapping (#670)
* Set publicKeyCredentialId as unique in ORM mapping Marked the publicKeyCredentialId field as unique in the PublicKeyCredentialSource mapping configuration. This ensures database-level enforcement of uniqueness for this field, preventing duplicate entries. * Set publicKeyCredentialId as unique in ORM mapping Marked the publicKeyCredentialId field as unique in the PublicKeyCredentialSource mapping configuration. This ensures database-level enforcement of uniqueness for this field, preventing duplicate entries.
1 parent 3cc89ba commit 281025e

File tree

2 files changed

+1
-7
lines changed

2 files changed

+1
-7
lines changed

phpstan-baseline.neon

-6
Original file line numberDiff line numberDiff line change
@@ -2100,12 +2100,6 @@ parameters:
21002100
count: 1
21012101
path: src/webauthn/src/MetadataService/Statement/MetadataStatement.php
21022102

2103-
-
2104-
message: '#^Since web\-auth/webauthn\-lib 5\.1\.0\: The parameter "\$icon" is deprecated since 5\.1\.0 and will be removed in 6\.0\.0\. This value has no effect\. Please set "null" instead\.\.$#'
2105-
identifier: todoBy.sfDeprecation
2106-
count: 1
2107-
path: src/webauthn/src/PublicKeyCredentialEntity.php
2108-
21092103
-
21102104
message: '#^Parameter \#1 \$extensions of static method Webauthn\\AuthenticationExtensions\\AuthenticationExtensions\:\:create\(\) expects array\<Webauthn\\AuthenticationExtensions\\AuthenticationExtension\>, array\<Webauthn\\AuthenticationExtensions\\AuthenticationExtensions\> given\.$#'
21112105
identifier: argument.type

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

+1-1
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"/>
8+
<field name="publicKeyCredentialId" type="base64" unique="true"/>
99
<field name="type"/>
1010
<field name="transports" type="json"/>
1111
<field name="attestationType"/>

0 commit comments

Comments
 (0)