HumHub由自己的项目作曲家安装

时间:2017-01-11 12:53:23

标签: yii2 composer-php

我想用我自己的作曲家文件安装HumHub(github.com/humhub/humhub)。但是作曲家不会安装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"
      }
    }

3 个答案:

答案 0 :(得分:0)

您收到任何错误消息吗?你是想用git而不是packagist来获得humhub吗?如果您是直接从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"}

答案 1 :(得分:0)

根据作曲家documentation,这里是如何将git存储库添加为作曲家依赖项。

我已修改他们的示例以使用humhub库。

{
  "name": "my-project",
  "type": "project",
    "require": {
        "humhub/humhub": "dev-master#1.1.1"
    },
    "repositories": [
        {
            "type": "vcs",
            "url":  "git@bitbucket.org:humhub/humhub.git"
        }
    ]
}

答案 2 :(得分:0)

你也可以试试humhub作曲家安装程序:https://github.com/move-elevator/humhub-composer-installer

相关问题