The method convertToPHPValue of class XMLType returns boolean true if nullable column equals null. The use of short comparison operator is causing this issue.
Solution:
This block:
public function convertToPHPValue($value, AbstractPlatform $platform)
{
return $value === null ?: new \SimpleXMLElement($value);
}
Should be replaced by this:
public function convertToPHPValue($value, AbstractPlatform $platform)
{
return $value === null ? null : new \SimpleXMLElement($value);
}
Or for PHP versions >= 7:
public function convertToPHPValue($value, AbstractPlatform $platform)
{
return $value === null ?? new \SimpleXMLElement($value);
}
See [PR-22]](#22) for PHP version > 5 fix.