So we have a Laravel 5.1 API running on our systems, and use the AWS SDK for php for pushing jobs to Amazon SQS and using the S3 buckets for storing avatars, attachments etc.
Except that the last time we ran composer update, the AWS SDK downloaded was version 3.18.15, which seems to break those two exact functionalities.
Both job despatch and image rendering from s3 (by getting the file using Storage::get() ) fails, with problems indicative of a fundamental change in the libraries.
The main reason I suspect the SDK update is because when I loaded the older version(3.18.12) from the composer cache all of the said functionalities worked fine. This update seems to break it.
Did any of you come across this behaviour? Is there anything that I can do to help fix this?
Code for rendering the file :
$cachedImg = Image::cache(
function ($image) use ($width, $height, $remote, $id) {
$image = $image->make($remote->get($id));
if (empty($width) && empty($height)) {
return;
}
$image->resize(
$width,
$height,
function ($constraint) {
$constraint->aspectRatio();
}
);
},
60 /* lifetime: 60 minutes */,
true
);
I am only getting an exception of "unable to init from given binary data" for this, and the stack trace for pushing a job is weirder.
exception 'Exception' with message 'String could not be parsed as XML' in /home/mdapi/api/MyDoc-API-2.0/vendor/aws/aws-sdk-php/src/Api/Parser/PayloadParserTrait.php:39
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire