作曲家依赖json配置

时间:2013-07-07 08:32:58

标签: php composer-php

我为composer.phar提供了以下json配置。不幸的是,我收到了这个错误,我不明白为什么:

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
    - Installation request for myproject/cmsapp dev-master -> satisfiable by myproject/cmsapp[dev-master].
    - myproject/cmsapp dev-master requires zendframework/zendframework dev-master -> no matching package found.
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://groups.google.com/d/topic/composer-dev/_g3ASeIFlrc/discussion> for more details.
Read <http://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.

cms config:

{
    "name": "myproject\/cms",
    "description": "myproject CMS Tool",
    "license": "GPL",
    "keywords": [
            "myproject",
            "cms",
            "framework",
            "zf2"
    ],
    "homepage": "http:\/\/avadon.com\/myproject\/cms\/",
    "require": {
            "php": ">=5.3.3",
            "myproject/cmsapp": "dev-master"
    },
    "repositories": {
        "myproject/cmsapp": {
            "type": "git",
            "url": "https:\/\/github.com\/myproject\/cmsapp.git"
        }
    }
}

cmsapp config:

{
    "name": "myproject/cmsapp",
    "repositories": {
        "zendframework/zendframework": {
            "type": "git",
            "url": "https://github.com/zendframework/zf2.git"
        }
    },
    "require": {
        "php": ">=5.3.3",
        "zendframework/zendframework" : "dev-master"
    }
}

有人可以试着向我解释这个错误吗?

1 个答案:

答案 0 :(得分:0)

您正在使用开发分支机构的软件。只有在将composer.json配置为接受开发软件时才允许这样做。通常你不应该这样做。

如果发生足够大的更新,特别是包括Zend框架的开发分支可能会多次破坏您的软件。如果你想要最新的和最好的,你仍然需要一直调用composer update来获取最新的提交,所以它不容易出错,只需要“2。”这样的东西版本2框架“,或者更严格的”2.3。“用于2.3版本系列的已发布工作版本。

对于您自己的软件也是如此 - 请标记它!

但是如果您想亲自体验无意识的软件不兼容性,可以在您的cms config的composer.json中添加"minimum-stability":"dev"并包含世界上所有开发版本。