如何修复将PHP升级到8.0后升级laravel的laravel/ui错误



在macos上使用brew将PHP升级到8.0后,我正在尝试升级Laravel,但我收到了以下错误。我该怎么修?

$ composer update                                                                                                                  ✔ │ 59% hdd │ 5.43G RAM │ 14:05:07 │ ⇣0.18 KiB/s ⇡1.51 KiB/s 192.168.1.69 IP │ 213.163.173.1 IP 
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Conclusion: don't install laravel/framework v8.12.0 (conflict analysis result)
- Conclusion: don't install laravel/framework v8.12.1 (conflict analysis result)
- Conclusion: don't install laravel/framework v8.12.2 (conflict analysis result)
- Conclusion: don't install laravel/framework v8.12.3 (conflict analysis result)
- Conclusion: don't install laravel/framework v8.13.0 (conflict analysis result)
- Conclusion: don't install laravel/framework v8.14.0 (conflict analysis result)
- Conclusion: don't install laravel/framework v8.15.0 (conflict analysis result)
- Conclusion: don't install laravel/framework v8.16.0 (conflict analysis result)
- Conclusion: don't install laravel/framework v8.16.1 (conflict analysis result)
- Conclusion: don't install laravel/framework v8.17.0 (conflict analysis result)
- Conclusion: don't install laravel/framework v8.17.1 (conflict analysis result)
- Conclusion: don't install laravel/framework v8.17.2 (conflict analysis result)
- Conclusion: don't install laravel/framework v8.18.0 (conflict analysis result)
- Conclusion: don't install laravel/framework v8.18.1 (conflict analysis result)
- laravel/ui[v2.1.0, ..., v2.4.1] require php ^7.2.5 -> your php version (8.0.0) does not satisfy that requirement.
- illuminate/support[v7.0.0, ..., v7.28.4] require php ^7.2.5 -> your php version (8.0.0) does not satisfy that requirement.
- laravel/framework[v8.0.0, ..., v8.11.2] require php ^7.3 -> your php version (8.0.0) does not satisfy that requirement.
- laravel/ui[v2.5.0, ..., 2.x-dev] require illuminate/support ^7.0 -> satisfiable by illuminate/support[v7.0.0, ..., 7.x-dev].
- Only one of these can be installed: illuminate/support[dev-master, v5.5.0, ..., 5.8.x-dev, v6.0.0, ..., 6.x-dev, v7.0.0, ..., 7.x-dev, v8.0.0, ..., 8.x-dev], laravel/framework[v8.0.0, ..., 8.x-dev]. laravel/framework replaces illuminate/support and thus cannot coexist with it.
- Root composer.json requires laravel/framework ^8.0 -> satisfiable by laravel/framework[v8.0.0, ..., 8.x-dev].
- Root composer.json requires laravel/ui ^2.1 -> satisfiable by laravel/ui[v2.1.0, ..., 2.x-dev].

===编辑2020-12-10===

composer.json:

{
"name": "laravel/laravel",
"type": "project",
"description": "The Laravel Framework.",
"keywords": [
"framework",
"laravel"
],
"license": "MIT",
"require": {
"php": "^8.0",
"fideloper/proxy": "^4.2",
"fruitcake/laravel-cors": "^2.0",
"guzzlehttp/guzzle": "^7.0.1",
"laravel/framework": "^8.0",
"laravel/passport": "^10.0.1",
"laravel/tinker": "^2.0",
"laravel/ui": "^2.1"
},
"require-dev": {
"facade/ignition": "^2.3.6",
"fakerphp/faker": "^1.9.1",
"mockery/mockery": "^1.3.1",
"nunomaduro/collision": "^5.0",
"phpunit/phpunit": "^9.3"
},
"config": {
"optimize-autoloader": true,
"preferred-install": "dist",
"sort-packages": true
},
"extra": {
"laravel": {
"dont-discover": []
}
},
"autoload": {
"psr-4": {
"App\": "app/",
"Database\Factories\": "database/factories/",
"Database\Seeders\": "database/seeders/"
}
},
"autoload-dev": {
"psr-4": {
"Tests\": "tests/"
}
},
"minimum-stability": "dev",
"prefer-stable": true,
"scripts": {
"post-autoload-dump": [
"Illuminate\Foundation\ComposerScripts::postAutoloadDump",
"@php artisan package:discover --ansi"
],
"post-root-package-install": [
"@php -r "file_exists('.env') || copy('.env.example', '.env');""
],
"post-create-project-cmd": [
"@php artisan key:generate --ansi"
]
}
}

低于

正如在这多行错误中所写的那样:您使用的是过时的包,这些包既不兼容PHP 8,也不兼容彼此。

您需要v2中只支持Laravel v7的laravel/ui,以及作为Laravel v8核心的laravel/framework。要么将laravel/ui更新到v3,要么将Laravel降级到v7。从我的角度来看,这个问题与PHP8无关——在之前你没有遇到任何问题,这是一个奇迹

相关内容

  • 没有找到相关文章

最新更新