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

Incompatibility with php-http/message package #57

Open
emr opened this issue Apr 20, 2019 · 0 comments
Open

Incompatibility with php-http/message package #57

emr opened this issue Apr 20, 2019 · 0 comments

Comments

@emr
Copy link

emr commented Apr 20, 2019

http://docs.php-http.org/en/latest/clients/curl-client.html
I just followed steps on the page.

And there are 2 packages now in my composer.json:

"require": {
    "php-http/curl-client": "^2.0",
    "php-http/message": "^1.7"
}

http://docs.php-http.org/en/latest/clients/curl-client.html#usage
I've copied one of these code snippets and I noticed there is an incompatibility.

use Http\Client\Curl\Client;
use Http\Message\MessageFactory\DiactorosMessageFactory;
use Http\Message\StreamFactory\DiactorosStreamFactory;

$client = new Client(new DiactorosMessageFactory(), new DiactorosStreamFactory());

php-http/curl-client package is working with Psr\Http\Message\... interfaces. But php-http/message package implements Http\Message\... interfaces.

When I changed the version "php-http/curl-client": "^2.0" to "^1.7", the incompatibility is solved. Curl client works with Http\Message\... interfaces on ^1.7 version.

So, what is standard?

Which versions of php-http packages work compatible with each other?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant