paytrail / paytrail-for-adobe-commerce

Paytrail payment service for Adobe Commerce (formerly known as Magento 2)
https://www.paytrail.com
MIT License
2 stars 7 forks source link

Issue with installing v1.2.0 via composer #18

Closed zhulak closed 2 years ago

zhulak commented 2 years ago

Hi,

when trying to install module v.1.2.0.0 I get the following error message:

[Composer\Downloader\TransportException] The "https://repo.magento.com/archives/paytrail/paytrail-for-adobe-commerce/paytrail-paytrail-for-adobe-commerce-1.2.0.0.zip" file could not be downloaded (HTTP/1.1 404 Not Found)

Steps To Reproduce: If you have an Adobe Commerce project (former Magento) with the following set in composer.json: ... "repositories": [ { "type": "composer", "url": "https://repo.magento.com/" } ], ...
It will throw the error. Removing repo.magento.com from repositories will enable composer to fetch from github.

Expected behavior Composer should install specified package successfully.

Actual behavoiur Throw exception stated at the beginning of the report.

tommi-martin commented 2 years ago

Hello @zhulak

I was unable to replicate the specific issue you were having with Php 8.1 and composer 2. But here are some recommendations for you:

First please check your version number: version 1.2.0.0 does not exist. The officially tagged version is 1.2.0

Secondly: As far as we understand it repo.magento.com only hosts packages that are required by the default Magento 2 product or manufactured by Adobe. In general this means Adobe / Magento's own modules and a select few 3rd party modules that are required by the base Magento 2 package. Paytrail/paytrail-for-adobe-commerce is not required by the main Magento product and as such it is not hosted on repo.magento.com and shouldn't be found from there. Instead your composer needs to fetch this package from https://packagist.org/

In light of this could you verify that the actions have been taken:

In short it looks like the issue you're having might be related to the composer version and the composer configuration you're running in your local environment.

zhulak commented 2 years ago

Hi,

sorry for the late reply.

Somehow composer.lock had gotten repo.magento.com as the location for the package and was trying to download it from there. Not quite sure how that happened as I have not been able to reproduce the issue. But removing the module and re-requiring it fixed the issue and now composer.lock got the correct url to packagist.

Thanks for your reply,