Composer无法使用zfc用户原则orm进行更新



我有以下composer.json

{
    "name": "zendframework/skeleton-application",
    "description": "Skeleton Application for ZF2",
    "license": "BSD-3-Clause",
    "keywords": [
        "framework",
        "zf2"
    ],
    "homepage": "http://framework.zend.com/",
    "require": {
        "php": ">=5.3.3",
        "zendframework/zendframework": "2.2.*",
        "doctrine/doctrine-orm-module": "*",
        "bjyoungblood/bjy-authorize": "1.2.*",
        "zf-commons/zfc-user": "dev-master",
        "zendframework/zend-developer-tools": "*",
        "zendframework/zftool": "dev-master",
        "swiftmailer/swiftmailer" : "*",
        "mwillbanks/zfc-twitter-bootstrap": "*"
    }
}

在我添加了require zf-commons/zfc-user-doctrine-orm之后,Composer无法执行命令composer update,给出了一个大的错误消息:

composer.json has been updated
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 zf-commons/zfc-user dev-master -> satisfiable by
zf-commons/zfc-user[dev-master].
- Conclusion: don't install zf-commons/zfc-user 0.1.2
- Conclusion: remove zendframework/zendframework 2.2.0
- zf-commons/zfc-user 0.0.1 requires zendframework/zendframework 2.0.* -> sa
tisfiable by zendframework/zendframework[2.0.0, 2.0.0rc1, 2.0.0rc2, 2.0.0rc3, 2.
0.0rc4, 2.0.0rc5, 2.0.0rc6, 2.0.0rc7, 2.0.1, 2.0.2, 2.0.3, 2.0.4, 2.0.5, 2.0.6,
2.0.7, 2.0.8].
- zf-commons/zfc-user-doctrine-orm 0.0.1 requires zendframework/zendframewor
k 2.0.* -> satisfiable by zendframework/zendframework[2.0.0, 2.0.0rc1, 2.0.0rc2,
2.0.0rc3, 2.0.0rc4, 2.0.0rc5, 2.0.0rc6, 2.0.0rc7, 2.0.1, 2.0.2, 2.0.3, 2.0.4, 2
.0.5, 2.0.6, 2.0.7, 2.0.8].
- zf-commons/zfc-user 0.1.0 requires zendframework/zendframework 2.1.* -> sa
tisfiable by zendframework/zendframework[2.1.0, 2.1.1, 2.1.2, 2.1.3, 2.1.4, 2.1.
5].
- zf-commons/zfc-user 0.1.1 requires zendframework/zend-view 2.1.* -> satisf
iable by zendframework/zendframework[2.1.0, 2.1.1, 2.1.2, 2.1.3, 2.1.4, 2.1.5],
zendframework/zend-view[2.1.0, 2.1.1, 2.1.2, 2.1.3, 2.1.4, 2.1.5].
- zf-commons/zfc-user-doctrine-orm 0.1.0 requires zendframework/zendframewor
k 2.1.* -> satisfiable by zendframework/zendframework[2.1.0, 2.1.1, 2.1.2, 2.1.3
, 2.1.4, 2.1.5].
- Can only install one of: zendframework/zendframework[2.2.0, 2.0.0].
- Can only install one of: zendframework/zendframework[2.2.0, 2.0.0rc1].
- Can only install one of: zendframework/zendframework[2.2.0, 2.0.0rc2].
- Can only install one of: zendframework/zendframework[2.2.0, 2.0.0rc3].
- Can only install one of: zendframework/zendframework[2.2.0, 2.0.0rc4].
- Can only install one of: zendframework/zendframework[2.2.0, 2.0.0rc5].
- Can only install one of: zendframework/zendframework[2.2.0, 2.0.0rc6].
- Can only install one of: zendframework/zendframework[2.2.0, 2.0.0rc7].
- Can only install one of: zendframework/zendframework[2.2.0, 2.0.1].
- Can only install one of: zendframework/zendframework[2.2.0, 2.0.2].
- Can only install one of: zendframework/zendframework[2.2.0, 2.0.3].
- Can only install one of: zendframework/zendframework[2.2.0, 2.0.4].
- Can only install one of: zendframework/zendframework[2.2.0, 2.0.5].
- Can only install one of: zendframework/zendframework[2.2.0, 2.0.6].
- Can only install one of: zendframework/zendframework[2.2.0, 2.0.7].
- Can only install one of: zendframework/zendframework[2.2.0, 2.0.8].
- Can only install one of: zendframework/zendframework[2.2.0, 2.1.0].
- Can only install one of: zendframework/zendframework[2.2.0, 2.1.1].
- Can only install one of: zendframework/zendframework[2.2.0, 2.1.2].
- Can only install one of: zendframework/zendframework[2.2.0, 2.1.3].
- Can only install one of: zendframework/zendframework[2.2.0, 2.1.4].
- Can only install one of: zendframework/zendframework[2.2.0, 2.1.5].
- don't install zendframework/zend-view 2.1.0|don't install zendframework/ze
ndframework 2.2.0
- don't install zendframework/zend-view 2.1.1|don't install zendframework/ze
ndframework 2.2.0
- don't install zendframework/zend-view 2.1.2|don't install zendframework/ze
ndframework 2.2.0
- don't install zendframework/zend-view 2.1.3|don't install zendframework/ze
ndframework 2.2.0
- don't install zendframework/zend-view 2.1.4|don't install zendframework/ze
ndframework 2.2.0
- don't install zendframework/zend-view 2.1.5|don't install zendframework/ze
ndframework 2.2.0
- Installation request for zendframework/zendframework == 2.2.0.0 -> satisfi
able by zendframework/zendframework[2.2.0].
- zf-commons/zfc-user-doctrine-orm 0.1.1 requires zf-commons/zfc-user 0.* ->
satisfiable by zf-commons/zfc-user[0.0.1, 0.1.0, 0.1.1, 0.1.2].
- Installation request for zf-commons/zfc-user-doctrine-orm * -> satisfiable
by zf-commons/zfc-user-doctrine-orm[0.0.1, 0.1.0, 0.1.1].

