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

Bring PHP 8.3 compatibility to magento/module-elasticsearch-8 #39748

Open
git-seb opened this issue Mar 18, 2025 · 6 comments
Open

Bring PHP 8.3 compatibility to magento/module-elasticsearch-8 #39748

git-seb opened this issue Mar 18, 2025 · 6 comments

Comments

@git-seb
Copy link

git-seb commented Mar 18, 2025

Description

Tried to install magento/elasticsearch-8 into our Magento 2.4.7 instance through composer but was not able to.

The current composer package only works together with PHP version up to 8.2 as well as psr/http-message up to version 1.1.

Expected behavior

Make compatible with PHP 8.3.* (maybe even 8.4.*?) and psr/http-message ^2.0, so magento/elasticsearch-8 can be installed successfully.

Benefits

Better compatibility

Additional information

No response

Release note

No response

Copy link

m2-assistant bot commented Mar 18, 2025

Hi @git-seb. 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.


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.

@devchris79
Copy link

This could be related to #38416

@hostep
Copy link
Contributor

hostep commented Mar 19, 2025

You need to downgrade aws/aws-sdk-php to a lower version, it's them that require psr/http-message >= 2.0 and cause a conflict.

Here's how you can get it to be installed:

$ composer require magento/module-elasticsearch-8 --no-update
$ composer update magento/module-elasticsearch-8 aws/aws-sdk-php -W

This works for me on Magento 2.4.7-p4 with PHP 8.3

(you can discover this by running composer why psr/http-message)

@hostep
Copy link
Contributor

hostep commented Mar 21, 2025

@git-seb: can you confirm the above steps works for you?

The ES8 module is definitely compatible with PHP 8.3, it's just that the output composer gives can be a bit misleading, the true underlying issue is the conflict with psr/http-message which can be solved by downgrading the aws/aws-sdk-php package.

@hostep
Copy link
Contributor

hostep commented Mar 21, 2025

@jeff-matthews : should we update the section "Upgrade Elasticsearch" in https://experienceleague.adobe.com/en/docs/commerce-operations/upgrade-guide/prepare/prerequisites#search-engine with this info? When that documentation was written, this problem didn't happen yet because aws/aws-sdk-php was not requiring psr/http-message >= 2.0 back then.

Also, we should mention on that section that in the upcomming Magento 2.4.8 release those steps aren't needed anymore, because ES8 support is now included by default and you don't need to install that module separately anymore.

@jeff-matthews
Copy link
Contributor

Thanks for tagging me @hostep. Yes, I think it makes sense to update the docs. I'll draft something and ping you in the AdobeDocs/commerce-operations.en repo.

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

No branches or pull requests

4 participants