2014-09-04 69 views
0

我剛剛安裝了zend 2和教條2的所有包。我用作曲者。我成功安裝了zend2,zfcUserDoctrineORM模塊無法安裝ZFcUserDoctrineORM與作曲家爲ZF2

我現在試圖安裝ZfcUserDoctrineORM(我相信是zfcUser和Doctrine之間的膠水)。我試圖通過作曲家安裝,但得到以下消息;

Your requirements could not be resolved to an installable set of packages. 

    Problem 1 
    - zf-commons/zfc-user-doctrine-orm 0.1.0 requires zendframework/zendframewor                            k 2.1.* -> no matching package found. 
    - zf-commons/zfc-user-doctrine-orm 0.0.1 requires zendframework/zendframewor                            k 2.0.* -> no matching package found. 
    - zf-commons/zfc-user-doctrine-orm 0.1.1 requires zf-commons/zfc-user 0.* ->                             satisfiable by zf-commons/zfc-user[0.x-dev]. 
    - zf-commons/zfc-user-doctrine-orm 0.1.2 requires zf-commons/zfc-user 0.* ->                             satisfiable by zf-commons/zfc-user[0.x-dev]. 
    - zf-commons/zfc-user-doctrine-orm 0.1.3 requires zf-commons/zfc-user 0.* ->                             satisfiable by zf-commons/zfc-user[0.x-dev]. 
    - Conclusion: don't install zf-commons/zfc-user 0.x-dev 
    - Installation request for zf-commons/zfc-user-doctrine-orm 0.* -> satisfiab                            le by zf-commons/zfc-user-doctrine-orm[0.0.1, 0.1.0, 0.1.1, 0.1.2, 0.1.3]. 

Potential causes: 
- A typo in the package name 
- The package is not available in a stable-enough version according to your min                            imum-stability setting 
    see <https://groups.google.com/d/topic/composer-dev/_g3ASeIFlrc/discussion> f                            or more details. 

Read <http://getcomposer.org/doc/articles/troubleshooting.md> for further common                             problems. 

Installation failed, reverting ./composer.json to its original content. 

之前上述錯誤,系統問我在問什麼版本的約束,我回答:0 *

回答

1

我通過交換

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

糾正問題
"zf-commons/zfc-user": "~0.1.2", 

在我的composer.json中。

這是

因爲作曲家是使用存在於你的 作曲家緩存中的舊版本,而不是下載新版本。您可以告訴 它使用的是舊版本,因爲Composer指的是 zf-commons/zfc-user 0.0.1,但當前版本是0.1.2。 zf-commons/zfc-user的舊版本 依賴於舊版本的zendframework/zendframework,它與其他需要較新版本的模塊 發生衝突。

我找到了答案here