mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
DX: remove call to deprecated method
This commit is contained in:
parent
7e1d07f1ff
commit
1a8f8efa23
@ -17,6 +17,7 @@ use Doctrine\DBAL\Types\ConversionException;
|
||||
use Doctrine\DBAL\Types\DateIntervalType;
|
||||
use Exception;
|
||||
|
||||
use LogicException;
|
||||
use function count;
|
||||
use function current;
|
||||
use function preg_match;
|
||||
@ -40,7 +41,7 @@ class NativeDateIntervalType extends DateIntervalType
|
||||
return $value->format(self::FORMAT);
|
||||
}
|
||||
|
||||
throw ConversionException::conversionFailedInvalidType($value, $this->getName(), ['null', 'DateInterval']);
|
||||
throw ConversionException::conversionFailedInvalidType($value, 'string', ['null', 'DateInterval']);
|
||||
}
|
||||
|
||||
public function convertToPHPValue($value, AbstractPlatform $platform)
|
||||
@ -80,7 +81,7 @@ class NativeDateIntervalType extends DateIntervalType
|
||||
|
||||
protected function createConversionException($value, $exception = null)
|
||||
{
|
||||
return ConversionException::conversionFailedFormat($value, $this->getName(), 'xx year xx mons xx days 01:02:03', $exception);
|
||||
return ConversionException::conversionFailedFormat($value, 'string', 'xx year xx mons xx days 01:02:03', $exception);
|
||||
}
|
||||
|
||||
private function convertEntry(&$strings)
|
||||
@ -125,5 +126,7 @@ class NativeDateIntervalType extends DateIntervalType
|
||||
|
||||
return $intervalSpec;
|
||||
}
|
||||
|
||||
throw new LogicException();
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user