Skip to content

Conversation

@deluxetom
Copy link
Contributor

Fix PHP 8.5 deprecation warning for DateTimeInterface::RFC7231 constant by using RFC1123 instead.

if ('RFC822' === $format) {
$variable .= '->setTimezone(new \\DateTimeZone("GMT"))';
$format = 'RFC7231';
// Use RFC1123 instead of deprecated RFC7231 constant (PHP 8.5+)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

\DateTimeInterface::RFC1123 is identical to \DateTimeInterface::RFC822.
Which encodes GMT's timezone in +0000 and was an issue for MinIO (#1213)

We used RFC7231 instead of RFC822 in a similar way to the official PHP sdk.

If the constant is deprecated, then I suggest returning $variable . '->format(\'D, d M Y H:i:s \G\M\T\')';

Copy link
Contributor Author

@deluxetom deluxetom Jan 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, I can do that

final class DataType
{
public const FLOAT_32 = 'float32';
public const UNKNOWN_TO_SDK = 'UNKNOWN_TO_SDK';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We be fixed in a dedicated PR #2026

@deluxetom deluxetom requested a review from jderusse January 5, 2026 18:23
@jderusse
Copy link
Member

jderusse commented Jan 5, 2026

could you please rebase your PR, to fix issue with s3vectors

@deluxetom
Copy link
Contributor Author

@jderusse let me know if this fix works for you, thanks!

@jderusse jderusse merged commit e80e79f into async-aws:master Jan 6, 2026
12 checks passed
@jderusse
Copy link
Member

jderusse commented Jan 6, 2026

thank you @deluxetom

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Deprecated constant in PHP 8.5 DateTimeInterface::RFC7231

2 participants