laravel6升级laravel7

1、更新依赖
composer.json修改为
在这里插入图片描述
App\Exceptions\Handler修改为
增加use Throwable;
其余两句修改
在这里插入图片描述
admp-api\config\session.php修改为
在这里插入图片描述
2、执行升级
composer update 

执行后报错如下:

PHP Deprecated:  Directive 'track_errors' is deprecated in Unknown on line 0

Deprecated: Directive 'track_errors' is deprecated in Unknown on line 0
PHP Deprecated:  Directive 'track_errors' is deprecated in Unknown on line 0

Deprecated: Directive 'track_errors' is deprecated in Unknown on line 0
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

Problem 1

- Root composer.json requires fideloper/proxy ^4.0, found fideloper/proxy[4.4.1] in the lock file but not in remote repositories, make sure you avoid updating this package to keep the one from the lock file.

Problem 2

- Root composer.json requires gregwar/captcha ^1.1, found gregwar/captcha[v1.1.9] in the lock file but not in remote repositories, make sure you avoid updating this package to keep the one from the lock file.

Problem 3

- Root composer.json requires guzzlehttp/guzzle ^7.4, found guzzlehttp/guzzle[7.4.2] in the lock file but not in remote repositories, make sure you avoid updating this package to keep the one from the lock file.

Problem 4

……

解决方案一:

更改composer镜像

查看镜像地址并更换(composer国内可能较慢切换国内镜像)

查看镜像: composer config -g -l

更换阿里云镜像
composer config -g repo.packagist composer https://mirrors.aliyun.com/composer/

 再执行  composer update 

解决方案二:

composer update --ignore-platform-regs

使用强制安装更新

注意:composer.json文件中 "require": { "php": "^7.3",}   须为laravel框架以上版本

  • 18
    点赞
  • 8
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值