为什么作曲家无法解决依赖关系?

时间:2016-05-23 12:29:31

标签: composer-php

我有两个私人的butbucket存储库,它们涉及冲突:

  • bigland / yii2-models-catalog(目前1.0.19)
  • bigland / yii2-models-conceptual-plan(目前为1.0.5)

bigland / yii2-models-catalog Conmposer.json

{
  "name": "bigland/yii2-models-catalogue",
  "minimum-stability": "dev",
  "license": "proprietary",
  "require": {
    "php": ">=5.4.0",
    "fxp/composer-asset-plugin": ">=1.0.3",
    "yiisoft/yii2": "~2.0.0",
    "yiisoft/yii2-httpclient": "2.0.x-dev",
    "league/geotools": "~0.7.0",
    "voskobovich/yii2-many-many-behavior": "*",
    "yandex/fotki": "dev-master",
    "bigland/yii2-user": "*",
    "bigland/yii2-base": "*",
    "bigland/yii2-geo": "*",
    "bigland/yii2-components-yandex-fotki-api-access": "~1.0.0",
    "bigland/yii2-behaviors-yandex-fotki-album": "~1.0.0",
    "bigland/yii2-models-conceptual-plan": "~1.0.0",
    "fabpot/goutte": "~2.0.4"
  },
  "repositories": [
    {
      "type": "vcs",
      "url": "https://github.com/romka-chev/php-yandex-fotki"
    },
    {
      "type": "vcs",
      "url": "https://bitbucket.org/bigland/yii2-user"
    },
    {
      "type": "vcs",
      "url": "https://bitbucket.org/bigland/yii2-base"
    },
    {
      "type": "vcs",
      "url": "https://bitbucket.org/bigland/yii2-geo"
    },
    {
      "type": "vcs",
      "url": "https://bitbucket.org/bigland/yii2-components-yandex-fotki-api-access"
    },
    {
      "type": "vcs",
      "url": "https://bitbucket.org/bigland/yii2-behaviors-yandex-fotki-album"
    },
    {
      "type": "vcs",
      "url": "https://bitbucket.org/bigland/yii2-models-conceptual-plan"
    }
  ],
  "autoload": {
    "psr-4": {
      "bigland\\models\\catalogue\\": ""
    }
  },
  "require-dev": {
    "yiisoft/yii2-codeception": "^2.0"
  }
}

bigland / yii2-models-conceptual-plan Composer.json

{
  "name": "bigland/yii2-models-conceptual-plan",
  "minimum-stability": "dev",
  "license": "proprietary",
  "require": {
    "php": ">=5.4.0",
    "yiisoft/yii2": "~2.0.0",
    "league/geotools": "~0.7.0",
    "voskobovich/yii2-many-many-behavior": "*",
    "bigland/yii2-user": "*",
    "bigland/yii2-base": "*",
    "bigland/yii2-geo": "*",
    "bigland/yii2-components-yandex-fotki-api-access": "~1.0.0",
    "bigland/yii2-behaviors-yandex-fotki-album": "~1.0.0",
    "bigland/yii2-models-catalogue": "~1.0.0"
  },
  "repositories": [
    {
      "type": "vcs",
      "url": "https://bitbucket.org/bigland/yii2-user"
    },
    {
      "type": "vcs",
      "url": "https://bitbucket.org/bigland/yii2-base"
    },
    {
      "type": "vcs",
      "url": "https://bitbucket.org/bigland/yii2-geo"
    },
    {
      "type": "vcs",
      "url": "https://bitbucket.org/bigland/yii2-components-yandex-fotki-api-access"
    },
    {
      "type": "vcs",
      "url": "https://bitbucket.org/bigland/yii2-behaviors-yandex-fotki-album"
    },
    {
      "type": "vcs",
      "url": "https://bitbucket.org/bigland/yii2-models-catalogue"
    }
  ],
  "autoload": {
    "psr-4": {
      "bigland\\models\\conceptualPlan\\": ""
    }
  }
}

如果我将composer update运行到 bigland / yii2-models-conceptual-plan 存储库中 - 一切都很好。

如果我将composer update运行到 bigland / yii2-models-catalog 存储库中,则会出现以下错误:

  Problem 1
    - bigland/yii2-models-conceptual-plan dev-master requires bigland/yii2-models-catalogue ~1.0.0 -> no matching package found.
    - bigland/yii2-models-conceptual-plan 1.0.3 requires bigland/yii2-models-catalogue ~1.0.0 -> no matching package found.
    - bigland/yii2-models-conceptual-plan 1.0.2 requires bigland/yii2-models-catalogue ~1.0.0 -> no matching package found.
    - bigland/yii2-models-conceptual-plan 1.0.1 requires bigland/yii2-models-catalogue ~1.0.0 -> no matching package found.
    - bigland/yii2-models-conceptual-plan 1.0.5 requires bigland/yii2-models-catalogue ~1.0.0 -> no matching package found.
    - bigland/yii2-models-conceptual-plan 1.0.4 requires bigland/yii2-models-catalogue ~1.0.0 -> no matching package found.
    - Installation request for bigland/yii2-models-conceptual-plan @dev -> satisfiable by bigland/yii2-models-conceptual-plan[1.0.4, 1.0.5, 1.0.1, 1.0.2, 1.0.3, dev-master].

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.

为什么会这样?

2 个答案:

答案 0 :(得分:0)

你是不是很奇怪,你有一个马戏团的依赖? A - &gt; B - &gt;甲

答案 1 :(得分:-1)

解决方案如下:将循环依赖关系版本替换为dev-master而不是1.0.x

bigland / yii2-models-catalog Conmposer.json

"bigland/yii2-models-conceptual-plan": "dev-master"

bigland / yii2-models-conceptual-plan Composer.json

"bigland/yii2-models-catalogue": "dev-master"