Closed jbartus closed 1 year ago
The conflict arises because a default Laravel 10 install requires Guzzle 7, which can install either guzzlehttp/promises ^1.5 or ^2.0. When you install Laravel, it of course installs the latest, i.e. 2.0.
$ composer why guzzlehttp/promises
guzzlehttp/guzzle 7.7.0 requires guzzlehttp/promises (^1.5.3 || ^2.0)
$ composer why guzzlehttp/guzzle
laravel/laravel - requires guzzlehttp/guzzle (^7.2)
However, the aws-sdk-php requires guzzlehttp/promises ^1.4, and composer won't downgrade an already locked and installed dependency without your approval.
So, a workaround is to allow composer to downgrade guzzlehttp/promises, just use what the output suggests, i.e.
$ composer require -W aws/aws-sdk-php-laravel
This worked for me.
Anyway, another way to avoid having to do that is for aws/aws-sdk-php
to add support for promises 2.0. I'm not really familiar with it enough to know if that would be easy or hard. Possibly related: https://github.com/aws/aws-sdk-php/issues/2515
This is not a bug. You need to use --with-all-dependencies
when you run require, so as to downgrade the guzzle promises library. Support for v2 cannot happen until we drop PHP 5 (https://github.com/aws/aws-sdk-php/pull/2697).
thank you!
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.
Describe the bug
a
composer require
of this package in a freshly created laravel project errors outExpected Behavior
the package to install without error
Current Behavior
Reproduction Steps
Possible Solution
No response
Additional Information/Context
I tried explicitly using laravel 10.1 instead and I get the same error. Also tried going back to 3.8.0 on this package, which gets the same type of error just with a shorter list of packages:
SDK version used
3.8.1 and 3.8.0
Environment details (OS name and version, etc.)
mac osx 12.6.2