为了账号安全,请及时绑定邮箱和手机立即绑定

尝试升级到 laravel 5.3,但我一直看到错误“调用未定义的方法 Illuminate

尝试升级到 laravel 5.3,但我一直看到错误“调用未定义的方法 Illuminate

PHP
30秒到达战场 2023-10-01 15:57:47
我正在尝试从 5.2 升级 laravel 5.3,但我不断在日志文件中看到这两个错误:Symfony\Component\Debug\Exception\FatalErrorException: Uncaught Error: Call to undefined method Illuminate\Auth\Access\Gate::abilities() in /Users/rohan0793/Code/poptin_v3/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php:237和这个:Symfony\Component\Debug\Exception\FatalThrowableError: Call to undefined method Illuminate\Log\Writer::setHandlers() in Command line code:1全栈输出:[2020-08-13 08:26:58] local.ERROR: Symfony\Component\Debug\Exception\FatalErrorException: Uncaught Error: Call to undefined method Illuminate\Auth\Access\Gate::abilities() in /Users/rohan0793/Code/poptin_v3/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php:237Stack trace:#0 Command line code(1): Illuminate\Support\Facades\Facade::__callStatic('abilities', Array)#1 {main}  thrown in /Users/rohan0793/Code/poptin_v3/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php:237[2020-08-13 08:26:58] local.ERROR: Symfony\Component\Debug\Exception\FatalThrowableError: Call to undefined method Illuminate\Log\Writer::setHandlers() in Command line code:1Stack trace:我不知道这些来自哪里以及如何解决它们。更新:我每分钟 41 秒都会看到这些错误。示例13:35:41 但是根据我在 homestead 的 crontab,我没有安排任何 crons更新 2: https: //github.com/Illuminate/auth/blob/5.5/Access/Gate.php 5.5 中提供了能力方法。但我还是5.3。很奇怪,但我不知道是什么在调用该代码。也许是第三方包。
查看完整描述

2 回答

?
qq_花开花谢_0

TA贡献1835条经验 获得超6个赞

https://marketplace.visualstudio.com/items?itemName=amiralizadeh9480.laravel-extra-intellisense

这个 VS Code 扩展导致了 2 个错误,它试图每分钟编译一些东西,因此非常混乱,感觉就像一个在后台运行的 cron 作业。


查看完整回答
反对 回复 2023-10-01
?
扬帆大鱼

TA贡献1799条经验 获得超9个赞

尝试在官方文档中查找升级指南。它们涵盖了很多问题,也许您会找到自己的问题。这是一个非常具体的问题,您在代码中遗漏了某些内容,但从问题来看,我们无法知道。https://laravel.com/docs/5.3/upgrade#upgrade-5.3.0

也尝试Rector升级或升级后出现任何问题https://github.com/rectorphp/rector


查看完整回答
反对 回复 2023-10-01
  • 2 回答
  • 0 关注
  • 60 浏览

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信