依赖问题将laravel 4包升级到laravel 5

时间:2015-02-15 14:27:23

标签: php laravel composer-php laravel-5

我正在尝试更新Laravel 5的编写器包.Laravel 4 composer.json架构包括:

"require": {
    "php": ">=5.3.3",
    "illuminate/foundation": "4.*",
    "illuminate/support": "4.*"
},

我正在尝试将其更新为:

"require": {
    "php": ">=5.3.3",
    "illuminate/foundation": "4.*",
    "illuminate/support": "5.*"
},

运行composer install后,我收到错误消息,指出无法找到illuminate/foundation,因此我尝试将minimum-stability更改为dev。 Composer现在可以找到包,但是我收到了这个错误:

Problem 1
- illuminate/exception dev-master requires illuminate/support 5.0.* -> satisfiable by illuminate/support[5.0.x-dev, v5.0.0, v5.0.4].
- Can only install one of: illuminate/support[dev-master, 5.0.x-dev].
- Can only install one of: illuminate/support[v5.0.0, dev-master].
- Can only install one of: illuminate/support[v5.0.4, dev-master].
- illuminate/foundation 4.0.x-dev requires illuminate/exception dev-master -> satisfiable by illuminate/exception[dev-master].
- illuminate/foundation 4.0.x-dev requires illuminate/support dev-master -> satisfiable by illuminate/support[dev-master].
- Installation request for illuminate/foundation 4.* -> satisfiable by illuminate/foundation[4.0.x-dev].

由于Laravel 5服务提供商在配置发布方面的变化,我需要illuminate/support为5+。我需要illuminate/foundation,因为单元测试需要它。

如何构建这些依赖项,以便作曲家可以安装它们?

我也试过将illuminate/support设置为dev-master,并且都将包照亮到dev-master,两者都解决了不同的错误。解决此问题的唯一方法是更新上游依赖项吗?

我已经获得了安装更新和(貌似)在Laravel 5安装中正常工作的更新。我可能只是通过使整个laravel/framework依赖来解决我的问题,但我真的不认为我想把它作为解决方案。

运行编辑器安装的其他输出

illuminate/support

dev-master @ illuminate/foundation4.*

Problem 1
- Installation request for illuminate/foundation 4.* -> satisfiable by illuminate/foundation[4.0.x-dev].
- illuminate/exception dev-master requires illuminate/support 5.0.* -> satisfiable by illuminate/support[5.0.x-dev].
- Can only install one of: illuminate/support[dev-master, 5.0.x-dev].
- illuminate/foundation 4.0.x-dev requires illuminate/exception dev-master -> satisfiable by illuminate/exception[dev-master].
- Installation request for illuminate/support dev-master -> satisfiable by illuminate/support[dev-master].
illuminate/support

dev-master @ illuminate/foundationdev-master

Problem 1
- Installation request for illuminate/foundation dev-master -> satisfiable by illuminate/foundation[dev-master].
- illuminate/exception dev-master requires illuminate/support 5.0.* -> satisfiable by illuminate/support[5.0.x-dev].
- Can only install one of: illuminate/support[dev-master, 5.0.x-dev].
- illuminate/foundation dev-master requires illuminate/exception dev-master -> satisfiable by illuminate/exception[dev-master].
- Installation request for illuminate/support dev-master -> satisfiable by illuminate/support[dev-master].

1 个答案:

答案 0 :(得分:2)

永远不要使用dev-master作为版本,只需使用5.*(对于这两个包),您就可以了。