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
Incorrect Dependency Declaration of psr/http-message leads to Fatal Error #1318
Comments
@MaxBoeh I just checked using v1 of psr/http-message and the latest Elasticsearch response implementation and it works thanks to the Covariant Returns and Contravariant Parameters of PHP from 7.4+.
Thanks. |
I ran into this just now, and it turns out we were using |
I had to remove the tag v8.8.1 because it has been released before the official schedule. The tag v8.8.1 will be re-created soon in a few days. Sorry for any inconvenience |
I just checked out the branch where I had the issue, tried it again, same php version, same composer.lock and it just works. I'm a bit baffled. I'm kind of glad others experienced the same issue 😅 I'm on composer info psr/http-message
composer info elasticsearch/elasticsearch
|
@MaxBoeh please use |
@ezimuel It works fine now. I have no idea what has changed on my end. For me the issue can be closed, thank you for your support. |
Summary of problem or feature request
The version constraint of dependency
"psr/http-message": "^1.0 || ^2.0"
is not correct, as for version 1
\Psr\Http\Message\ResponseInterface::withStatus
looks like this:While the implementation in
\Elastic\Elasticsearch\Traits\MessageResponseTrait::withStatus
looks like this:Leading to this fatal error:
Please remove v1 of psr/http-message from the version constraint.
System details
The text was updated successfully, but these errors were encountered: