Skip to content


DDC-2300: Xmldriver does not convert the version field to boolean but keeps it as a SimpleXMLElement which breaks serialization #3003

doctrinebot opened this Issue · 1 comment

2 participants


Jira issue originally created by user jaco:

Serialization breaks because the cache driver tries to serialize the ClassMetaData instance containing a simplexml element:

Doctrine\ORM\Mapping\ClassMetadata Object
    [fieldMappings] => Array
            [version] => Array
                    [fieldName] => version
                    [type] => integer
                    [columnName] => version
                    [version] => SimpleXMLElement Object
                            [0] => true

                    [default] => 1
                    [declared] => path to entity

The fix is simple change in the columnToArray method in the XML driver class:


$mapping['version'] = $fieldMapping['version'];


$mapping['version'] = $this->evaluateBoolean($fieldMapping['version']);

Issue was closed with resolution "Fixed"

@beberlei beberlei was assigned by doctrinebot
@doctrinebot doctrinebot added this to the 2.3.3 milestone
@doctrinebot doctrinebot closed this
@doctrinebot doctrinebot added the Bug label
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.