如何修复此错误消息?

您的composer文件对我来说很好。这可能是因为您使用的是zf-commons/zfc-user的开发主机,而不是标记的版本号。

因此,Composer正在使用Composer缓存中存在的旧版本,而不是下载新版本。您可以看出它使用的是旧版本,因为Composer指的是zf-commons/zfc-user 0.0.1,但当前版本是0.1.2。zf-commons/zfc-user的旧版本依赖于zendframework/zendframework的旧版本,后者与其他需要更新版本的模块发生冲突。

如果更换:

"zf-commons/zfc-user": "dev-master",

带有:

"zf-commons/zfc-user": "~0.1.2",

它应该强制Composer下载该模块的0.1.2或更新版本。

2015年,这项工作对我来说很好

"zf-commons/zfc-user": "1.*",
"zf-commons/zfc-user-doctrine-orm": "^1.0"

我也遇到了同样的问题,所以我将一些与dev-master的依赖关系更改为它们的上一个版本,并成功了。我的composer.json文件:

{
"name": "zendframework/skeleton-application",
"description": "Skeleton Application for ZF2",
"license": "BSD-3-Clause",
"keywords": [
    "framework",
    "zf2"
],
"homepage": "http://framework.zend.com/",
"require": {
    "php": ">=5.5",
    "zendframework/zendframework": "~2.5",
    "zendframework/zftool": "dev-master",
    "doctrine/doctrine-orm-module": "^0.10.0",
    "zendframework/zend-developer-tools": "dev-master",
    "bjyoungblood/bjy-profiler": "dev-master",
    "doctrine/migrations": "^1.4",
    "doctrine/orm": "^2.5",
    "rradutzu/zend2-doctrine-dynamic-db": "^0.0.4",
    "zf-commons/zfc-rbac" : "~2.4",
    "zf-commons/zfc-user": "1.4.4",
    "zf-commons/zfc-user-doctrine-orm": "^1.0.1"
}

}

相关内容

  • 没有找到相关文章

最新更新