我试图从laravel 5.5升级到5.6。我一直在使用upgrade guide。
首先,我尝试将laravel/framework
更新为5.6.*
,将phpunit/phpunit
更新为~7.0
。
这会产生错误Your requirements could not be resolved to an installable set of packages.
我理解这意味着什么,但是错误日志真的难以解析,我现在已经尝试了几个小时将composer.json
文件更改为可安装的软件包集。 />
我自己没有设法解决这个问题,所以我来找你。也许你们中的一些人真的喜欢解决这些问题......
所以,我现在的composer.json
,无论如何:
{
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"type": "project",
"require": {
"php": ">=7.1",
"laravel/framework": "5.6.*",
"jenssegers/rollbar": "^1.4",
"doctrine/dbal": "~2.3",
"sensiolabs/security-checker": "^3.0",
"guzzlehttp/guzzle": "~6.0",
"mandrill/mandrill": "1.0.*",
"lcobucci/jwt" : "^3.1",
"predis/predis": "~1.0"
},
"require-dev": {
"fzaninotto/faker": "~1.4",
"mockery/mockery": "0.9.*",
"phpunit/phpunit": "~7.0",
"phpspec/phpspec": "~4.0",
"laravel/homestead" : "~4.0",
"symfony/dom-crawler": "3.1.*",
"symfony/css-selector": "3.1.*",
"filp/whoops": "~2.0"
}
}
目前的错误:
➔ composer update
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: don't install laravel/framework v5.6.15
- Conclusion: don't install laravel/framework v5.6.14
- Conclusion: don't install symfony/process v4.0.7
- Conclusion: don't install laravel/framework v5.6.13
- Conclusion: don't install symfony/process v4.0.6
- Conclusion: don't install symfony/process v4.0.5
- Conclusion: don't install symfony/process v4.0.4
- Conclusion: don't install symfony/process v4.0.3
- Conclusion: don't install symfony/process v4.0.2
- Installation request for laravel/homestead ~4.0 -> satisfiable by laravel/homestead[v4.0.0, v4.0.1, v4.0.2, v4.0.3, v4.0.4, v4.0.5].
- Conclusion: don't install symfony/process v4.0.1
- laravel/framework v5.6.0 requires symfony/process ~4.0 -> satisfiable by symfony/process[v4.0.0, v4.0.1, v4.0.2, v4.0.3, v4.0.4, v4.0.5, v4.0.6, v4.0.7].
- laravel/framework v5.6.1 requires symfony/process ~4.0 -> satisfiable by symfony/process[v4.0.0, v4.0.1, v4.0.2, v4.0.3, v4.0.4, v4.0.5, v4.0.6, v4.0.7].
- laravel/framework v5.6.10 requires symfony/process ~4.0 -> satisfiable by symfony/process[v4.0.0, v4.0.1, v4.0.2, v4.0.3, v4.0.4, v4.0.5, v4.0.6, v4.0.7].
- laravel/framework v5.6.11 requires symfony/process ~4.0 -> satisfiable by symfony/process[v4.0.0, v4.0.1, v4.0.2, v4.0.3, v4.0.4, v4.0.5, v4.0.6, v4.0.7].
- laravel/framework v5.6.12 requires symfony/process ~4.0 -> satisfiable by symfony/process[v4.0.0, v4.0.1, v4.0.2, v4.0.3, v4.0.4, v4.0.5, v4.0.6, v4.0.7].
- laravel/framework v5.6.2 requires symfony/process ~4.0 -> satisfiable by symfony/process[v4.0.0, v4.0.1, v4.0.2, v4.0.3, v4.0.4, v4.0.5, v4.0.6, v4.0.7].
- laravel/framework v5.6.3 requires symfony/process ~4.0 -> satisfiable by symfony/process[v4.0.0, v4.0.1, v4.0.2, v4.0.3, v4.0.4, v4.0.5, v4.0.6, v4.0.7].
- laravel/framework v5.6.4 requires symfony/process ~4.0 -> satisfiable by symfony/process[v4.0.0, v4.0.1, v4.0.2, v4.0.3, v4.0.4, v4.0.5, v4.0.6, v4.0.7].
- laravel/framework v5.6.5 requires symfony/process ~4.0 -> satisfiable by symfony/process[v4.0.0, v4.0.1, v4.0.2, v4.0.3, v4.0.4, v4.0.5, v4.0.6, v4.0.7].
- laravel/framework v5.6.6 requires symfony/process ~4.0 -> satisfiable by symfony/process[v4.0.0, v4.0.1, v4.0.2, v4.0.3, v4.0.4, v4.0.5, v4.0.6, v4.0.7].
- laravel/framework v5.6.7 requires symfony/process ~4.0 -> satisfiable by symfony/process[v4.0.0, v4.0.1, v4.0.2, v4.0.3, v4.0.4, v4.0.5, v4.0.6, v4.0.7].
- laravel/framework v5.6.8 requires symfony/process ~4.0 -> satisfiable by symfony/process[v4.0.0, v4.0.1, v4.0.2, v4.0.3, v4.0.4, v4.0.5, v4.0.6, v4.0.7].
- laravel/framework v5.6.9 requires symfony/process ~4.0 -> satisfiable by symfony/process[v4.0.0, v4.0.1, v4.0.2, v4.0.3, v4.0.4, v4.0.5, v4.0.6, v4.0.7].
- Conclusion: don't install symfony/process v4.0.0
- Installation request for laravel/framework 5.6.* -> satisfiable by laravel/framework[v5.6.0, v5.6.1, v5.6.10, v5.6.11, v5.6.12, v5.6.13, v5.6.14, v5.6.15, v5.6.2, v5.6.3, v5.6.4, v5.6.5, v5.6.6, v5.6.7, v5.6.8, v5.6.9].
我真的希望有人能够破译作曲家的意思。我也希望能够自己做到这一点,但似乎这个问题的所有其他解决方案都是专门针对那个 composer.json
,而不是一般答案。
答案 0 :(得分:2)
对于这种情况,我必须执行以下操作:
php
更新为^7.1.3
sensiolabs/security-checker
至^4.1
phpspec
至~4.0
laravel/homestead
至~7.3
symfony/dom-crawler
和symfony/css-selector
至^4.0
composer optimize
的引用,因为现在已删除configureMonologUsing(...)
并为Rollbar创建自定义记录器类。感谢评论中的所有帮助!