-
Notifications
You must be signed in to change notification settings - Fork 92
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
SparkPostResponse incompatible with psr/http-message v2's ResponseInterface #212
Comments
Just ran into this as well. In case you want to support both versions of psr/http-message it might be possible to use PHP's |
+1 |
I've created a PR that todes the adaptation to psr http messge 2.0 but with it has a breaking change that can't be avoided due to the interface constraints: the method getBody must return StreamInterface and not the decoded body as an array like is done now. The PR solves this by creating an additional method named 'getBodyAsJson' so that the libraries that were depending on the Please review, thanks! |
Link to @omarlopesino PR #214 |
SparkPost (v2.3.0) requires php-http/message which requires either v1 or 2 of psr/http-message. The Psr\Http\Message\ResponseInterface in v2 of psr/http-message added return type hints. Therefore SparkPost\SparkPostResponse which implements the interface is no longer compatible. You'll either need to update SparkPostResponse to be compatible or make psr/http-message v1 a direct dependency.
Thanks!
The text was updated successfully, but these errors were encountered: