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

Magento 2.4.7 compatibility #3188

Closed
vahonc opened this issue Feb 20, 2024 · 11 comments
Closed

Magento 2.4.7 compatibility #3188

vahonc opened this issue Feb 20, 2024 · 11 comments
Assignees
Labels

Comments

@vahonc
Copy link
Collaborator

vahonc commented Feb 20, 2024

Magento 2.4.7 will land on April 9th.

Magento 2.4.7-beta2 is already available for partners and 2.4.7-beta3 will be available on March 12th.

It's already been added to our integration test suite for branch 2.11.x. All tests are working actually which is a good start.

However, we need to check that all features are functioning as expected.

https://experienceleague.adobe.com/docs/commerce-operations/release/notes/adobe-commerce/2-4-7.html

https://developer-stage.adobe.com/commerce/php/development/backward-incompatible-changes/highlights/#247-beta2

So, let's make Elasticsuite compatible with it!

@vahonc vahonc added the feature label Feb 20, 2024
@vahonc vahonc self-assigned this Feb 20, 2024
@romainruaud romainruaud pinned this issue Feb 20, 2024
@Bashev
Copy link
Contributor

Bashev commented Mar 16, 2024

Hi everyone,
i wants to notice one critical finding which is "breaking change". Magento 2.4.7-beta3 have "silent" dependency of psr/log version ^2.0 || ^3.0 (I made a PR which will made it visible but will not solve the issue magento/magento2#38524).

At the same time Magento requires laminas-di and accepts only ^1.0 || ^3.0, this is fine until opensearch-project/opensearch-php dependency of elasticsuite accepts only version of psr/log ^1 || ^2.

If the elasticsuite dependency of opensearch-php will be increased to >=2.1 or ^2.1 this will solve the issue, but i'm not sure how this will reflect to the entire module, because of the specific requirements <2.0.1. Probably requires deep tests.

Update: I made the change in the PR #3215, but probably @romainruaud can say more about this specific dependency rule.

@hostep
Copy link
Contributor

hostep commented Apr 4, 2024

Based on Magento 2.4.7-beta3, I've found with the help of the ampersand upgrade tool some preferences in this module on files in core Magento that changed between 2.4.6-p4 and 2.4.7-beta3:

+-------+------------+-----------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------+
| Level | Type       | File                                                                                                | To Check                                                                                  |
+-------+------------+-----------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------+
| WARN  | Preference | vendor/magento/module-catalog-graph-ql/DataProvider/Product/LayeredNavigation/Builder/Attribute.php | Smile\ElasticsuiteCatalogGraphQl\DataProvider\Product\LayeredNavigation\Builder\Attribute |
| WARN  | Preference | vendor/magento/module-catalog-graph-ql/DataProvider/Product/SearchCriteriaBuilder.php               | Smile\ElasticsuiteCatalogGraphQl\DataProvider\Product\SearchCriteriaBuilder               |
| WARN  | Preference | vendor/magento/module-catalog-graph-ql/Model/Resolver/Aggregations.php                              | Smile\ElasticsuiteCatalogGraphQl\Model\Resolver\Aggregations                              |
+-------+------------+-----------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------+

After some digging in the git commits in core Magento, I've found following commits that contain these changes:

No idea if any of these changes are important for this module, but maybe somebody should double check to make sure?

@ssx
Copy link

ssx commented Apr 9, 2024

Considering this is out today - what's the current state of play?

Doesn't seem to be working as-is (v2.11.4.3) as an interface is mismatched:

Fatal error: Declaration of Smile\ElasticsuiteCore\Model\ResourceModel\Search\Request\RelevanceConfig::_construct() must be compatible with Magento\Config\Model\ResourceModel\Config::_construct(?Magento\Framework\MessageQueue\PoisonPill\PoisonPillPutInterface $pillPut = null) in /var/www/html/vendor/smile/elasticsuite/src/module-elasticsuite-core/Model/ResourceModel/Search/Request/RelevanceConfig.php on line 98

@Bashev
Copy link
Contributor

Bashev commented Apr 9, 2024

@ssx this is fixed in v2.11.5.2

@vahonc
Copy link
Collaborator Author

vahonc commented Apr 10, 2024

Hello @ssx,

Did you install the ElasticSuite module using the composer require smile/elasticsuite ~2.11.0 command?

BR,
Vadym

@rbayet
Copy link
Collaborator

rbayet commented Apr 10, 2024

Hello @ssx,

Did you install the ElasticSuite module using the composer require smile/elasticsuite ~2.11.0 command?

BR, Vadym

Yes, probably.
It's probably the same issue we have you and I, @vahonc, and it is related to the relaxed dependency on OpenSearch > 2.0.1 that cannot be satisfied by 2.11.5.3.

Here is the diagnosis

~/projects/ee247$ make composer c="update smile/elasticsuite:2.11.5.3 --dry-run"
docker compose --profile cron run --rm --no-deps php composer update smile/elasticsuite:2.11.5.3 --dry-run
[+] Building 0.0s (0/0)                                                                                                                                                                                            
[+] Building 0.0s (0/0)                                                                                                                                                                                            
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Root composer.json requires smile/elasticsuite ~2.11.0 -> satisfiable by smile/elasticsuite[2.11.5.3].
    - smile/elasticsuite 2.11.5.3 requires opensearch-project/opensearch-php ^1.0 || ^2.0, <2.0.1 -> found opensearch-project/opensearch-php[1.0.0, ..., 1.x-dev, 2.0.0] but the package is fixed to 2.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.

So composer will backtrack to a 2.11.x version which has no opensearch requirement, so basically the 2.11.4.3.
The PR fixing the issue has been merged but we need to publish a release.

Regards,

@ssx
Copy link

ssx commented Apr 10, 2024

@rbayet yep, you're spot on. It fell back to 2.11.4.3.

@vahonc
Copy link
Collaborator Author

vahonc commented Apr 10, 2024

@ssx,

A new release 2.11.6 is available.

BR,
Vadym

@rbayet
Copy link
Collaborator

rbayet commented Apr 11, 2024

Closing this issue in the context of 2.11.6 having been published.

@rbayet rbayet closed this as completed Apr 11, 2024
@vahonc
Copy link
Collaborator Author

vahonc commented Apr 11, 2024

I think that for now it is worth keeping this ticket open because the context of it is the general compatibility of our module with the latest version of Magento, including if our clients have any other issues.

@vahonc vahonc reopened this Apr 11, 2024
@rbayet
Copy link
Collaborator

rbayet commented Apr 11, 2024

I think that for now it is worth keeping this ticket open because the context of it is the general compatibility of our module with the latest version of Magento, including if our clients have any other issues.

I don't agree. This sends the message that 2.4.7 compatibility is still not there and being worked on.
That's not the case, 2.11.6 officially supports 2.4.7 and our CI worklows check that.

Let's move on and if additional/other compatibility issues arise, which is pretty much bound to happen with an hypothetic 2.4.7-p1 introducing non-BC changes like Magento likes them, people will create new issues.

@rbayet rbayet closed this as completed Apr 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants