Skip to content

[2.0]XML schema validation seems too strict  #2529

@rupeshwankhede

Description

@rupeshwankhede

BC Break Report

Q A
BC Break yes
Version 2.0.1
--

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions