Skip to content

Commit 2f6755b

Browse files
Update generated code (#1943)
* update generated code * Apply suggestion from @jderusse --------- Co-authored-by: Jérémy Derussé <[email protected]>
1 parent 6997695 commit 2f6755b

File tree

9 files changed

+36
-32
lines changed

9 files changed

+36
-32
lines changed

manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"variables": {
3-
"${LATEST}": "3.356.12"
3+
"${LATEST}": "3.356.13"
44
},
55
"endpoints": "https://raw.githubusercontent.com/aws/aws-sdk-php/${LATEST}/src/data/endpoints.json",
66
"services": {

src/Service/S3/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
## NOT RELEASED
44

5+
### BC-BREAK
6+
7+
- AWS api-change: Expires's property and its getters/setters switched from `\DateTimeImmutable` to `string`.
8+
59
## 2.10.0
610

711
### Added

src/Service/S3/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
},
3131
"extra": {
3232
"branch-alias": {
33-
"dev-master": "2.10-dev"
33+
"dev-master": "3.0-dev"
3434
}
3535
}
3636
}

src/Service/S3/src/Input/CopyObjectRequest.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ final class CopyObjectRequest extends Input
256256
/**
257257
* The date and time at which the object is no longer cacheable.
258258
*
259-
* @var \DateTimeImmutable|null
259+
* @var string|null
260260
*/
261261
private $expires;
262262

@@ -713,7 +713,7 @@ final class CopyObjectRequest extends Input
713713
* CopySourceIfModifiedSince?: null|\DateTimeImmutable|string,
714714
* CopySourceIfNoneMatch?: null|string,
715715
* CopySourceIfUnmodifiedSince?: null|\DateTimeImmutable|string,
716-
* Expires?: null|\DateTimeImmutable|string,
716+
* Expires?: null|string,
717717
* GrantFullControl?: null|string,
718718
* GrantRead?: null|string,
719719
* GrantReadACP?: null|string,
@@ -759,7 +759,7 @@ public function __construct(array $input = [])
759759
$this->copySourceIfModifiedSince = !isset($input['CopySourceIfModifiedSince']) ? null : ($input['CopySourceIfModifiedSince'] instanceof \DateTimeImmutable ? $input['CopySourceIfModifiedSince'] : new \DateTimeImmutable($input['CopySourceIfModifiedSince']));
760760
$this->copySourceIfNoneMatch = $input['CopySourceIfNoneMatch'] ?? null;
761761
$this->copySourceIfUnmodifiedSince = !isset($input['CopySourceIfUnmodifiedSince']) ? null : ($input['CopySourceIfUnmodifiedSince'] instanceof \DateTimeImmutable ? $input['CopySourceIfUnmodifiedSince'] : new \DateTimeImmutable($input['CopySourceIfUnmodifiedSince']));
762-
$this->expires = !isset($input['Expires']) ? null : ($input['Expires'] instanceof \DateTimeImmutable ? $input['Expires'] : new \DateTimeImmutable($input['Expires']));
762+
$this->expires = $input['Expires'] ?? null;
763763
$this->grantFullControl = $input['GrantFullControl'] ?? null;
764764
$this->grantRead = $input['GrantRead'] ?? null;
765765
$this->grantReadAcp = $input['GrantReadACP'] ?? null;
@@ -805,7 +805,7 @@ public function __construct(array $input = [])
805805
* CopySourceIfModifiedSince?: null|\DateTimeImmutable|string,
806806
* CopySourceIfNoneMatch?: null|string,
807807
* CopySourceIfUnmodifiedSince?: null|\DateTimeImmutable|string,
808-
* Expires?: null|\DateTimeImmutable|string,
808+
* Expires?: null|string,
809809
* GrantFullControl?: null|string,
810810
* GrantRead?: null|string,
811811
* GrantReadACP?: null|string,
@@ -942,7 +942,7 @@ public function getExpectedSourceBucketOwner(): ?string
942942
return $this->expectedSourceBucketOwner;
943943
}
944944

