gpt4 book ai didi

php - 如何将 laravel 6 升级到 7

转载 作者:行者123 更新时间:2023-12-03 18:28:36 26 4
gpt4 key购买 nike

我正在尝试将 laravel 6 升级到 7,但出现错误。

 our requirements could not be resolved to an installable set of
packages.

Problem 1
- Conclusion: remove laravel/framework v6.0.3
- Conclusion: don't install laravel/framework v6.0.3
- laravel/ui 2.x-dev requires illuminate/console ^7.0 -> satisfiable by illuminate/console[7.x-dev, v7.0.0],
laravel/framework[7.x-dev].
- laravel/ui v2.0.0 requires illuminate/console ^7.0 -> satisfiable by illuminate/console[7.x-dev, v7.0.0],
laravel/framework[7.x-dev].
- Can only install one of: laravel/framework[7.x-dev, v6.0.3].
- don't install illuminate/console 7.x-dev|don't install laravel/framework v6.0.3
- don't install illuminate/console v7.0.0|don't install laravel/framework v6.0.3
- Installation request for laravel/framework (locked at v6.0.3, required as ^6.0) -> satisfiable by laravel/framework[v6.0.3].
- Installation request for laravel/ui ^2.0 -> satisfiable by laravel/ui[2.x-dev, v2.0.0].

最佳答案

只要按照文档,你一定已经安装了 php7.2.5

Update your laravel/framework dependency to ^7.0 in your composer.jsonfile.

In addition, update your nunomaduro/collision dependency to^4.1,

phpunit/phpunit dependency to ^8.5,

facade/ignition to> `^2.0


之后作为下一步。
您的应用程序的 App\Exceptions\Handler 的报告和渲染方法类应该接受 的实例可 throw 接口(interface)而不是异常实例:
use Throwable; // add this line

public function report(Throwable $exception); // replace Exception with Throwable
public function render($request, Throwable $exception); // replace Exception with Throwable
在那次运行之后
composer update

关于php - 如何将 laravel 6 升级到 7,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60520220/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com