elastic / elasticsearch-php

Official PHP client for Elasticsearch.
https://www.elastic.co/guide/en/elasticsearch/client/php-api/current/index.html
MIT License
5.25k stars 964 forks source link

Add psr/http-message: ^2.0 support #1316

Closed babenkoivan closed 1 year ago

babenkoivan commented 1 year ago

Summary of problem or feature request

The latest Laravel version comes with psr/http-message locked to version 2. elasticsearch-php requires psr/http-message: ^1.0, which makes it impossible to install the latest elasticsearch-php version without downgrading psr/http-message.

Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Root composer.json requires elasticsearch/elasticsearch v8.7.1 -> satisfiable by elasticsearch/elasticsearch[v8.7.1].
    - elasticsearch/elasticsearch v8.7.1 requires psr/http-message ^1.0 -> found psr/http-message[1.0, 1.0.1, 1.1] but the package is fixed to 2.0 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.

Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.

Steps to reproduce

composer create-project laravel/laravel test
cd test
composer require elasticsearch/elasticsearch:v8.7.1

System details

gjuric commented 1 year ago

I've already created a PR for this https://github.com/elastic/elasticsearch-php/pull/1313 almost a month ago but didn't get a reaction.

ezimuel commented 1 year ago

@gjuric and @babenkoivan this is fixed now in main. I'll release 8.8.0 soon.

gjuric commented 1 year ago

Hi @ezimuel I see that you've released v8.8.0 and it states that this should be included in this release in the notes but this is not the case, it looks like some commits are missing and v8.8.0 still requires only v1 of psr/http-message.