我想用我自己的作曲家文件安装HumHub (github.com/humhub/humhub)。但composer不安装humhub依赖项。
这是我的composer.json:
{
"name": "my-project",
"type": "project",
"repositories": [
{
"type": "package",
"package": {
"name": "humhub/humhub",
"version": "1.1.1",
"source": {
"url": "https://github.com/humhub/humhub.git",
"type": "git",
"reference": "master"
}
}
}
],
"require": {
"humhub/humhub": "1.1.1"
}
}发布于 2017-01-11 21:01:28
您是否收到任何错误消息?您是否正在尝试使用git来获取humhub,而不是使用packagist或更多?如果您直接从github获取,请尝试
"repositories": [{ "type": "git", "url": "https://github.com/humhub/humhub.git"}]并保留您现在所拥有的"require“。
编辑:我刚刚注意到,humhub的存储库中没有任何标记为"1.1.1“的内容。您可以找到一个标签"v1.1.1",因此将您的“要求”更改为:
"require": {"humhub/humhub": "dev-master#v1.1.1"}发布于 2017-01-11 21:17:18
根据composer documentation,下面是如何将git存储库作为composer依赖项添加的方法。
我已经修改了他们的示例,以使用humhub库。
{
"name": "my-project",
"type": "project",
"require": {
"humhub/humhub": "dev-master#1.1.1"
},
"repositories": [
{
"type": "vcs",
"url": "git@bitbucket.org:humhub/humhub.git"
}
]
}发布于 2017-11-08 18:22:47
您还可以尝试使用humhub composer安装程序:https://github.com/move-elevator/humhub-composer-installer
https://stackoverflow.com/questions/41591526
复制相似问题