945-
public function getExpires(): ?\DateTimeImmutable
945+
public function getExpires(): ?string
946946
{
947947
return $this->expires;
948948
}
@@ -1127,7 +1127,7 @@ public function request(): Request
11271127
$headers['x-amz-copy-source-if-unmodified-since'] = $this->copySourceIfUnmodifiedSince->setTimezone(new \DateTimeZone('GMT'))->format(\DateTimeInterface::RFC7231);
11281128
}
11291129
if (null !== $this->expires) {
1130-
$headers['Expires'] = $this->expires->setTimezone(new \DateTimeZone('GMT'))->format(\DateTimeInterface::RFC7231);
1130+
$headers['Expires'] = $this->expires;
11311131
}
11321132
if (null !== $this->grantFullControl) {
11331133
$headers['x-amz-grant-full-control'] = $this->grantFullControl;
@@ -1392,7 +1392,7 @@ public function setExpectedSourceBucketOwner(?string $value): self
13921392
return $this;
13931393
}
13941394

1395-
public function setExpires(?\DateTimeImmutable $value): self
1395+
public function setExpires(?string $value): self
13961396
{
13971397
$this->expires = $value;
13981398

src/Service/S3/src/Input/CreateMultipartUploadRequest.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ final class CreateMultipartUploadRequest extends Input
116116
/**
117117
* The date and time at which the object is no longer cacheable.
118118
*
119-
* @var \DateTimeImmutable|null
119+
* @var string|null
120120
*/
121121
private $expires;
122122

@@ -552,7 +552,7 @@ final class CreateMultipartUploadRequest extends Input
552552
* ContentEncoding?: null|string,
553553
* ContentLanguage?: null|string,
554554
* ContentType?: null|string,
555-
* Expires?: null|\DateTimeImmutable|string,
555+
* Expires?: null|string,
556556
* GrantFullControl?: null|string,
557557
* GrantRead?: null|string,
558558
* GrantReadACP?: null|string,
@@ -588,7 +588,7 @@ public function __construct(array $input = [])
588588
$this->contentEncoding = $input['ContentEncoding'] ?? null;
589589
$this->contentLanguage = $input['ContentLanguage'] ?? null;
590590
$this->contentType = $input['ContentType'] ?? null;
591-
$this->expires = !isset($input['Expires']) ? null : ($input['Expires'] instanceof \DateTimeImmutable ? $input['Expires'] : new \DateTimeImmutable($input['Expires']));
591+
$this->expires = $input['Expires'] ?? null;
592592
$this->grantFullControl = $input['GrantFullControl'] ?? null;
593593
$this->grantRead = $input['GrantRead'] ?? null;
594594
$this->grantReadAcp = $input['GrantReadACP'] ?? null;
@@ -624,7 +624,7 @@ public function __construct(array $input = [])
624624
* ContentEncoding?: null|string,
625625
* ContentLanguage?: null|string,
626626
* ContentType?: null|string,
627-
* Expires?: null|\DateTimeImmutable|string,
627+
* Expires?: null|string,
628628
* GrantFullControl?: null|string,
629629
* GrantRead?: null|string,
630630
* GrantReadACP?: null|string,
@@ -720,7 +720,7 @@ public function getExpectedBucketOwner(): ?string
720720
return $this->expectedBucketOwner;
721721
}
722722

723-
public function getExpires(): ?\DateTimeImmutable
723+
public function getExpires(): ?string
724724
{
725725
return $this->expires;
726726
}
@@ -867,7 +867,7 @@ public function request(): Request
867867
$headers['Content-Type'] = $this->contentType;
868868
}
869869
if (null !== $this->expires) {
870-
$headers['Expires'] = $this->expires->setTimezone(new \DateTimeZone('GMT'))->format(\DateTimeInterface::RFC7231);
870+
$headers['Expires'] = $this->expires;
871871
}
872872
if (null !== $this->grantFullControl) {
873873
$headers['x-amz-grant-full-control'] = $this->grantFullControl;
@@ -1067,7 +1067,7 @@ public function setExpectedBucketOwner(?string $value): self
10671067
return $this;
10681068
}
10691069

