如何解决Symfony和CalendarBundle的编写器依赖



我想在Symfony2.2项目上使用yvoyer/CalendarBundle。

我将它添加到composer.json并运行:

composer update star/calendar-bundle --prefer-source

它返回这个错误:

$ composer update star/calendar-bundle --prefer-source
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
  Problem 1
    - Conclusion: remove symfony/symfony v2.2.0
    - star/calendar-bundle 0.1 requires symfony/symfony 2.0.* -> satisfiable by symfony/symfony[2.0.7, v2.0.10, v2.0.11, v2.0.12, v2.0.13, v2.0.14, v2.0.15, v2.0.16, v2.0.17, v2.0.18, v2.0.19, v2.0.20, v2.0.21, v2.0.22, v2.0.23, v2.0.9].
    - star/calendar-bundle 0.1.1 requires symfony/symfony 2.1.* -> satisfiable by symfony/symfony[v2.1.0, v2.1.0-BETA1, v2.1.0-BETA2, v2.1.0-BETA3, v2.1.0-BETA4,v2.1.0-RC1, v2.1.0-RC2, v2.1.1, v2.1.10, v2.1.11, v2.1.2, v2.1.3, v2.1.4, v2.1.5, v2.1.6, v2.1.7, v2.1.8, v2.1.9].
    - Can only install one of: symfony/symfony[v2.2.0, 2.0.7].
    - Can only install one of: symfony/symfony[v2.2.0, v2.0.10].
    - Can only install one of: symfony/symfony[v2.2.0, v2.0.11].
    - Can only install one of: symfony/symfony[v2.2.0, v2.0.12].
    - Can only install one of: symfony/symfony[v2.2.0, v2.0.13].
    - Can only install one of: symfony/symfony[v2.2.0, v2.0.14].
    - Can only install one of: symfony/symfony[v2.2.0, v2.0.15].
    - Can only install one of: symfony/symfony[v2.2.0, v2.0.16].
    - Can only install one of: symfony/symfony[v2.2.0, v2.0.17].
    - Can only install one of: symfony/symfony[v2.2.0, v2.0.18].
    - Can only install one of: symfony/symfony[v2.2.0, v2.0.19].
    - Can only install one of: symfony/symfony[v2.2.0, v2.0.20].
    - Can only install one of: symfony/symfony[v2.2.0, v2.0.21].
    - Can only install one of: symfony/symfony[v2.2.0, v2.0.22].
    - Can only install one of: symfony/symfony[v2.2.0, v2.0.23].
    - Can only install one of: symfony/symfony[v2.2.0, v2.0.9].
    - Can only install one of: symfony/symfony[v2.2.0, v2.1.0].
    - Can only install one of: symfony/symfony[v2.2.0, v2.1.0-BETA1].
    - Can only install one of: symfony/symfony[v2.2.0, v2.1.0-BETA2].
    - Can only install one of: symfony/symfony[v2.2.0, v2.1.0-BETA3].
    - Can only install one of: symfony/symfony[v2.2.0, v2.1.0-BETA4].
    - Can only install one of: symfony/symfony[v2.2.0, v2.1.0-RC1].
    - Can only install one of: symfony/symfony[v2.2.0, v2.1.0-RC2].
    - Can only install one of: symfony/symfony[v2.2.0, v2.1.1].
    - Can only install one of: symfony/symfony[v2.2.0, v2.1.10].
    - Can only install one of: symfony/symfony[v2.2.0, v2.1.11].
    - Can only install one of: symfony/symfony[v2.2.0, v2.1.2].
    - Can only install one of: symfony/symfony[v2.2.0, v2.1.3].
    - Can only install one of: symfony/symfony[v2.2.0, v2.1.4].
    - Can only install one of: symfony/symfony[v2.2.0, v2.1.5].
    - Can only install one of: symfony/symfony[v2.2.0, v2.1.6].
    - Can only install one of: symfony/symfony[v2.2.0, v2.1.7].
    - Can only install one of: symfony/symfony[v2.2.0, v2.1.8].
    - Can only install one of: symfony/symfony[v2.2.0, v2.1.9].
    - Installation request for symfony/symfony == 2.2.0.0 -> satisfiable by symfony/symfony[v2.2.0].
    - Installation request for star/calendar-bundle 0.* -> satisfiable by star/calendar-bundle[0.1.1, 0.1].

错误的原因是什么?我正在考虑分叉项目并更改composer.json。但是我应该涂什么呢?

读取错误的前3行:

- Conclusion: remove symfony/symfony v2.2.0
- star/calendar-bundle 0.1 requires symfony/symfony 2.0.* -> satisfiable by symfony/symfony[2.0.7, v2.0.10, v2.0.11, v2.0.12, v2.0.13, v2.0.14, v2.0.15, v2.0.16, v2.0.17, v2.0.18, v2.0.19, v2.0.20, v2.0.21, v2.0.22, v2.0.23, v2.0.9].
- star/calendar-bundle 0.1.1 requires symfony/symfony 2.1.* -> satisfiable by symfony/symfony[v2.1.0, v2.1.0-BETA1, v2.1.0-BETA2, v2.1.0-BETA3, v2.1.0-BETA4,v2.1.0-RC1, v2.1.0-RC2, v2.1.1, v2.1.10, v2.1.11, v2.1.2, v2.1.3, v2.1.4, v2.1.5, v2.1.6, v2.1.7, v2.1.8, v2.1.9].

第一行告诉我们symfony/symfony包的版本是错误的。下面两行给出了错误的原因:

  • 0.1版本需要Symfony 2.0.x
  • 0.1.1版本需要Symfony 2.1.x

所以不支持2.2.x.

如果你想在2.2中使用这个包,你应该怎么做:

  1. Fork bundle并使用sf 2.2进行测试
  2. 删除所有弃用的东西,使其与2.2兼容
  3. 更新composer.json有类似symfony/symfony: 2.2.*的东西
  4. 用你所做的更改请求一个PR,让它合并,让bundle的作者创建一个新版本的bundle,并在你的composer.json中使用这个版本

相关内容

  • 没有找到相关文章