无法使用作曲家为ZF2安装ZfcUserDoctrineORM

时间:2014-09-04 07:20:52

标签: doctrine-orm zend-framework2 composer-php

我刚安装了zend 2和doctrine 2的所有软件包。我使用了composer。我成功安装了 zend2 zfcUser DoctrineORMModule

我现在正在尝试安装 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 个答案:

答案 0 :(得分:1)

我通过交换纠正了这个问题

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

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

在我的composer.json中。

这是

  

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

我找到了答案here