如何在不更新依赖项SonataUserBundle的情况下安装FOSUserBundle dev-master?

时间:2015-07-21 16:29:10

标签: symfony dependencies composer-php fosuserbundle sonata-user-bundle

我正在使用sonata-project/user-bundle:^2.2及其依赖项friendsofsymfony/user-bundle:~1.3。现在我要安装friendsofsymfony/user-bundle:dev-master。我试过了

composer require friendsofsymfony/user-bundle:dev-master

我收到以下错误:

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

Problem 1
- sonata-project/user-bundle 2.2.4 requires friendsofsymfony/user-bundle ~1.3 -> satisfiable by
friendsofsymfony/user-bundle[1.3.x-dev].
- sonata-project/user-bundle 2.2.4 requires friendsofsymfony/user-bundle ~1.3 -> satisfiable by
friendsofsymfony/user-bundle[1.3.x-dev].
- sonata-project/user-bundle 2.2.4 requires friendsofsymfony/user-bundle ~1.3 -> satisfiable by
friendsofsymfony/user-bundle[1.3.x-dev].
- Can only install one of: friendsofsymfony/user-bundle[dev-master, 1.3.x-dev].
- Installation request for friendsofsymfony/user-bundle dev-master -> satisfiable by friendsofsy
mfony/user-bundle[dev-master].
- Installation request for sonata-project/user-bundle == 2.2.4.0 -> satisfiable by sonata-projec
t/user-bundle[2.2.4].

sonata-project/user-bundle的最新稳定版本为2.2.4friendsofsymfony/user-bundle的最高要求为~1.3。我想安装friendsofsymfony/user-bundle dev-master/2.0.x-dev以获取最新动态。

如何在未更新sonata-project/user-bundle的情况下安装它?

2 个答案:

答案 0 :(得分:0)

这是不可能的。即使是奏鸣曲用户包的dev-master也需要~1.3的FOS用户包,因此不能与FOS用户包的最新主服务器兼容

答案 1 :(得分:0)

我认为别名会这样做,但不建议这样做,因为依赖性通常是有原因的。

"require": {
    "friendsofsymfony/user-bundle": "dev-master as 1.3.6"
}