我正在尝试从 laravel 5.5 升级到 5.6。我一直在使用升级指南。
首先,我尝试将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
的,而不是一般的答案。
对于这种情况,我必须执行以下操作:
- 我将
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(...)
并为滚动条创建自定义记录器类。
感谢评论中的所有帮助!