Skip to content

Commit 25cbc15

Browse files
authored
1 parent dfa1307 commit 25cbc15

8 files changed

+41
-20
lines changed

ext/date/php_date.stub.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@
5454
* @var string
5555
* @cvalue DATE_FORMAT_RFC7231
5656
*/
57+
#[\Deprecated(since: '8.5', message: "as this format ignores the associated timezone and always uses GMT")]
5758
const DATE_RFC7231 = "D, d M Y H:i:s \\G\\M\\T";
5859

5960
/**
@@ -287,7 +288,6 @@ function date_sun_info(int $timestamp, float $latitude, float $longitude): array
287288

288289
interface DateTimeInterface
289290
{
290-
291291
public const string ATOM = DATE_ATOM;
292292

293293
public const string COOKIE = DATE_COOKIE;
@@ -304,6 +304,7 @@ interface DateTimeInterface
304304

305305
public const string RFC1123 = DATE_RFC1123;
306306

307+
#[\Deprecated(since: '8.5', message: "as this format ignores the associated timezone and always uses GMT")]
307308
public const string RFC7231 = DATE_RFC7231;
308309

309310
public const string RFC2822 = DATE_RFC2822;

ext/date/php_date_arginfo.h

Lines changed: 18 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ext/date/tests/DateTimeImmutable_constants.phpt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,10 @@ var_dump(
2121
);
2222

2323
?>
24-
--EXPECT--
24+
--EXPECTF--
25+
Deprecated: Constant DATE_RFC7231 is deprecated since 8.5, as this format ignores the associated timezone and always uses GMT in %s on line %d
26+
27+
Deprecated: Constant DateTimeInterface::RFC7231 is deprecated since 8.5, as this format ignores the associated timezone and always uses GMT in %s on line %d
2528
bool(true)
2629
bool(true)
2730
bool(true)

ext/date/tests/DateTimeInterface_constants.phpt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,10 @@ var_dump(
2121
);
2222

2323
?>
24-
--EXPECT--
24+
--EXPECTF--
25+
Deprecated: Constant DATE_RFC7231 is deprecated since 8.5, as this format ignores the associated timezone and always uses GMT in %s on line %d
26+
27+
Deprecated: Constant DateTimeInterface::RFC7231 is deprecated since 8.5, as this format ignores the associated timezone and always uses GMT in %s on line %d
2528
bool(true)
2629
bool(true)
2730
bool(true)

ext/date/tests/DateTime_constants.phpt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,10 @@ var_dump(
2121
);
2222

2323
?>
24-
--EXPECT--
24+
--EXPECTF--
25+
Deprecated: Constant DATE_RFC7231 is deprecated since 8.5, as this format ignores the associated timezone and always uses GMT in %s on line %d
26+
27+
Deprecated: Constant DateTimeInterface::RFC7231 is deprecated since 8.5, as this format ignores the associated timezone and always uses GMT in %s on line %d
2528
bool(true)
2629
bool(true)
2730
bool(true)

ext/date/tests/DateTime_format_basic2.phpt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ var_dump($date->format(DateTime::RSS));
2424
var_dump($date->format(DateTime::W3C));
2525

2626
?>
27-
--EXPECT--
27+
--EXPECTF--
2828
*** Testing date_format() : basic functionality - formatting constants ***
2929
string(25) "2005-07-14T22:30:41+01:00"
3030
string(34) "Thursday, 14-Jul-2005 22:30:41 BST"
@@ -34,6 +34,8 @@ string(29) "Thu, 14 Jul 05 22:30:41 +0100"
3434
string(32) "Thursday, 14-Jul-05 22:30:41 BST"
3535
string(29) "Thu, 14 Jul 05 22:30:41 +0100"
3636
string(31) "Thu, 14 Jul 2005 22:30:41 +0100"
37+
38+
Deprecated: Constant DateTimeInterface::RFC7231 is deprecated since 8.5, as this format ignores the associated timezone and always uses GMT in %s on line %d
3739
string(29) "Thu, 14 Jul 2005 22:30:41 GMT"
3840
string(31) "Thu, 14 Jul 2005 22:30:41 +0100"
3941
string(25) "2005-07-14T22:30:41+01:00"

ext/date/tests/bug74080.phpt

Lines changed: 0 additions & 11 deletions
This file was deleted.

ext/date/tests/date_constants.phpt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ Date constants
4444
DATE_W3C == DateTime::W3C
4545
);
4646
?>
47-
--EXPECT--
47+
--EXPECTF--
48+
Deprecated: Constant DATE_RFC7231 is deprecated since 8.5, as this format ignores the associated timezone and always uses GMT in %s on line %d
4849
string(25) "2006-07-01T14:27:30+02:00"
4950
string(25) "2006-05-30T14:32:13+02:00"
5051
string(35) "Saturday, 01-Jul-2006 14:27:30 CEST"
@@ -74,6 +75,10 @@ string(31) "Tue, 30 May 2006 14:32:13 +0200"
7475
string(25) "2006-07-01T14:27:30+02:00"
7576
string(25) "2006-05-30T14:32:13+02:00"
7677

78+
79+
Deprecated: Constant DATE_RFC7231 is deprecated since 8.5, as this format ignores the associated timezone and always uses GMT in %s on line %d
80+
81+
Deprecated: Constant DateTimeInterface::RFC7231 is deprecated since 8.5, as this format ignores the associated timezone and always uses GMT in %s on line %d
7782
bool(true)
7883
bool(true)
7984
bool(true)

0 commit comments

Comments
 (0)