fix: remove duplicate Doctrine XML mapping for deprecated PublicKeyCredentialSource#828
Open
yoav-ebp wants to merge 1 commit intoweb-auth:5.3.xfrom
Open
fix: remove duplicate Doctrine XML mapping for deprecated PublicKeyCredentialSource#828yoav-ebp wants to merge 1 commit intoweb-auth:5.3.xfrom
yoav-ebp wants to merge 1 commit intoweb-auth:5.3.xfrom
Conversation
…edentialSource Since 5.3 (PR web-auth#751), `Webauthn\PublicKeyCredentialSource` is a deprecation shim that extends `Webauthn\CredentialRecord`. However, the Symfony bundle still ships `PublicKeyCredentialSource.orm.xml` alongside `CredentialRecord.orm.xml`, both declaring the same 13 fields as a `<mapped-superclass>`. With Doctrine ORM 3, metadata compilation walks the inheritance chain and picks up identical field definitions from both files, causing: Duplicate definition of column 'public_key_credential_id' on entity 'Webauthn\\PublicKeyCredentialSource' in a field or discriminator column mapping. Concrete entities extending either `CredentialRecord` or the deprecated `PublicKeyCredentialSource` continue to inherit the field set through PHP inheritance + `CredentialRecord.orm.xml`; no downstream mapping is lost. Fixes web-auth#824
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #824
Problem
Since 5.3 (#751),
Webauthn\PublicKeyCredentialSourceis a deprecation shim that extendsWebauthn\CredentialRecord. However, the Symfony bundle still shipsPublicKeyCredentialSource.orm.xmlalongsideCredentialRecord.orm.xml, both declaring the same 13 fields as a<mapped-superclass>.With Doctrine ORM 3, metadata compilation walks the inheritance chain and picks up identical field definitions from both files, causing:
Fix
Remove
src/symfony/src/Resources/config/doctrine-mapping/PublicKeyCredentialSource.orm.xml.Concrete entities extending either
CredentialRecordor the deprecatedPublicKeyCredentialSourcecontinue to inherit the field set through PHP inheritance +CredentialRecord.orm.xml; no downstream mapping is lost.Diff
Single file removed (22 lines deleted, 0 added).