1070-
public function setExpires(?\DateTimeImmutable $value): self
1070+
public function setExpires(?string $value): self
10711071
{
10721072
$this->expires = $value;
10731073

src/Service/S3/src/Input/PutObjectRequest.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ final class PutObjectRequest extends Input
261261
*
262262
* [^1]: https://www.rfc-editor.org/rfc/rfc7234#section-5.3
263263
*
264-
* @var \DateTimeImmutable|null
264+
* @var string|null
265265
*/
266266
private $expires;
267267

@@ -633,7 +633,7 @@ final class PutObjectRequest extends Input
633633
* ChecksumCRC64NVME?: null|string,
634634
* ChecksumSHA1?: null|string,
635635
* ChecksumSHA256?: null|string,
636-
* Expires?: null|\DateTimeImmutable|string,
636+
* Expires?: null|string,
637637
* IfMatch?: null|string,
638638
* IfNoneMatch?: null|string,
639639
* GrantFullControl?: null|string,
@@ -679,7 +679,7 @@ public function __construct(array $input = [])
679679
$this->checksumCrc64Nvme = $input['ChecksumCRC64NVME'] ?? null;
680680
$this->checksumSha1 = $input['ChecksumSHA1'] ?? null;
681681
$this->checksumSha256 = $input['ChecksumSHA256'] ?? null;
682-
$this->expires = !isset($input['Expires']) ? null : ($input['Expires'] instanceof \DateTimeImmutable ? $input['Expires'] : new \DateTimeImmutable($input['Expires']));
682+
$this->expires = $input['Expires'] ?? null;
683683
$this->ifMatch = $input['IfMatch'] ?? null;
684684
$this->ifNoneMatch = $input['IfNoneMatch'] ?? null;
685685
$this->grantFullControl = $input['GrantFullControl'] ?? null;
@@ -725,7 +725,7 @@ public function __construct(array $input = [])
725725
* ChecksumCRC64NVME?: null|string,
726726
* ChecksumSHA1?: null|string,
727727
* ChecksumSHA256?: null|string,
728-
* Expires?: null|\DateTimeImmutable|string,
728+
* Expires?: null|string,
729729
* IfMatch?: null|string,
730730
* IfNoneMatch?: null|string,
731731
* GrantFullControl?: null|string,
@@ -857,7 +857,7 @@ public function getExpectedBucketOwner(): ?string
857857
return $this->expectedBucketOwner;
858858
}
859859

860-
public function getExpires(): ?\DateTimeImmutable
860+
public function getExpires(): ?string
861861
{
862862
return $this->expires;
863863
}
@@ -1046,7 +1046,7 @@ public function request(): Request
10461046
$headers['x-amz-checksum-sha256'] = $this->checksumSha256;
10471047
}
10481048
if (null !== $this->expires) {
1049-
$headers['Expires'] = $this->expires->setTimezone(new \DateTimeZone('GMT'))->format(\DateTimeInterface::RFC7231);
1049+
$headers['Expires'] = $this->expires;
10501050
}
10511051
if (null !== $this->ifMatch) {
10521052
$headers['If-Match'] = $this->ifMatch;
@@ -1292,7 +1292,7 @@ public function setExpectedBucketOwner(?string $value): self
12921292
return $this;
12931293
}
12941294

1295-
public function setExpires(?\DateTimeImmutable $value): self
1295+
public function setExpires(?string $value): self
12961296
{
12971297
$this->expires = $value;
12981298

src/Service/S3/src/Result/GetObjectOutput.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ class GetObjectOutput extends Result
222222
/**
223223
* The date and time at which the object is no longer cacheable.
224224
*
225-
* @var \DateTimeImmutable|null
225+
* @var string|null
226226
*/
227227
private $expires;
228228

@@ -499,7 +499,7 @@ public function getExpiration(): ?string
499499
return $this->expiration;
500500
}
501501

