diff --git a/manifest.json b/manifest.json index 6afc77c36..f5271a909 100644 --- a/manifest.json +++ b/manifest.json @@ -1,6 +1,6 @@ { "variables": { - "${LATEST}": "3.356.12" + "${LATEST}": "3.356.13" }, "endpoints": "https://raw.githubusercontent.com/aws/aws-sdk-php/${LATEST}/src/data/endpoints.json", "services": { diff --git a/src/Service/S3/CHANGELOG.md b/src/Service/S3/CHANGELOG.md index 952f1e353..ece631373 100644 --- a/src/Service/S3/CHANGELOG.md +++ b/src/Service/S3/CHANGELOG.md @@ -2,6 +2,10 @@ ## NOT RELEASED +### BC-BREAK + +- AWS api-change: Expires's property and its getters/setters switched from `\DateTimeImmutable` to `string`. + ## 2.10.0 ### Added diff --git a/src/Service/S3/composer.json b/src/Service/S3/composer.json index b27cb3fee..8b5e5c4c0 100644 --- a/src/Service/S3/composer.json +++ b/src/Service/S3/composer.json @@ -30,7 +30,7 @@ }, "extra": { "branch-alias": { - "dev-master": "2.10-dev" + "dev-master": "3.0-dev" } } } diff --git a/src/Service/S3/src/Input/CopyObjectRequest.php b/src/Service/S3/src/Input/CopyObjectRequest.php index 8c562338a..49f26dad5 100644 --- a/src/Service/S3/src/Input/CopyObjectRequest.php +++ b/src/Service/S3/src/Input/CopyObjectRequest.php @@ -256,7 +256,7 @@ final class CopyObjectRequest extends Input /** * The date and time at which the object is no longer cacheable. * - * @var \DateTimeImmutable|null + * @var string|null */ private $expires; @@ -713,7 +713,7 @@ final class CopyObjectRequest extends Input * CopySourceIfModifiedSince?: null|\DateTimeImmutable|string, * CopySourceIfNoneMatch?: null|string, * CopySourceIfUnmodifiedSince?: null|\DateTimeImmutable|string, - * Expires?: null|\DateTimeImmutable|string, + * Expires?: null|string, * GrantFullControl?: null|string, * GrantRead?: null|string, * GrantReadACP?: null|string, @@ -759,7 +759,7 @@ public function __construct(array $input = []) $this->copySourceIfModifiedSince = !isset($input['CopySourceIfModifiedSince']) ? null : ($input['CopySourceIfModifiedSince'] instanceof \DateTimeImmutable ? $input['CopySourceIfModifiedSince'] : new \DateTimeImmutable($input['CopySourceIfModifiedSince'])); $this->copySourceIfNoneMatch = $input['CopySourceIfNoneMatch'] ?? null; $this->copySourceIfUnmodifiedSince = !isset($input['CopySourceIfUnmodifiedSince']) ? null : ($input['CopySourceIfUnmodifiedSince'] instanceof \DateTimeImmutable ? $input['CopySourceIfUnmodifiedSince'] : new \DateTimeImmutable($input['CopySourceIfUnmodifiedSince'])); - $this->expires = !isset($input['Expires']) ? null : ($input['Expires'] instanceof \DateTimeImmutable ? $input['Expires'] : new \DateTimeImmutable($input['Expires'])); + $this->expires = $input['Expires'] ?? null; $this->grantFullControl = $input['GrantFullControl'] ?? null; $this->grantRead = $input['GrantRead'] ?? null; $this->grantReadAcp = $input['GrantReadACP'] ?? null; @@ -805,7 +805,7 @@ public function __construct(array $input = []) * CopySourceIfModifiedSince?: null|\DateTimeImmutable|string, * CopySourceIfNoneMatch?: null|string, * CopySourceIfUnmodifiedSince?: null|\DateTimeImmutable|string, - * Expires?: null|\DateTimeImmutable|string, + * Expires?: null|string, * GrantFullControl?: null|string, * GrantRead?: null|string, * GrantReadACP?: null|string, @@ -942,7 +942,7 @@ public function getExpectedSourceBucketOwner(): ?string return $this->expectedSourceBucketOwner; } - public function getExpires(): ?\DateTimeImmutable + public function getExpires(): ?string { return $this->expires; } @@ -1127,7 +1127,7 @@ public function request(): Request $headers['x-amz-copy-source-if-unmodified-since'] = $this->copySourceIfUnmodifiedSince->setTimezone(new \DateTimeZone('GMT'))->format(\DateTimeInterface::RFC7231); } if (null !== $this->expires) { - $headers['Expires'] = $this->expires->setTimezone(new \DateTimeZone('GMT'))->format(\DateTimeInterface::RFC7231); + $headers['Expires'] = $this->expires; } if (null !== $this->grantFullControl) { $headers['x-amz-grant-full-control'] = $this->grantFullControl; @@ -1392,7 +1392,7 @@ public function setExpectedSourceBucketOwner(?string $value): self return $this; } - public function setExpires(?\DateTimeImmutable $value): self + public function setExpires(?string $value): self { $this->expires = $value; diff --git a/src/Service/S3/src/Input/CreateMultipartUploadRequest.php b/src/Service/S3/src/Input/CreateMultipartUploadRequest.php index c1515758a..bf4cb3817 100644 --- a/src/Service/S3/src/Input/CreateMultipartUploadRequest.php +++ b/src/Service/S3/src/Input/CreateMultipartUploadRequest.php @@ -116,7 +116,7 @@ final class CreateMultipartUploadRequest extends Input /** * The date and time at which the object is no longer cacheable. * - * @var \DateTimeImmutable|null + * @var string|null */ private $expires; @@ -552,7 +552,7 @@ final class CreateMultipartUploadRequest extends Input * ContentEncoding?: null|string, * ContentLanguage?: null|string, * ContentType?: null|string, - * Expires?: null|\DateTimeImmutable|string, + * Expires?: null|string, * GrantFullControl?: null|string, * GrantRead?: null|string, * GrantReadACP?: null|string, @@ -588,7 +588,7 @@ public function __construct(array $input = []) $this->contentEncoding = $input['ContentEncoding'] ?? null; $this->contentLanguage = $input['ContentLanguage'] ?? null; $this->contentType = $input['ContentType'] ?? null; - $this->expires = !isset($input['Expires']) ? null : ($input['Expires'] instanceof \DateTimeImmutable ? $input['Expires'] : new \DateTimeImmutable($input['Expires'])); + $this->expires = $input['Expires'] ?? null; $this->grantFullControl = $input['GrantFullControl'] ?? null; $this->grantRead = $input['GrantRead'] ?? null; $this->grantReadAcp = $input['GrantReadACP'] ?? null; @@ -624,7 +624,7 @@ public function __construct(array $input = []) * ContentEncoding?: null|string, * ContentLanguage?: null|string, * ContentType?: null|string, - * Expires?: null|\DateTimeImmutable|string, + * Expires?: null|string, * GrantFullControl?: null|string, * GrantRead?: null|string, * GrantReadACP?: null|string, @@ -720,7 +720,7 @@ public function getExpectedBucketOwner(): ?string return $this->expectedBucketOwner; } - public function getExpires(): ?\DateTimeImmutable + public function getExpires(): ?string { return $this->expires; } @@ -867,7 +867,7 @@ public function request(): Request $headers['Content-Type'] = $this->contentType; } if (null !== $this->expires) { - $headers['Expires'] = $this->expires->setTimezone(new \DateTimeZone('GMT'))->format(\DateTimeInterface::RFC7231); + $headers['Expires'] = $this->expires; } if (null !== $this->grantFullControl) { $headers['x-amz-grant-full-control'] = $this->grantFullControl; @@ -1067,7 +1067,7 @@ public function setExpectedBucketOwner(?string $value): self return $this; } - public function setExpires(?\DateTimeImmutable $value): self + public function setExpires(?string $value): self { $this->expires = $value; diff --git a/src/Service/S3/src/Input/PutObjectRequest.php b/src/Service/S3/src/Input/PutObjectRequest.php index b22553458..f209f97ea 100644 --- a/src/Service/S3/src/Input/PutObjectRequest.php +++ b/src/Service/S3/src/Input/PutObjectRequest.php @@ -261,7 +261,7 @@ final class PutObjectRequest extends Input * * [^1]: https://www.rfc-editor.org/rfc/rfc7234#section-5.3 * - * @var \DateTimeImmutable|null + * @var string|null */ private $expires; @@ -633,7 +633,7 @@ final class PutObjectRequest extends Input * ChecksumCRC64NVME?: null|string, * ChecksumSHA1?: null|string, * ChecksumSHA256?: null|string, - * Expires?: null|\DateTimeImmutable|string, + * Expires?: null|string, * IfMatch?: null|string, * IfNoneMatch?: null|string, * GrantFullControl?: null|string, @@ -679,7 +679,7 @@ public function __construct(array $input = []) $this->checksumCrc64Nvme = $input['ChecksumCRC64NVME'] ?? null; $this->checksumSha1 = $input['ChecksumSHA1'] ?? null; $this->checksumSha256 = $input['ChecksumSHA256'] ?? null; - $this->expires = !isset($input['Expires']) ? null : ($input['Expires'] instanceof \DateTimeImmutable ? $input['Expires'] : new \DateTimeImmutable($input['Expires'])); + $this->expires = $input['Expires'] ?? null; $this->ifMatch = $input['IfMatch'] ?? null; $this->ifNoneMatch = $input['IfNoneMatch'] ?? null; $this->grantFullControl = $input['GrantFullControl'] ?? null; @@ -725,7 +725,7 @@ public function __construct(array $input = []) * ChecksumCRC64NVME?: null|string, * ChecksumSHA1?: null|string, * ChecksumSHA256?: null|string, - * Expires?: null|\DateTimeImmutable|string, + * Expires?: null|string, * IfMatch?: null|string, * IfNoneMatch?: null|string, * GrantFullControl?: null|string, @@ -857,7 +857,7 @@ public function getExpectedBucketOwner(): ?string return $this->expectedBucketOwner; } - public function getExpires(): ?\DateTimeImmutable + public function getExpires(): ?string { return $this->expires; } @@ -1046,7 +1046,7 @@ public function request(): Request $headers['x-amz-checksum-sha256'] = $this->checksumSha256; } if (null !== $this->expires) { - $headers['Expires'] = $this->expires->setTimezone(new \DateTimeZone('GMT'))->format(\DateTimeInterface::RFC7231); + $headers['Expires'] = $this->expires; } if (null !== $this->ifMatch) { $headers['If-Match'] = $this->ifMatch; @@ -1292,7 +1292,7 @@ public function setExpectedBucketOwner(?string $value): self return $this; } - public function setExpires(?\DateTimeImmutable $value): self + public function setExpires(?string $value): self { $this->expires = $value; diff --git a/src/Service/S3/src/Result/GetObjectOutput.php b/src/Service/S3/src/Result/GetObjectOutput.php index e67bec3a0..f24b57a1a 100644 --- a/src/Service/S3/src/Result/GetObjectOutput.php +++ b/src/Service/S3/src/Result/GetObjectOutput.php @@ -222,7 +222,7 @@ class GetObjectOutput extends Result /** * The date and time at which the object is no longer cacheable. * - * @var \DateTimeImmutable|null + * @var string|null */ private $expires; @@ -499,7 +499,7 @@ public function getExpiration(): ?string return $this->expiration; } - public function getExpires(): ?\DateTimeImmutable + public function getExpires(): ?string { $this->initialize(); @@ -678,7 +678,7 @@ protected function populateResult(Response $response): void $this->contentLanguage = $headers['content-language'][0] ?? null; $this->contentRange = $headers['content-range'][0] ?? null; $this->contentType = $headers['content-type'][0] ?? null; - $this->expires = isset($headers['expires'][0]) ? new \DateTimeImmutable($headers['expires'][0]) : null; + $this->expires = $headers['expires'][0] ?? null; $this->websiteRedirectLocation = $headers['x-amz-website-redirect-location'][0] ?? null; $this->serverSideEncryption = $headers['x-amz-server-side-encryption'][0] ?? null; $this->sseCustomerAlgorithm = $headers['x-amz-server-side-encryption-customer-algorithm'][0] ?? null; diff --git a/src/Service/S3/src/Result/HeadObjectOutput.php b/src/Service/S3/src/Result/HeadObjectOutput.php index 9d1f6d585..50fe19c61 100644 --- a/src/Service/S3/src/Result/HeadObjectOutput.php +++ b/src/Service/S3/src/Result/HeadObjectOutput.php @@ -241,7 +241,7 @@ class HeadObjectOutput extends Result /** * The date and time at which the object is no longer cacheable. * - * @var \DateTimeImmutable|null + * @var string|null */ private $expires; @@ -556,7 +556,7 @@ public function getExpiration(): ?string return $this->expiration; } - public function getExpires(): ?\DateTimeImmutable + public function getExpires(): ?string { $this->initialize(); @@ -736,7 +736,7 @@ protected function populateResult(Response $response): void $this->contentLanguage = $headers['content-language'][0] ?? null; $this->contentType = $headers['content-type'][0] ?? null; $this->contentRange = $headers['content-range'][0] ?? null; - $this->expires = isset($headers['expires'][0]) ? new \DateTimeImmutable($headers['expires'][0]) : null; + $this->expires = $headers['expires'][0] ?? null; $this->websiteRedirectLocation = $headers['x-amz-website-redirect-location'][0] ?? null; $this->serverSideEncryption = $headers['x-amz-server-side-encryption'][0] ?? null; $this->sseCustomerAlgorithm = $headers['x-amz-server-side-encryption-customer-algorithm'][0] ?? null; diff --git a/src/Service/S3/src/S3Client.php b/src/Service/S3/src/S3Client.php index a931dc6e9..f99dca984 100644 --- a/src/Service/S3/src/S3Client.php +++ b/src/Service/S3/src/S3Client.php @@ -530,7 +530,7 @@ public function completeMultipartUpload($input): CompleteMultipartUploadOutput * CopySourceIfModifiedSince?: null|\DateTimeImmutable|string, * CopySourceIfNoneMatch?: null|string, * CopySourceIfUnmodifiedSince?: null|\DateTimeImmutable|string, - * Expires?: null|\DateTimeImmutable|string, + * Expires?: null|string, * GrantFullControl?: null|string, * GrantRead?: null|string, * GrantReadACP?: null|string, @@ -913,7 +913,7 @@ public function createBucket($input): CreateBucketOutput * ContentEncoding?: null|string, * ContentLanguage?: null|string, * ContentType?: null|string, - * Expires?: null|\DateTimeImmutable|string, + * Expires?: null|string, * GrantFullControl?: null|string, * GrantRead?: null|string, * GrantReadACP?: null|string, @@ -2627,7 +2627,7 @@ public function putBucketTagging($input): Result * ChecksumCRC64NVME?: null|string, * ChecksumSHA1?: null|string, * ChecksumSHA256?: null|string, - * Expires?: null|\DateTimeImmutable|string, + * Expires?: null|string, * IfMatch?: null|string, * IfNoneMatch?: null|string, * GrantFullControl?: null|string,