【发布时间】:2019-10-02 12:30:53
【问题描述】:
我正在尝试使用 composer 从 github 安装一个模块,但每次我都遇到同样的错误,
[InvalidArgumentException]
Could not find a matching version of package Worldpay/Worldpay-Magento2-CG.
Check the package spelling, your version constraint and that the package i
s available in a stability which matches your minimum-stability (dev).
下面是我的composer.json部分,
"minimum-stability": "dev",
"repositories": {
"0": {
"type": "composer",
"url": "https://repo.magento.com/"
},
"Worldpay-Worldpay-Magento2-CG": {
"type": "git",
"url": "https://github.com/Worldpay/Worldpay-Magento2-CG.git"
}
},
下面是我试过的命令列表,
composer require Worldpay/Worldpay-Magento2-CG dev-master
composer require Worldpay/Worldpay-Magento2-CG:~2.0
composer require Worldpay/Worldpay-Magento2-CG @master
composer require Worldpay/Worldpay-Magento2-CG @dev-master
composer require Worldpay/Worldpay-Magento2-CG "^2.0"
composer require Worldpay/Worldpay-Magento2-CG:dev/master
(小写字母)
composer require worldpay/worldpay-magento2-cg:dev-master
我也在 composer.json 中尝试过使用 ssh 链接。并且没有"minimum-stability": "dev", 部分。
这个模块的当前最新版本是2.0.,稳定分支是Master。我尝试使用上述命令直接获取该版本和分支。但每次我收到相同的错误消息。
另外,该模块的最新版本 (2.0) 未在 packagist
中列出https://packagist.org/packages/sapient/module-worldpay
在 packagist 中,最新版本显示为 1.5.3。之后,我完成了 4 个版本。但它在 packagist 中不可用。我应该手动提交吗?
看来我在某个地方做错了。我应该在 github 中创建稳定(分支名称)分支吗?任何建议都会非常棒。
【问题讨论】:
标签: git composer-php magento2