Commit ae0a2051 authored by Marco Pivetta's avatar Marco Pivetta

#869 - DBAL-1293 - aligning datetime types to the new conversion exception signature

parent dcc18f0e
......@@ -57,7 +57,7 @@ class DateTimeType extends Type
return $value->format($platform->getDateTimeFormatString());
}
throw ConversionException::conversionFailedInvalidType($value, $this->getName(), 'DateTime');
throw ConversionException::conversionFailedInvalidType($value, $this->getName(), ['null', 'DateTime']);
}
/**
......
......@@ -75,7 +75,7 @@ class DateTimeTzType extends Type
return $value->format($platform->getDateTimeTzFormatString());
}
throw ConversionException::conversionFailedInvalidType($value, $this->getName(), 'DateTime');
throw ConversionException::conversionFailedInvalidType($value, $this->getName(), ['null', 'DateTime']);
}
/**
......
......@@ -57,7 +57,7 @@ class DateType extends Type
return $value->format($platform->getDateFormatString());
}
throw ConversionException::conversionFailedInvalidType($value, $this->getName(), 'DateTime');
throw ConversionException::conversionFailedInvalidType($value, $this->getName(), ['null', 'DateTime']);
}
/**
......
......@@ -57,7 +57,7 @@ class TimeType extends Type
return $value->format($platform->getTimeFormatString());
}
throw ConversionException::conversionFailedInvalidType($value, $this->getName(), 'DateTime');
throw ConversionException::conversionFailedInvalidType($value, $this->getName(), ['null', 'DateTime']);
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment