-
-
Notifications
You must be signed in to change notification settings - Fork 506
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[2.0]XML schema validation seems too strict #2095
Comments
That's not good. I'll take a look during the day. Thanks for providing a file I can test this with 👍 |
After taking a look, this is somewhat intended, with a few unintended consequences. We've decided to validate the mapping files against our schema, which makes sense as it catches errors in the schema definition that could otherwise lead to other errors when interpreting the mapping. When adding the mappings for the Gedmo extension to the
Our schema doesn't allow adding any additional content in elements, which includes elements from other namespaces. To allow this, ORM used an My opinion is that these extra mappings should not just be somewhere in the ODM mappings. Instead, the extensions should be mapped in their own files to be independent from the main ODM mappings. Alternatively, if one were to insist on having all these in one file, a separate XSD that extends the default ODM type definitions would be necessary. While it would be easy to allow configuring the schema file that is used for validation in the XML driver, I'm not sure how we could allow that and still verify that the mappings are in a format that we understand. While you are using 1.x, you'll have to ignore these deprecations, as there isn't a lot you can do about it (apart from dropping the gedmo mappings from your ODM mapping files). I'm aware that this is a very hard BC break, and I'm happy to work with the Gedmo developers on finding a solution that works for the users, but I don't know what such a solution would look like. |
Cross-referencing with doctrine-extensions/DoctrineExtensions#2055. |
Closing as this issue needs to be fixed upstream. |
BC Break Report
Summary/Reproduce
composer update
I think it comes from the gedmo line to add the slug behavior.
The thing is it's impossible to add a content element from another
.xsd
(from thexmlns:gedmo="http://gediminasm.org/schemas/orm/doctrine-extensions-mapping"
in this case).I tried for another issue about xsd few months ago.
So, this issued can't be resolved in the gedmo repo.
I don't know if it's possible, but maybe the validation should be less strict ?
Previous behavior
There wasn't any error about that line in previous versions
Current behavior
throw XML schama validation exception during
composer update
File
I paste here my whole xml mapping file, if that could help
The text was updated successfully, but these errors were encountered: