本文介绍了用于ZF2中的bjy-authorize,zfcUser和zfc-user-doctrine-orm的composer.json的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用作曲家在ZF2中使用bjy-authorize,zfcUser和zfc-user-doctrine-orm.但是,当我打电话给composer.phar update时,我总是得到一个错误.

i am trying to use bjy-authorize, zfcUser and zfc-user-doctrine-orm in ZF2 using the composer.But i always get an error, when i call composer.phar update.

composer.json如下所示:

the composer.json looks as follows:

    {
"name": "zendframework/skeleton-application",
"description": "Skeleton Application for ZF2",
"license": "BSD-3-Clause",
"keywords": [
    "framework",
    "zf2"
],
"homepage": "http://framework.zend.com/",
"minimum-stability": "alpha",
"require": {
    "php": ">=5.3.3",
    "zendframework/zendframework": "2.*",
    "doctrine/doctrine-orm-module": "dev-master",
    "bjyoungblood/bjy-authorize": "dev-master",
    "zf-commons/zfc-base": "dev-master",
    "zf-commons/zfc-user": "dev-master",
    "zf-commons/zfc-user-doctrine-orm": "dev-master"
}
}

我尝试了最后三行(以"zf-commons开头"),但没有错误,但是未安装zfc-user-doctrine模块.

I tried it without the last 3 lines (starting with "zf-commons) The i get no error, but the zfc-user-doctrine module is not installed.

    Your requirements could not be resolved to an installable set of packages.
    Problem 1
- Conclusion: don't install zf-commons/zfc-base 0.0.1
- Conclusion: remove bjyoungblood/bjy-authorize dev-master|install zf-commons/zfc-base 0.0.1
- Conclusion: don't install bjyoungblood/bjy-authorize dev-master|remove zf-commons/zfc-base dev-master|install zf-commons/zfc-base 0.0.1
- Installation request for bjyoungblood/bjy-authorize dev-master -> satisfiable by bjyoungblood/bjy-authorize dev-master.
- bjyoungblood/bjy-authorize dev-master requires zf-commons/zfc-user dev-master -> satisfiable by zf-commons/zfc-user dev-master, zf-commons/zfc-user dev-master.
- zf-commons/zfc-user dev-master requires zf-commons/zfc-base 0.* -> satisfiable by zf-commons/zfc-base 0.0.0, zf-commons/zfc-base 0.0.1, zf-commons/zfc-base 0.1.0.
- zf-commons/zfc-user dev-master requires zf-commons/zfc-base 0.* -> satisfiable by zf-commons/zfc-base 0.0.0, zf-commons/zfc-base 0.0.1, zf-commons/zfc-base 0.1.0.
- Can only install one of: zf-commons/zfc-base dev-master, zf-commons/zfc-base 0.0.0.
- Can only install one of: zf-commons/zfc-base dev-master, zf-commons/zfc-base 0.1.0.
- Installation request for zf-commons/zfc-base dev-master -> satisfiable by zf-commons/zfc-base dev-master

我必须在composer.json文件中进行哪些更改?

What do i have to change in the composer.json file?

最好,冰人

推荐答案

您可以按以下步骤修复composer.json:

You can fix your composer.json as following:

{
    "require": {
        "php": ">=5.3.3",
        "zendframework/zendframework": "2.*",
        "doctrine/doctrine-orm-module": "~0.7",
        "bjyoungblood/bjy-authorize": "~1.1",
        "zf-commons/zfc-user": "~0.1",
        "zf-commons/zfc-user-doctrine-orm": "~0.1"
    }
}

如果您不知道自己在做什么,请避免使用dev-master.

Avoid using dev-master if you don't know what you're doing.

这篇关于用于ZF2中的bjy-authorize,zfcUser和zfc-user-doctrine-orm的composer.json的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-04 09:17
查看更多