2013-07-09 38 views
0

我有以下composer.json作曲失敗ZFC-用戶學說-ORM更新

{ 
    "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": "*" 
    } 
} 

後我增加了需要zf-commons/zfc-user-doctrine-orm,作曲家無法執行該命令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]. 

如何解決此錯誤訊息?

+0

*只能安裝一個:zendframework/zendframework [2.2.0,2.0.0]。 *看起來很清楚,你有什麼嘗試? –

回答

6

您的作曲家文件適合我。這可能是因爲您使用的是dev-master的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", 

應該強制作曲家下載0.1.2或更新版本的模塊。

+0

謝謝...修復 –

1

在2015年,這項工作對我罰款

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

我有同樣的問題,所以我改變了一些依賴與DEV-師傅他們最後的版本,它的工作。我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" 
} 

}