php-sparkpost
php-sparkpost copied to clipboard
Guzzle 6
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?
Any updates on this?
This seems to work:
composer require php-http/guzzle7-adapter
Then:
use Http\Adapter\Guzzle7\Client as GuzzleAdapter;
@ainsleyclark Thanks for this. You just saved me hours! And just in time as well.
But the package should be updated.
Glad I could help, yeah would be good if this is updated to 7
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?
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.
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)
It's probably an edge case but I guess we've still encountered it during development.
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.