PHOENIX-MEDIA / Magento2-CashOnDelivery

Cash on Delivery allows you to book an additional fee for inland and international deliveries
7 stars 14 forks source link

composer does not actually install the release #4

Closed dakira closed 6 years ago

dakira commented 6 years ago

An old version gets installed.

How to reproduce

  1. Install magento and your package as per instructions (magento is only needed because your package won't download otherwise),
    composer create-project --repository-url=https://repo.magento.com/ magento/project-community-edition mage2
    cd mage2
    composer config repositories.phoenix-cashondelivery git https://github.com/PHOENIX-MEDIA/Magento2-CashOnDelivery.git
    composer require phoenix/module-cashondelivery:1.0.0
  2. Compare installed file with a fresh copy from Github
    diff vendor/phoenix/module-cashondelivery/Model/Total/Creditmemo.php <(wget -q -O - https://raw.githubusercontent.com/PHOENIX-MEDIA/Magento2-CashOnDelivery/master/Model/Total/Creditmemo.php)

Files should be identical, but they are not. This is the cause of #3.

PHOENIX-MEDIA commented 6 years ago

Hello,

can you give me some more details on this issue. I just tried it myself and had no problems installing the module using composer. The release points to the latest commit and a diff to the master branch returned no changes. Try cleaning the cache with composer cache-clean before and run the require command in verbose mode to get more details. composer require phoenix/module-cashondelivery:1.0.0 -vvv

PHOENIX-MEDIA commented 6 years ago

We have found the cause of this issue. The package you get comes from repo.magento.com, not from GitHub (you should see it in your composer.lock) and the version uploaded there does not match the GitHub version. This will be fixed with a new release.

dakira commented 6 years ago

Okay, so the error is that 1.0.0 in repo.magento.com is not actually the 1.0.0 release because otherwise composer wouldn't use it. Re-ordering the repositories in composer.json helps as a workaround to make your repo take precedence. Thanks for updating!

PHOENIX-MEDIA commented 6 years ago

The 1.0.1 release is now available in the Magento Marketplace.

dakira commented 6 years ago

Also installs correctly from repository now.