php-sparkpost icon indicating copy to clipboard operation
php-sparkpost copied to clipboard

Guzzle 6

Open AlexanderBech opened this issue 3 years ago • 9 comments

Hi,

I got a composer package that requires guzzle 7.4. But can't upgrade to guzzle 7.4 because it says php-sparkpost needs guzzle 6. What to do?

AlexanderBech avatar Mar 10 '22 12:03 AlexanderBech

Any updates on this?

ainsleyclark avatar Nov 07 '22 14:11 ainsleyclark

This seems to work: composer require php-http/guzzle7-adapter Then: use Http\Adapter\Guzzle7\Client as GuzzleAdapter;

ainsleyclark avatar Nov 07 '22 14:11 ainsleyclark

@ainsleyclark Thanks for this. You just saved me hours! And just in time as well.

But the package should be updated.

phpfui avatar Nov 07 '22 15:11 phpfui

Glad I could help, yeah would be good if this is updated to 7

ainsleyclark avatar Nov 07 '22 15:11 ainsleyclark

I'm a little confused about the issue here. The sparkpost package itself does not require guzzle at all, it's only the readme that tells you to install guzzle 6. Are you saying the readme should be updated?

andrews05 avatar Feb 16 '23 20:02 andrews05

The sparkpost composer.json references Guzzle 6. It would be good to get it updated to 7 to fix above. It's cross referenced; you can't use this package with another package that uses Guzzle 7.

ainsleyclark avatar Feb 16 '23 21:02 ainsleyclark

The reference is in dev dependencies though, which is only relevant to the package developers, not the package users (us). I just tried a fresh install, it works fine with guzzle 7. (The readme says to install guzzle 6, but there's no reason why you can't install guzzle 7 instead)

andrews05 avatar Feb 16 '23 21:02 andrews05

It's probably an edge case but I guess we've still encountered it during development.

ainsleyclark avatar Feb 16 '23 21:02 ainsleyclark

Yeah, I admit I've had difficulty upgrading from guzzle 6 to 7 when v6 is currently installed. But this isn't really a fault of the sparkpost package - changing the dev dependency to v7 wouldn't resolve that.

andrews05 avatar Feb 16 '23 21:02 andrews05