-
-
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 #2529
Comments
Well, there's still no resolution in doctrine-extensions/DoctrineExtensions#2055 for which we hoped. I believe the only tangible thing we can do is to let users opt-out from the XSD validation, but that's obviously a footgun. |
Yeah. Can we do that if it is possible? |
Sure, are you up for the implementation? |
@malarzm Can you check PR and let us know if we need to change anything. |
I wonder if that could be fixed with a composer script that generate a custom xsd depending on the required packages ? |
BC Break Report
Summary
After updating version 2.0. Getting exception for below line. It is working on previous version.
XML Schema validation throw an exception about this line
<field field-name="created" type="date" name="created"> <gedmo:timestampable on="create"/> </field>
Previous behavior
There wasn't any error about that line in previous versions. We just return.
if (@$document->schemaValidate(__DIR__ . '/../../../../../../doctrine-mongo-mapping.xsd')) { return; }
Current behavior
In current version throwing exception.
if (! $document->schemaValidate(__DIR__ . '/../../../../../../doctrine-mongo-mapping.xsd')) { throw MappingException::xmlMappingFileInvalid($filename, $this->formatErrors(libxml_get_errors())); }
I don't know if it's possible, but maybe the validation should be less strict same like in ORM.
Refer: #2095
The text was updated successfully, but these errors were encountered: