aws / aws-sdk-php-laravel

A Laravel 5+ (and 4) service provider for the AWS SDK for PHP
http://aws.amazon.com/sdkforphp/
Apache License 2.0
1.65k stars 245 forks source link

aws-sdk-php (3.281.13) generates error #235

Closed closca closed 1 year ago

closca commented 1 year ago

Describe the bug

composer.json has "aws/aws-sdk-php": "~3.0" and on composer install/update will take version 3.281.13 unfortunatly, aws-sdk-php-laravel is not ready for version 3.281.13 as it throws the following error TypeError Aws\EndpointV2\EndpointProviderV2::__construct(): Argument #1 ($ruleset) must be of type array, null given, called in /vendor/aws/aws-sdk-php/src/ClientResolver.php on line 1049

Expected Behavior

To send correct arguments

Current Behavior

Throws error

Reproduction Steps

Install lates version of aws-sdk-php-laravel

Possible Solution

As emergency, we've locked the version into project root composer.json to "aws/aws-sdk-php": "3.281.12"

Additional Information/Context

No response

SDK version used

3.8.1

Environment details (OS name and version, etc.)

Ubuntu 22.04

SamRemis commented 1 year ago

Hi there, @closca, could you please let us know what service client you are trying to initialize when this error is thrown? If possible, please the code for your client constructor with any personal information redacted and we will investigate

SamRemis commented 1 year ago

Just to update, I attempted to reproduce this by initializing one copy of each service client in a laravel application; no issue occurred. This was done on the version that you reported (3.281.13).

Given that no one else has reported this issue, it's possible that you experienced a rare glitch that has impacted a few of our customers where composer installed two versions of the SDK and it led to a mismatch in versions. I have a few follow-up questions:

  1. Did you only try the composer install/update once? Could you try upgrading again and let us know if the issue persists?
  2. If it is still broken, could you share with us the chunk of code that is causing this issue and a bit more about your environment? Specifically the laravel version and the PHP version
  3. Do you know what version you were upgrading from? Is this an update that you do frequently, or were you upgrading from a version which was much older?
SamRemis commented 1 year ago

In case anyone else runs into this, someone opened a discussion in the upstream repository for this who was running into the same issue. The fix for this has already been merged and will be included in tomorrow's release.

This issue was specific to one single version of Cloudfront client, and the last version impacted by this bug will be 3.282.0.

github-actions[bot] commented 1 year ago

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.