diff --git a/lib/Doctrine/ORM/Mapping/Driver/XmlDriver.php b/lib/Doctrine/ORM/Mapping/Driver/XmlDriver.php index 90fba4abf..3d8499180 100644 --- a/lib/Doctrine/ORM/Mapping/Driver/XmlDriver.php +++ b/lib/Doctrine/ORM/Mapping/Driver/XmlDriver.php @@ -653,8 +653,6 @@ class XmlDriver extends FileDriver { $array = array(); - $booleanOptions = ['unsigned', 'fixed']; - /* @var $option SimpleXMLElement */ foreach ($options as $option) { if ($option->count()) { @@ -663,11 +661,11 @@ class XmlDriver extends FileDriver $value = (string) $option; } - $attr = $option->attributes(); + $attributes = $option->attributes(); - if (isset($attr->name)) { - $attrName = (string) $attr->name; - $array[$attrName] = in_array($attrName, $booleanOptions) + if (isset($attributes->name)) { + $nameAttribute = (string) $attributes->name; + $array[$nameAttribute] = in_array($nameAttribute, ['unsigned', 'fixed']) ? $this->evaluateBoolean($value) : $value; } else { diff --git a/tests/Doctrine/Tests/ORM/Mapping/AbstractMappingDriverTest.php b/tests/Doctrine/Tests/ORM/Mapping/AbstractMappingDriverTest.php index 3cc86c77a..c4fd1381d 100644 --- a/tests/Doctrine/Tests/ORM/Mapping/AbstractMappingDriverTest.php +++ b/tests/Doctrine/Tests/ORM/Mapping/AbstractMappingDriverTest.php @@ -250,7 +250,7 @@ abstract class AbstractMappingDriverTest extends OrmTestCase /** * @group #6129 * - * @depends testIdentifier + * @depends testLoadMapping * * @param ClassMetadata $class *