502-
public function getExpires(): ?\DateTimeImmutable
502+
public function getExpires(): ?string
503503
{
504504
$this->initialize();
505505

@@ -678,7 +678,7 @@ protected function populateResult(Response $response): void
678678
$this->contentLanguage = $headers['content-language'][0] ?? null;
679679
$this->contentRange = $headers['content-range'][0] ?? null;
680680
$this->contentType = $headers['content-type'][0] ?? null;
681-
$this->expires = isset($headers['expires'][0]) ? new \DateTimeImmutable($headers['expires'][0]) : null;
681+
$this->expires = $headers['expires'][0] ?? null;
682682
$this->websiteRedirectLocation = $headers['x-amz-website-redirect-location'][0] ?? null;
683683
$this->serverSideEncryption = $headers['x-amz-server-side-encryption'][0] ?? null;
684684
$this->sseCustomerAlgorithm = $headers['x-amz-server-side-encryption-customer-algorithm'][0] ?? null;

src/Service/S3/src/Result/HeadObjectOutput.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ class HeadObjectOutput extends Result
241241
/**
242242
* The date and time at which the object is no longer cacheable.
243243
*
244-
* @var \DateTimeImmutable|null
244+
* @var string|null
245245
*/
246246
private $expires;
247247

@@ -556,7 +556,7 @@ public function getExpiration(): ?string
556556
return $this->expiration;
557557
}
558558

559-
public function getExpires(): ?\DateTimeImmutable
559+
public function getExpires(): ?string
560560
{
561561
$this->initialize();
562562

@@ -736,7 +736,7 @@ protected function populateResult(Response $response): void
736736
$this->contentLanguage = $headers['content-language'][0] ?? null;
737737
$this->contentType = $headers['content-type'][0] ?? null;
738738
$this->contentRange = $headers['content-range'][0] ?? null;
739-
$this->expires = isset($headers['expires'][0]) ? new \DateTimeImmutable($headers['expires'][0]) : null;
739+
$this->expires = $headers['expires'][0] ?? null;
740740
$this->websiteRedirectLocation = $headers['x-amz-website-redirect-location'][0] ?? null;
741741
$this->serverSideEncryption = $headers['x-amz-server-side-encryption'][0] ?? null;
742742
$this->sseCustomerAlgorithm = $headers['x-amz-server-side-encryption-customer-algorithm'][0] ?? null;

src/Service/S3/src/S3Client.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -530,7 +530,7 @@ public function completeMultipartUpload($input): CompleteMultipartUploadOutput
530530
* CopySourceIfModifiedSince?: null|\DateTimeImmutable|string,
531531
* CopySourceIfNoneMatch?: null|string,
532532
* CopySourceIfUnmodifiedSince?: null|\DateTimeImmutable|string,
533-
* Expires?: null|\DateTimeImmutable|string,
533+
* Expires?: null|string,
534534
* GrantFullControl?: null|string,
535535
* GrantRead?: null|string,
536536
* GrantReadACP?: null|string,
@@ -913,7 +913,7 @@ public function createBucket($input): CreateBucketOutput
913913
* ContentEncoding?: null|string,
914914
* ContentLanguage?: null|string,
915915
* ContentType?: null|string,
916-
* Expires?: null|\DateTimeImmutable|string,
916+
* Expires?: null|string,
917917
* GrantFullControl?: null|string,
918918
* GrantRead?: null|string,
919919
* GrantReadACP?: null|string,
@@ -2627,7 +2627,7 @@ public function putBucketTagging($input): Result
26272627
* ChecksumCRC64NVME?: null|string,
26282628
* ChecksumSHA1?: null|string,
26292629
* ChecksumSHA256?: null|string,
2630-
* Expires?: null|\DateTimeImmutable|string,
2630+
* Expires?: null|string,
26312631
* IfMatch?: null|string,
26322632
* IfNoneMatch?: null|string,
26332633
* GrantFullControl?: null|string,

0 commit comments

Comments
 (0)