magento2: Elasticsearch 8 package has incompatible composer dependencies with elasticsearch 7
Preconditions and environment
- Magento version: 2.4-develop
Looks like the dependencies determined for the meta package contain both magento/module-elasticsearch-7 and magento/module-elasticsearch-8
But those have incompatible base package dependencies
Steps to reproduce
Check the composer.json of the packages in the 2.4-develop branch.
Try to composer install these two packages in the same project.
Expected result
Successful install.
Actual result
Additional information
No response
Release note
No response
Triage and priority
- Severity: S0 - Affects critical data or functionality and leaves users without workaround.
- Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
- Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
- Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
- Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.
About this issue
- Original URL
- State: open
- Created 2 years ago
- Reactions: 2
- Comments: 34 (14 by maintainers)
@damienwebdev: So, using Magento 2.4.6-beta1, I see the following:
magento/module-elasticsearchcontains the constraint"elasticsearch/elasticsearch": "~7.17.0"magento/module-elasticsearch-7contains the constraint"elasticsearch/elasticsearch": "^7.17"magento/module-elasticsearch-8does not contain any constraint forelasticsearch/elasticsearchmagento/product-community-editioncontains the constraint"elasticsearch/elasticsearch": "^7.17||^8.5"So it sounds like some shenanigans is happening in the packaging phase where they removed the constraint from
magento/module-elasticsearch-8for now, until they figure out how to make this work.Maybe @tpogrebniak can elaborate on what’s going on and what the plans are for the final release?
thanks I just stepped down to es7 as it seems like the package has been removed.
The docs for v2.4.6 are wrong. You can only use 7.17. 8.4 won’t be available until v2.4.7.
Small update for the people interested, this is the current status in Magento 2.4.6-beta8:
magento/module-elasticsearchcontains the constraint"elasticsearch/elasticsearch": "~7.17.0 || ~8.5.0"magento/module-elasticsearch-7contains the constraint"elasticsearch/elasticsearch": "^7.17"magento/module-elasticsearch-8getting installed by defaultmagento/product-community-editioncontains the constraint"elasticsearch/elasticsearch": "~7.17.0 || ~8.5.0"magento/module-elasticsearch-8is still available to be installed and contains the constraint"elasticsearch/elasticsearch": "~8.5.0"and (this is important) also a replace section:"magento/module-elasticsearch-7": "*"So, after some quick testing, you can switch from ES7 to ES8 by:
This seems like an ok solution to me.
These changes haven’t made it to github yet as far as I can see, so the Mage-OS people will probably still run into issues when trying to generate nightly builds.