我正在嘗試從 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條經驗 獲得超7個贊
https://marketplace.visualstudio.com/items?itemName=amiralizadeh9480.laravel-extra-intellisense
這個 VS Code 擴展導致了 2 個錯誤,它試圖每分鐘編譯一些東西,因此非?;靵y,感覺就像一個在后臺運行的 cron 作業。

揚帆大魚
TA貢獻1799條經驗 獲得超9個贊
嘗試在官方文檔中查找升級指南。它們涵蓋了很多問題,也許您會找到自己的問題。這是一個非常具體的問題,您在代碼中遺漏了某些內容,但從問題來看,我們無法知道。https://laravel.com/docs/5.3/upgrade#upgrade-5.3.0
也嘗試Rector
升級或升級后出現任何問題https://github.com/rectorphp/rector
- 2 回答
- 0 關注
- 214 瀏覽
添加回答
舉報
0/150
提交
取消