【发布时间】:2015-11-26 05:51:08
【问题描述】:
我有一个 git 仓库 https://github.com/hounded/FPDFbundle
我已将其添加到 packagegist https://packagist.org/packages/hounded/fpdfbundle
你可以在 git repo 中看到 composer.json
{
"name" : "hounded/fpdfbundle",
"description" : "A pdf bundle",
"type" : "symfony-bundle",
"authors" : [{
"name" : "James Whiteman"
}],
"keywords" : ["pdf bundle"],
"license" : ["MIT"],
"require" : {
"symfony/framework-bundle": "~2.3",
"sensio/framework-extra-bundle": "~3.0,>=3.0.2"
},
"autoload" : {
"psr-0" : {
"hounded\\FPDFBundle" : ""
}
},
"target-dir" : "hounded/FPDFBundle",
"extra" : {
"branch-alias" : {
"dev-master" : "0.1.x-dev"
}
},
"minimum-stability": "dev"
}
但是当我运行时
composer require hounded/fpdfbundle
我得到“找不到包 hounded/fpdfbundle”
我想帮助社区,但对我做错了什么感到困惑
【问题讨论】:
-
你能试试
"hounded/fpdfbundle": "dev-master"吗? -
您必须在包存储库中更新包的稳定性标志。否则,无论何时有人尝试安装此软件包,都需要在
package.json文件中指定稳定性标志。 -
您好 Pravessh 感谢您的回复,package.json 是 node js 的吗?我试过“hounded/fpdfbundle”:“dev-master”,但没有运气。我还尝试更改最低稳定性:稳定,仍然没有运气
-
我的错,应该是 composer.json 而不是 package.json。我可以通过将
"hounded/fpdfbundle": "dev-master"添加到我的 composer.json 文件来安装该软件包。 -
嘿,伙计,如果你想用一个小小的解释来回答这个问题,为什么 composer 需要 hounded/fpdf 不起作用以及为什么 composer 需要 "hounded/fpdfbundle": "dev-master" 我会将其标记为正确并投票
标签: git symfony composer-php packagist