2014-09-04 71 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