User tests: Successful: Unsuccessful:
According to phpStorm, "RFC2822 was removed in PHP 7.2"
Reference in phpStorm https://github.com/JetBrains/phpstorm-stubs/pull/297/files
Reference in php-src php/php-src#2483
I believe what they are trying to say is that the constants were moved from the DateTime
to the DateTimeInterface
in PHP 7.2
The new unit tests cover this - cough cough - test those at #32848
Manually run:
$date = new Date("8th March 1978 6:06pm", new \DateTimeZone('UTC'));
echo $date->toRFC822(); // Should give 'Wed, 08 Mar 1978 18:06:00 +0000'
'Wed, 08 Mar 1978 18:06:00 +0000'
'Wed, 08 Mar 1978 18:06:00 +0000'
but phpStorm is happy
none
Status | New | ⇒ | Pending |
Category | ⇒ | Libraries |
Status | Pending | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2021-03-25 14:46:21 |
Closed_By | ⇒ | wilsonge | |
Labels |
Added:
?
|
Seems fine. Definitely will work either way. But can't hurt to use the interface