我正在尝试使用作曲家在ZF2中使用bjy-authorize,zfcUser和zfc-user-doctrine-orm。 但是当我调用composer.phar update时,我总是会收到错误。
composer.json如下所示:
{
"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"
}
}
我尝试了没有最后3行(从“zf-commons”开始)我没有得到任何错误,但是没有安装zfc-user-doctrine模块。
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文件中需要更改什么?
最佳, 冰人
答案 0 :(得分:1)
问题是Zf-Commons已开始标记他们的版本。如果我是你,我将删除zfc-user,zfc-base和doctrine-orm-module。
将bjy-authorize的版本从dev-master更改为1. *并将zfc-user-doctrine-orm更改为0. *。然后,Composer应该从那里处理依赖项。
答案 1 :(得分:0)
您可以按照以下方式修复composer.json
:
{
"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
。