我正在尝试将laravel项目从5.5升级到5.6。我按照documentation
中的说明操作运行composer update时出现此错误: 该错误似乎与phpunit / phpunit有关,我升级到~7.0
onsort git :( master)✗作曲家更新加载作曲家存储库 包信息更新依赖项(包括require-dev) 您的要求无法解析为可安装的一组 包。
问题1 - 结论:不要安装phpunit / phpunit 7.0.2 |安装sebastian /比较器2.1.3 - 结论:不要安装phpunit / phpunit 7.0.1 |安装sebastian /比较器2.1.3 - 结论:不要安装sebastian /比较器2.1.3 - phpunit / phpunit 7.0.0需要sebastian / comparator ^ 2.1 - >塞巴斯蒂安/比较国[2.1.1,2.1.0,2.1.2,2.1.3]可以满足。 - sebastian / comparator 2.1.0需要sebastian / diff ^ 2.0 - >塞巴斯蒂安/差异[2.0.1]可以满足。 - sebastian / comparator 2.1.1需要sebastian / diff ^ 2.0 - >塞巴斯蒂安/差异[2.0.1]可以满足。 - sebastian / comparator 2.1.2需要sebastian / diff ^ 2.0 - >塞巴斯蒂安/差异[2.0.1]可以满足。 - sebastian / comparator 2.1.1需要sebastian / diff ^ 2.0 - >塞巴斯蒂安/差异[2.0.1]可以满足。 - 只能安装以下之一:sebastian / diff [3.0.0,2.0.1]。 - 只能安装以下之一:sebastian / diff [3.0.0,2.0.1]。 - phpunit / phpunit 7.0.0需要sebastian / diff ^ 3.0 - >塞巴斯蒂安/差异[3.0.0]可以满足。 - phpunit / phpunit~7.0的安装请求 - >可以通过phpunit / phpunit [7.0.0,7.0.1,7.0.2]来满足。
composer.json:
"require": {
"php": ">=7.1.3",
"algolia/algoliasearch-client-php": "^1.23",
"aws/aws-sdk-php": "~3.0",
"caouecs/laravel-lang": "~3.0",
"fideloper/proxy": "~4.0",
"fzaninotto/faker": "~1.4",
"illuminate/support": "~5.0",
"intervention/image": "^2.4",
"laracasts/utilities": "~3.0",
"laravel/framework": "5.6.*",
"laravel/horizon": "^1.0",
"laravel/scout": "~4.0",
"laravel/tinker": "~1.0",
"league/flysystem-aws-s3-v3": "~1.0",
"predis/predis": "^1.1",
"tightenco/ziggy":"dev-master",
"ext-gd": "*"
},
"require-dev": {
"filp/whoops": "~2.0",
"mockery/mockery": "~1.0",
"phpunit/phpunit": "~7.0",
"phpspec/phpspec": "~2.0"
},
答案 0 :(得分:1)
我通过从头开始重新安装所有依赖项解决了这个问题:
$ mv vendor/ oldvendor
$ composer install