mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
Allow FQCN in value attribute of discriminator-mapping field
#7367
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @MatteoFeltrin on GitHub (May 13, 2024).
Bug Report
We are storing to database FQCN to later use them to know which class the Entity has to be casted to through a Discriminator map.
We found out the problem updating to newer version of Doctrine which changed the default value of
$isXsdValidationEnabledto true.Actually, the attribute
valueofdiscriminator-mappingis set as XS:NMTOKEN in the XSD schemaOur XML Configuration of the entity:
Found out this related issue:
https://github.com/doctrine/orm/issues/10627
Summary
Allow FQCN in value attribute of discriminator-mapping (or just loosen the type validation)
Current behavior
An exception is thrown when the XML is validated against the XSD configuration.
How to reproduce
Just write a backslash, or FQCN, inside the attribute "value" of a discriminator mapping field and let it be validated against XSD schema
Expected behavior
No exception to be thrown
@MatteoFeltrin commented on GitHub (Oct 16, 2024):
fixed by https://github.com/doctrine/orm/pull/11453