Fix SchemaValidator with abstract child class in discriminator map - Enforcing Abstract Entity in DiscriminatorMap is important for some operations#9262
Conversation
…r map (doctrine#9096)" This reverts commit bbb68d0.
* Docs: consistency for FQCN, spacing, etc (#9232) * Docs: consistent spacing, consistent array-style, consistent FQCN, avoid double escaped slashes, avoid double quotes if not necessary * Docs: use special note block instead of markdown-based style * Docs: Quote FQCN in table with backticks to be compatible with all render engines * Drop all mentions API doc - it is not available anymore * Add missed FQCN for code snippets * Revert "Fix SchemaValidator with abstract child class in discriminator map (#9096)" (#9262) This reverts commit bbb68d0. * [docs] Fix wording for attributes=>parameters. (#9265) Co-authored-by: Andrii Dembitskyi <andrew.dembitskiy@gmail.com> Co-authored-by: olsavmic <molsavsky1@gmail.com> Co-authored-by: Benjamin Eberlei <kontakt@beberlei.de>
|
@beberlei Shouldn't we work on making it work without the abstract classes in the discriminator map, rather than accepting this limitation? |
|
@BenMorel This PR did not change the existing behaviour in any way, it's just fixing the validator so that it now validates what's actually required. This issue is resolved now. Making it work with abstract classes in the discriminator map is a different question and it's a feature/improvement which deserves its own issue & eventually PR. I'd love to make/see such contribution but I don't know how to overcome the limitation mentioned in #9142 (comment) Btw I actually wanted to integrate the test cases from #9145 to this PR so that the issue is not reintroduced in the future, that's why I marked it as Draft. Thanks for merging anyway, I may do this in separately |
* 2.11.x: Enable UnusedUse sniff again (doctrine#9267) Whitelist composer plugins used by this repository (doctrine#9286) Fix XML export for `change-tracking-policy` (doctrine#9285) Allow symfony/cache 6 (doctrine#9283) Put actual value instead of index inside $originalEntityData. (doctrine#9244) Fix return types of cache interfaces (doctrine#9271) Better explain limitations of DQL "DELETE" (doctrine#9281) Fix docblocks on nullable EM properties (doctrine#9273) Docs: use canonical order for phpdoc tags, add missed semicolon (doctrine#9190) Make PrimaryReadReplicaConnection enforcement explicit (doctrine#9239) Regenerate Psalm baseline (doctrine#9272) Improve compatibility with Doctrine DBAL 4 (doctrine#9266) [docs] Fix wording for attributes=>parameters. (doctrine#9265) Support for nesting attributes with PHP 8.1 (doctrine#9241) Revert "Fix SchemaValidator with abstract child class in discriminator map (doctrine#9096)" (doctrine#9262) Docs: consistency for FQCN, spacing, etc (doctrine#9232)
Resolves #9142
This reverts commit bbb68d0.
#9145 demonstrates that even abstract classes are required to be present in discriminator map.