Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version 3.311.0 always triggers “Aws\\Command::setAuthSchemes is deprecated” #2937

Closed
adlcadn opened this issue Jun 6, 2024 · 8 comments
Assignees
Labels
bug This issue is a bug. queued This issues is on the AWS team's backlog

Comments

@adlcadn
Copy link

adlcadn commented Jun 6, 2024

Describe the bug

Version 3.311.0 systematically triggers “Aws\Command::setAuthSchemes is deprecated” when calling S3Client to store or access objects in a bucket.

Expected Behavior

No error.

Current Behavior

ERROR at 2024-06-05 20:36:20 in ErrorException :
Aws\Command::setAuthSchemes is deprecated. Auth schemes resolved using the service auth trait or via endpoint resolution are now set in the command @context property.` in /var/app/current/vendor/aws/aws-sdk-php/src/Command.php(78)
#1 : /var/app/current/vendor/aws/aws-sdk-php/src/Command.php (78) : trigger_error
#2 : /var/app/current/vendor/aws/aws-sdk-php/src/EndpointV2/EndpointV2Middleware.php (234) : setAuthSchemes : Aws\Command : ->
#3 : /var/app/current/vendor/aws/aws-sdk-php/src/EndpointV2/EndpointV2Middleware.php (95) : applyAuthScheme : Aws\EndpointV2\EndpointV2Middleware : ->
#4 : /var/app/current/vendor/aws/aws-sdk-php/src/Auth/AuthSelectionMiddleware.php (97) : __invoke : Aws\EndpointV2\EndpointV2Middleware : ->
#5 : /var/app/current/vendor/aws/aws-sdk-php/src/InputValidationMiddleware.php (73) : __invoke : Aws\Auth\AuthSelectionMiddleware : ->
#6 : /var/app/current/vendor/aws/aws-sdk-php/src/Middleware.php (90) : __invoke : Aws\InputValidationMiddleware : ->
#7 : /var/app/current/vendor/aws/aws-sdk-php/src/S3/S3Client.php (627) : Aws\{closure} : Aws\Middleware : ::
#8 : /var/app/current/vendor/aws/aws-sdk-php/src/S3/S3Client.php (650) : Aws\S3\{closure} : Aws\S3\S3Client : ::
#9 : /var/app/current/vendor/aws/aws-sdk-php/src/S3/S3Client.php (584) : Aws\S3\{closure} : Aws\S3\S3Client : ::
#10 : /var/app/current/vendor/aws/aws-sdk-php/src/S3/S3Client.php (603) : Aws\S3\{closure} : Aws\S3\S3Client : ::
#11 : /var/app/current/vendor/aws/aws-sdk-php/src/Middleware.php (58) : Aws\S3\{closure} : Aws\S3\S3Client : ::
#12 : /var/app/current/vendor/aws/aws-sdk-php/src/S3/SSECMiddleware.php (59) : Aws\{closure} : Aws\Middleware : ::
#13 : /var/app/current/vendor/aws/aws-sdk-php/src/IdempotencyTokenMiddleware.php (77) : __invoke : Aws\S3\SSECMiddleware : ->
#14 : /var/app/current/vendor/aws/aws-sdk-php/src/AwsClientTrait.php (64) : __invoke : Aws\IdempotencyTokenMiddleware : ->
#15 : /var/app/current/vendor/aws/aws-sdk-php/src/AwsClientTrait.php (58) : executeAsync : Aws\AwsClient : ->
#16 : /var/app/current/vendor/aws/aws-sdk-php/src/AwsClientTrait.php (86) : execute : Aws\AwsClient : ->
#17 : /var/app/current/src/db/S3Manager.php (132) : __call : Aws\AwsClient : ->
#18 : /var/app/current/src/objects/ExcelWriter.php (54) : saveFile : Bepay\Db\S3Manager : ->
#19 : /var/app/current/src/docs/docCompta.php (445) : saveS3 : Bepay\Objects\ExcelWriter
...

Reproduction Steps

Exemple of call :

$result = $this->s3->putObject([
				'Bucket' => $theBucket,
				'ServerSideEncryption' => 'aws:kms',
				'SSEKMSKeyId' => $this->kmskey,
				'Key' => $key,
				'SourceFile' => $file
			]);

or
$this->s3->doesObjectExist($bucket, $key)

Possible Solution

No response

Additional Information/Context

No response

SDK version used

3.311.0

Environment details (Version of PHP (php -v)? OS name and version, etc.)

PHP 8.2 running on 64bit Amazon Linux 2023/4.1.3

@adlcadn adlcadn added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Jun 6, 2024
@adlcadn adlcadn changed the title Version 3.311.0 always triggers “Aws\\Command::setAuthSchemes is deprecated”.(short issue description) Version 3.311.0 always triggers “Aws\\Command::setAuthSchemes is deprecated” Jun 6, 2024
@fernandoval
Copy link

Same problem here.

This broke my app.

I'm downgrading to 3.310.0 until it's resolved.

@Patfreeze
Copy link

Same problem here, deprecated must not brake code, the problem is that it use "trigger_error".

@stobrien89 stobrien89 self-assigned this Jun 6, 2024
@yenfryherrerafeliz yenfryherrerafeliz added queued This issues is on the AWS team's backlog and removed needs-triage This issue or PR still needs to be triaged. labels Jun 6, 2024
@stobrien89
Copy link
Member

stobrien89 commented Jun 6, 2024

Sorry to hear about the issues @fernandoval and @Patfreeze. Working on a fix for this right now. Out of curiosity, are either of you using custom error handlers?

@stobrien89
Copy link
Member

This should be fixed as of today's release. Please let us know if you have any issues after updating.

@Patfreeze
Copy link

@stobrien89 Yes we use a custom error handlers. After the fix of today, it work. Thanks for the quick fix.

@fernandoval
Copy link

@stobrien89 Yes, we use a custom error handler. The app can be configured to ignore E_USER_DEPRECATED exceptions, but this goes against our internal zero-error policy.

Problem resolved. Thank you for your quick response.

@stobrien89
Copy link
Member

@fernandoval and @Patfreeze,

Glad the issue is resolved. We kept a call to a deprecated method and suppressed it, but in hindsight I think we would have been better off removing it when we first released those changes. Thanks for your patience— closing this now.

Copy link

github-actions bot commented Jun 7, 2024

This issue is now closed. Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug. queued This issues is on the AWS team's backlog
Projects
None yet
Development

No branches or pull requests

5 participants