[Serializer] Fix workaround min php version

This commit is contained in:
Maxime Steinhausser 2017-06-17 20:11:33 +02:00
parent 0478ecd472
commit 74db2e61bc

View File

@ -81,7 +81,7 @@ class DateTimeNormalizer implements NormalizerInterface, DenormalizerInterface
$timezone = $this->getTimezone($context);
if (null !== $dateTimeFormat) {
if (null === $timezone && PHP_VERSION_ID < 50600) {
if (null === $timezone && PHP_VERSION_ID < 70000) {
// https://bugs.php.net/bug.php?id=68669
$object = \DateTime::class === $class ? \DateTime::createFromFormat($dateTimeFormat, $data) : \DateTimeImmutable::createFromFormat($dateTimeFormat, $data);
} else {