Skip to content

Commit 5a29ec0

Browse files
authored
8.3 support (#2867)
1 parent e9d7c0e commit 5a29ec0

8 files changed

+30
-7
lines changed

.changes/nextrelease/8_3-support.json

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
[
2+
{
3+
"type": "feature",
4+
"category": "",
5+
"description": "Adds support for the PHP 8.3 runtime"
6+
}
7+
]

.github/workflows/tests.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
strategy:
3535
#for each of the following versions of PHP, with and without --prefer-lowest
3636
matrix:
37-
php-versions: ['7.2.5', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2']
37+
php-versions: ['7.2.5', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3']
3838
composer-options: ['', '--prefer-lowest']
3939
#set the name for each job
4040
name: PHP ${{ matrix.php-versions }} ${{ matrix.composer-options }}

src/Crypto/AesGcmDecryptingStream.php

+8
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,11 @@ class AesGcmDecryptingStream implements AesStreamInterface
2929

3030
private $tagLength;
3131

32+
/**
33+
* @var StreamInterface
34+
*/
35+
private $stream;
36+
3237
/**
3338
* @param StreamInterface $cipherText
3439
* @param string $key
@@ -54,6 +59,9 @@ public function __construct(
5459
$this->aad = $aad;
5560
$this->tagLength = $tagLength;
5661
$this->keySize = $keySize;
62+
// unsetting the property forces the first access to go through
63+
// __get().
64+
unset($this->stream);
5765
}
5866

5967
public function getOpenSslName()

src/Crypto/AesGcmEncryptingStream.php

+8
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,11 @@ class AesGcmEncryptingStream implements AesStreamInterface, AesStreamInterfaceV2
2929

3030
private $tagLength;
3131

32+
/**
33+
* @var StreamInterface
34+
*/
35+
private $stream;
36+
3237
/**
3338
* Same as non-static 'getAesName' method, allowing calls in a static
3439
* context.
@@ -63,6 +68,9 @@ public function __construct(
6368
$this->aad = $aad;
6469
$this->tagLength = $tagLength;
6570
$this->keySize = $keySize;
71+
// unsetting the property forces the first access to go through
72+
// __get().
73+
unset($this->stream);
6674
}
6775

6876
public function getOpenSslName()

src/PresignUrlMiddleware.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public static function wrap(
5959
public function __invoke(CommandInterface $cmd, RequestInterface $request = null)
6060
{
6161
if (in_array($cmd->getName(), $this->commandPool)
62-
&& (!isset($cmd->{'__skip' . $cmd->getName()}))
62+
&& (!isset($cmd['__skip' . $cmd->getName()]))
6363
) {
6464
$cmd['DestinationRegion'] = $this->client->getRegion();
6565
if (!empty($cmd['SourceRegion']) && !empty($cmd[$this->presignParam])) {
@@ -84,7 +84,7 @@ private function createPresignedUrl(
8484
$cmdName = $cmd->getName();
8585
$newCmd = $client->getCommand($cmdName, $cmd->toArray());
8686
// Avoid infinite recursion by flagging the new command.
87-
$newCmd->{'__skip' . $cmdName} = true;
87+
$newCmd['__skip' . $cmdName] = true;
8888

8989
// Serialize a request for the operation.
9090
$request = \Aws\serialize($newCmd);

tests/AbstractConfigurationProviderTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ public function testsPersistsToCache()
8080
$ref = new \ReflectionClass('\Aws\AbstractConfigurationProvider');
8181
$property = $ref->getProperty('interfaceClass');
8282
$property->setAccessible(true);
83-
$property->setValue('\Aws\ResultInterface');
83+
$property->setValue(null,'\Aws\ResultInterface');
8484

8585
$timesCalled = 0;
8686
$volatileProvider = function () use ($expected, &$timesCalled) {

tests/EndpointDiscovery/EndpointDiscoveryMiddlewareTest.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -662,7 +662,7 @@ public function testCallsDiscoveryApiOnInvalidEndpointException($exception)
662662
'discoveryCooldown'
663663
);
664664
$reflection->setAccessible(true);
665-
$reflection->setValue(0);
665+
$reflection->setValue(null, 0);
666666
$callOrder = [];
667667
$handler = function (
668668
CommandInterface $cmd,
@@ -672,7 +672,7 @@ public function testCallsDiscoveryApiOnInvalidEndpointException($exception)
672672
// On the second trip to DescribeEndpoints, can set discoveryCooldown
673673
// back to 60, allowing failure to occur naturally on next pass
674674
if (in_array('describe', $callOrder)) {
675-
$reflection->setValue(60);
675+
$reflection->setValue(null, 60);
676676
}
677677
$callOrder[] = 'describe';
678678
return $this->generateSingleDescribeResult();

tests/QueryCompatibleInputMiddlewareTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public function testEmitsWarning($inputParam, $inputValue, $expected, $type)
2626
{
2727
$this->expectWarning();
2828
$this->expectWarningMessage(
29-
"The provided type for `${inputParam}` value was `"
29+
"The provided type for `{$inputParam}` value was `"
3030
. (gettype($inputValue) === 'double' ? 'float' : gettype($inputValue))
3131
. "`. The modeled type is `{$type}`."
3232
);

0 commit comments

Comments
 (0)