MultiSafepay / magento2

MultiSafepay plugin for Magento 2
Open Software License 3.0
19 stars 8 forks source link

Magento 2.4.5 : composer require issue : magento/module-inventory-sales-api not found #46

Closed emetik closed 1 year ago

emetik commented 1 year ago

Dear

When I run the composer require of the metapackage, I encounter an issue with Magento 2.4.5 with PHP 8.1 :

composer require multisafepay/magento2

./composer.json has been updated Running composer update multisafepay/magento2 Loading composer repositories with package information In Laminas\DependencyPlugin\DependencyRewriterV2::onPrePoolCreate Updating dependencies Your requirements could not be resolved to an installable set of packages.

Problem 1

  • multisafepay/magento2-core 1.0.0 requires php-http/guzzle6-adapter * -> satisfiable by php-http/guzzle6-adapter[v0.1.0, ..., v0.4.1, v1.0.0, v1.1.0, v1.1.1, v2.0.0, v2.0.1, v2.0.2].
  • multisafepay/magento2[2.1.0, ..., 2.22.0] require multisafepay/magento2-msi 1.0.1 -> satisfiable by multisafepay/magento2-msi[1.0.1].
  • php-http/guzzle6-adapter v0.1.0 requires guzzlehttp/guzzle ~6.0 -> found guzzlehttp/guzzle[6.0.0, ..., 6.5.8] but it conflicts with your root composer.json require (^7.4.2).
  • php-http/guzzle6-adapter v0.2.0 requires php-http/httplug 1.0.0-alpha3 -> found php-http/httplug[v1.0.0-alpha3] but it does not match your minimum-stability.
  • php-http/guzzle6-adapter[v0.2.1, ..., v0.3.1] require php-http/httplug 1.0.0-beta -> found php-http/httplug[v1.0.0-beta] but it does not match your minimum-stability.
  • php-http/guzzle6-adapter[v0.4.0, ..., v0.4.1, v1.0.0, ..., v1.1.1, v2.0.0, ..., v2.0.2] require guzzlehttp/guzzle ^6.0 -> found guzzlehttp/guzzle[6.0.0, ..., 6.5.8] but it conflicts with your root composer.json require (^7.4.2).
  • multisafepay/magento2-msi 1.0.1 requires magento/module-inventory-sales-api ^1.0 -> could not be found in any version, there may be a typo in the package name.
  • multisafepay/magento2 2.0.0 requires multisafepay/magento2-core 1.0.0 -> satisfiable by multisafepay/magento2-core[1.0.0].
  • Root composer.json requires multisafepay/magento2 * -> satisfiable by multisafepay/magento2[2.0.0, ..., 2.22.0].

As the magento/module-inventory-sales-api does'nt exist in this version, the process is stopped.

Any idea how to fix it ?

Regards

danielcivit commented 1 year ago

HI @emetik.

Thanks for contact us and your report.

I just found and pick up this issue, and now working in some tests to reproduce this behavior and find a solution.

I will keep you posted about the progress.

danielcivit commented 1 year ago

Hi @emetik

So far, I am not able to reproduce this issue, using Magento 2.4.5 and PHP 8.1.

After run the following command:

composer why magento/module-inventory-sales-api

I can see there is a long list of packages which requires the "module-inventory-sales-api" in the way we are doing.

magento/inventory-metapackage                              1.2.5-p1  requires  magento/module-inventory-sales-api (1.2.2)
magento/module-inventory-advanced-checkout                 1.2.2     requires  magento/module-inventory-sales-api (1.2.*)
magento/module-inventory-bundle-product                    1.2.2     requires  magento/module-inventory-sales-api (1.2.*)
magento/module-inventory-catalog                           1.3.0     requires  magento/module-inventory-sales-api (1.2.*)
magento/module-inventory-catalog-frontend-ui               1.0.2     requires  magento/module-inventory-sales-api (1.2.*)
magento/module-inventory-catalog-search                    1.2.3     requires  magento/module-inventory-sales-api (1.2.*)
magento/module-inventory-configurable-product              1.2.3     requires  magento/module-inventory-sales-api (1.2.*)
magento/module-inventory-configurable-product-frontend-ui  1.0.3     requires  magento/module-inventory-sales-api (1.2.*)
magento/module-inventory-elasticsearch                     1.2.2     requires  magento/module-inventory-sales-api (1.2.*)
magento/module-inventory-export-stock                      1.2.2     requires  magento/module-inventory-sales-api (1.2.*)
magento/module-inventory-export-stock-api                  1.2.1     requires  magento/module-inventory-sales-api (1.2.*)
magento/module-inventory-graph-ql                          1.2.2     requires  magento/module-inventory-sales-api (1.2.*)
magento/module-inventory-in-store-pickup                   1.1.1     requires  magento/module-inventory-sales-api (1.2.*)
magento/module-inventory-in-store-pickup-quote             1.1.1     requires  magento/module-inventory-sales-api (1.2.*)
magento/module-inventory-in-store-pickup-sales-admin-ui    1.1.3     requires  magento/module-inventory-sales-api (1.2.*)
magento/module-inventory-in-store-pickup-shipping          1.1.2     requires  magento/module-inventory-sales-api (1.2.*)
magento/module-inventory-indexer                           2.2.0     requires  magento/module-inventory-sales-api (1.2.*)
magento/module-inventory-product-alert                     1.2.2     requires  magento/module-inventory-sales-api (1.2.*)
magento/module-inventory-quote-graph-ql                    1.0.2     requires  magento/module-inventory-sales-api (1.2.*)
magento/module-inventory-requisition-list                  1.2.3     requires  magento/module-inventory-sales-api (1.2.*)
magento/module-inventory-reservation-cli                   1.2.2     requires  magento/module-inventory-sales-api (1.2.*)
magento/module-inventory-sales                             1.3.0     requires  magento/module-inventory-sales-api (1.2.*)
magento/module-inventory-sales-admin-ui                    1.2.3     requires  magento/module-inventory-sales-api (1.2.*)
magento/module-inventory-sales-frontend-ui                 1.2.2     requires  magento/module-inventory-sales-api (1.2.*)
magento/module-inventory-shipping                          1.2.2     requires  magento/module-inventory-sales-api (1.2.*)
magento/module-inventory-shipping-admin-ui                 1.2.3     requires  magento/module-inventory-sales-api (1.2.*)
magento/module-inventory-source-deduction-api              1.2.2     requires  magento/module-inventory-sales-api (1.2.*)
magento/module-inventory-source-selection-api              1.4.2     requires  magento/module-inventory-sales-api (1.2.*)
magento/module-inventory-visual-merchandiser               1.1.3     requires  magento/module-inventory-sales-api (1.2.*)
multisafepay/magento2-msi                                  1.0.1     requires  magento/module-inventory-sales-api (^1.0)

Is it possible for you share your composer.json file.

Maybe I can find something else in there ?

vinodsowdagar commented 1 year ago

Hi @emetik ,

Whenever encountering problems related with MSI, a safe way to go is also to not install the meta package, but instead, install the frontend module and the catalog-inventory module only:

https://github.com/MultiSafepay/magento2-frontend https://github.com/MultiSafepay/magento2-catalog-inventory

You will have the same exact functionalities as the meta package, except for the fact that all of the MSI dependencies are not there.

I'm closing this one for now, if there are still problems related with this after trying my suggestion, please add a new comment and we will reopen the issue if needed.