We have updated our web site to PHP 8.2 and now the AWS SDK is throwing errors. I am not sure where to look in the files to figure out what version of the SDK I have installed. And it is very unclear which PHP version I can use with the SDK – does the most recent version work in PHP 8.2 at all?
My development site which is still on PHP 7.4 works but on PHP 8.2 I get
Error thrown
Unknown named parameter $instance
$credentials = new AwsCredentialsCredentials('XXXXXXXXXXXXXXXXXXX', 'YYYYYYYYYYYYYYYYYYYY');
$client = new AwsS3S3Client([
'version' => 'latest',
'region' => 'us-east-1',
'credentials' => $credentials
]);
and I have opened several of the SDK files to try to find a version or something.
And I don’t know if I update to the latest SDK – will it work with 8.2?
2
Answers
assuming you installed with composer use this
The latest aws/aws-sdk-php (3.278.1) works well with php 8.2. You will maybe have to update your code according to the latest php and sdk modifications.