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

Elasticsearch 8 composer version constraint is not allowing latest versions (PHP 8.3 related) #38416

Closed
5 tasks
hostep opened this issue Feb 4, 2024 · 12 comments
Closed
5 tasks
Labels
Area: Framework Component: Elasticsearch Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Priority: P2 A defect with this priority could have functionality issues which are not to expectations. Progress: ready for dev Reported on 2.4.x Indicates original Magento version for the Issue report. Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch

Comments

@hostep
Copy link
Contributor

hostep commented Feb 4, 2024

Preconditions and environment

  • Magento version 2.4-develop

Steps to reproduce

Try to update elasticsearch/elasticsearch package to latest version (8.12.0 at the moment of writing):

$ composer update elasticsearch/elasticsearch:8.12.0
The temporary constraint "8.12.0" for "elasticsearch/elasticsearch" must be a subset of the constraint in your composer.json (~7.17.0 || ~8.5.0)
Run `composer require elasticsearch/elasticsearch` or `composer require elasticsearch/elasticsearch:8.12.0` instead to replace the constraint

Expected result

Should be possible to install latest version of version 8 of elasticsearch/elasticsearch

Actual result

Not possible to install latest version of version 8 of elasticsearch/elasticsearch, due to constraint ~8.5.0 being used by Magento codebase

Additional information

Version 8.12.0 of elasticsearch/elasticsearch was tested with PHP 8.3 as they claim here: https://github.com/elastic/elasticsearch-php/releases/tag/v8.12.0
So it might mean that older versions of this package might not be 100% compatible with PHP 8.3 yet.

Currently magento supports elasticsearch till 8.7, but version constraint is set to 8.5.

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”.
Copy link

m2-assistant bot commented Feb 4, 2024

Hi @hostep. Thank you for your report.
To speed up processing of this issue, make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, Add a comment to the issue:


Join Magento Community Engineering Slack and ask your questions in #github channel.
⚠️ According to the Magento Contribution requirements, all issues must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting.
🕙 You can find the schedule on the Magento Community Calendar page.
📞 The triage of issues happens in the queue order. If you want to speed up the delivery of your contribution, join the Community Contributions Triage session to discuss the appropriate ticket.

@hostep hostep changed the title Elasticsearch 8 composer version constriant is not allowing latest versions (PHP 8.3 related) Elasticsearch 8 composer version constraint is not allowing latest versions (PHP 8.3 related) Feb 4, 2024
@engcom-November engcom-November self-assigned this Feb 5, 2024
Copy link

m2-assistant bot commented Feb 5, 2024

Hi @engcom-November. Thank you for working on this issue.
In order to make sure that issue has enough information and ready for development, please read and check the following instruction: 👇

  • 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).
  • 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue.
  • 3. Add Area: XXXXX label to the ticket, indicating the functional areas it may be related to.
  • 4. Verify that the issue is reproducible on 2.4-develop branch
    Details- Add the comment @magento give me 2.4-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.4-develop branch, please, add the label Reproduced on 2.4.x.
    - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!
  • 5. Add label Issue: Confirmed once verification is complete.
  • 6. Make sure that automatic system confirms that report has been added to the backlog.

@engcom-November
Copy link
Contributor

Hello @hostep,

Thank you for the report!

Verified this issue on 2.4-develop.
With PHP 8.3, when trying to update elasticsearch via compser we got the below error:

image

Hence confirming the issue.

Thank you.

@engcom-November engcom-November added Reported on 2.4.x Indicates original Magento version for the Issue report. Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Component: Elasticsearch Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch Area: Framework labels Feb 7, 2024
@github-jira-sync-bot
Copy link

✅ Jira issue https://jira.corp.adobe.com/browse/AC-10989 is successfully created for this GitHub issue.

Copy link

m2-assistant bot commented Feb 7, 2024

✅ Confirmed by @engcom-November. Thank you for verifying the issue.
Issue Available: @engcom-November, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.

@engcom-November
Copy link
Contributor

Hello @hostep,

As mentioned in the system requirements here, magento currently supports elasticsearch 8.7.
Could you let us know why you are trying to install elasticsearch 8.12.

Thank you.

@engcom-November engcom-November added Issue: needs update Additional information is require, waiting for response and removed Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed labels Feb 7, 2024
@hostep
Copy link
Contributor Author

hostep commented Feb 7, 2024

Okay, sure fine, your argument makes no sense but I won't put my energy into trying to convince you otherwise for the moment.

But let's go with your argument and say you want to install the elasticsearch php package version 8.7.x, that is also not going to work, because of the constraint ~8.5.0 ...

@engcom-November
Copy link
Contributor

@hostep, I agree with you, the elasticsearch constraint should be changed to ~8.7.0, marking this as confirmed.

Thank you.

@engcom-November engcom-November added Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed and removed Issue: needs update Additional information is require, waiting for response labels Feb 8, 2024
@github-jira-sync-bot
Copy link

❌ Cannot export the issue. This GitHub issue is already linked to Jira issue(s): https://jira.corp.adobe.com/browse/AC-10989

@hostep
Copy link
Contributor Author

hostep commented Feb 8, 2024

@engcom-November: the constraint should be changed to ^8.0 or ^8.5 or ^8.7 (doesn't really matter). Please don't force your users to use old versions of Elasticsearch or their associated php library.

Elasticsearch has brought out a bunch of security fixes in for example versions 8.8, 8.9, 8.10 (see here, scroll down a bit until you reached Elasticsearch), why do you want to force your users to stay on old vulnerable versions of Elasticsearch? Please don't....

Also your 'system requirements' page only shows the versions of software that are guaranteed to work, but those aren't the strict requirements to run Magento, other versions are also compatible, they just haven't been verified by Adobe to work correctly, but please leave that up to the community to deal with, don't force us to use old software with potential security issues.

Adobe only releases one new version of Magento per year, so if we have to wait one full year before you increase the constraints again, even more security vulnerabilities will be fixed and we won't be able to upgrade. Please think about this a bit, thanks!

@engcom-November engcom-November added the Priority: P2 A defect with this priority could have functionality issues which are not to expectations. label Feb 8, 2024
@hostep
Copy link
Contributor Author

hostep commented Feb 14, 2024

Another argument, is that the so called "system requirements" were updated yesterday for Magento version 2.4.6-p4 and increased supported Elasticsearch version to 8.11
I still believe the php composer dependency should allow a more wider range of versions and switching from ~ to ^ constraint would be better.

@hostep
Copy link
Contributor Author

hostep commented Mar 21, 2025

Closing, this was fixed in 71bfd9a to be released in Magento 2.4.8 according to the commit message.

@hostep hostep closed this as completed Mar 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Framework Component: Elasticsearch Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Priority: P2 A defect with this priority could have functionality issues which are not to expectations. Progress: ready for dev Reported on 2.4.x Indicates original Magento version for the Issue report. Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch
Projects
None yet
Development

No branches or pull requests

3 participants