Skip to content

Commit bcf7d61

Browse files
authored
DateTimeInterface::ISO8601 Incompatibility with ISO8601 (#1576)
* Incompatibility DateTimeInterface::ISO8601 * Revert "Incompatibility DateTimeInterface::ISO8601" This reverts commit 4b5264a8d8488c379c6ed3701ad971f6bec5bfb8. * CodeGenerator DateTimeInterface::ATOM vs ISO8601 * Check timestampFormat Return * Generate All * Changelog fixed ATOM vs ISO8601 * iso8601 / timestampFormat * Description of what is fixed
1 parent 423f463 commit bcf7d61

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Generator/InputGenerator.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -562,6 +562,10 @@ private function stringify(string $variable, Member $member, string $part): stri
562562
switch ($shape->getType()) {
563563
case 'timestamp':
564564
$format = strtoupper($shape->get('timestampFormat') ?? ('header' === $part ? 'rfc822' : 'iso8601'));
565+
if ('ISO8601' === $format) {
566+
$format = 'ATOM';
567+
}
568+
565569
if (!\defined('\DateTimeInterface::' . $format)) {
566570
throw new \InvalidArgumentException('Constant "\DateTimeInterface::' . $format . '" does not exists.');
567571
}

0 commit comments

Comments
 (0)