0

我有 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配置:

{
    "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 配置:

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

任何人都可以尝试向我解释这个错误吗?

4

1 回答 1

0

您正在使用来自开发分支的软件。仅当您将 composer.json 配置为接受开发软件时,才允许这样做。通常你不应该这样做。

如果发生足够大的更新,尤其是包含 Zend 框架的开发分支可能会不止一次地破坏您的软件。如果你想要最新最好的,你仍然需要一直调用来获取最新的提交,所以对于“任何版本 2 框架”,或者甚至可能composer update只需要像“2.”这样的东西就不太容易出错更严格的“2.3. ”表示 2.3 版本行的已发布、工作版本。

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

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

于 2013-07-07T12:41:48.570 回答