我当时在做一个项目,最后不得不对我正在使用的一个包做一个小改动。
这个包是:shopify/shopify-php-api-包装器。
你可以在这里找到:https://github.com/ShopifyExtras/PHP-Shopify-API-Wrapper
我以前的composer.json文件如下所示:
{
"require": {
"monolog/monolog": "1.*",
"shopifyextras/shopify-php-api-wrapper": "^1.1"
},
"autoload": {
"psr-0": { "MyApp\\": "src/" }
}
}在分叉回购和进行更改之后(我忘了先创建一个新分支,但在提交给master之后创建了分支,并将其推到github --我不认为这会导致任何问题,因为这个分支存在并且它确实指向了正确的头),然后我更新了我的composer.json以使用我的叉子。
在阅读了composer文档(https://getcomposer.org/doc/05-repositories.md#vcs)之后,我将composer.json更新为:
{
"minimum-stability": "dev",
"prefer-stable" : true,
"repositories": [
{
"type": "git",
"url": "https://github.com/JonLaliberte/PHP-Shopify-API-Wrapper.git"
}
],
"require": {
"monolog/monolog": "1.*",
"shopifyextras/shopify-php-api-wrapper": "dev-risksbugfix"
},
"autoload": {
"psr-0": { "MyApp\\": "src/" }
}
}当我运行composer更新时,我会收到以下错误:
$ composer update --verbose
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- The requested package shopifyextras/shopify-php-api-wrapper could not be found in any version, there may be a typo in the package name.
Potential causes:
- A typo in the package name
- The package is not available in a stable-enough version according to your minimum-stability setting
see <https://getcomposer.org/doc/04-schema.md#minimum-stability> for more details.
Read <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.我试过:
使用"risksbugfix“而不是"dev-risksbugfix”
使用"vcs“类型而不是git类型
从回购网址中删除".git“
使用“jonlaliberte/shopify-php-api-包装器”代替“shopify/shopify-php-api-包装器”。
任何帮助都将不胜感激。谢谢!
发布于 2016-03-01 14:16:15
如果您别名为不可比较的版本(如
dev-develop),则dev-必须在分支名称前加上前缀。
您的分支是一个不可比拟的版本dev-riskbugfix。
您可能需要在其前缀加上dev-:dev-dev-riskbugfix。
或者将分支重命名为riskbugfix并去掉dev-,则别名将为dev-riskbugfix。
https://stackoverflow.com/questions/35716021
复制相似问题