php - 尝试升级到 Laravel 5.3,但我一直看到错误 `Call to undefined method Illuminate\Auth\Access\Gate::abilities()`

标签 php laravel symfony laravel-5

我正在尝试从 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:237
Stack 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:1
Stack trace:
#0 [internal function]: VscodeLaravelExtraIntellisenseProvider->boot()
#1 /Users/rohan0793/Code/poptin_v3/vendor/laravel/framework/src/Illuminate/Container/Container.php(508): call_user_func_array(Array, Array)
#2 /Users/rohan0793/Code/poptin_v3/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(769): Illuminate\Container\Container->call(Array)
#3 /Users/rohan0793/Code/poptin_v3/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(752): Illuminate\Foundation\Application->bootProvider(Object(VscodeLaravelExtraIntellisenseProvider))
#4 [internal function]: Illuminate\Foundation\Application->Illuminate\Foundation\{closure}(Object(VscodeLaravelExtraIntellisenseProvider), 2)
#5 /Users/rohan0793/Code/poptin_v3/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(753): array_walk(Array, Object(Closure))
#6 /Users/rohan0793/Code/poptin_v3/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/BootProviders.php(17): Illuminate\Foundation\Application->boot()
#7 /Users/rohan0793/Code/poptin_v3/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(203): Illuminate\Foundation\Bootstrap\BootProviders->bootstrap(Object(Illuminate\Foundation\Application))
#8 /Users/rohan0793/Code/poptin_v3/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(267): Illuminate\Foundation\Application->bootstrapWith(Array)
#9 /Users/rohan0793/Code/poptin_v3/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(113): Illuminate\Foundation\Console\Kernel->bootstrap()
#10 Command line code(1): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
我不知道这些来自哪里以及如何解决它们。
更新:我每分钟在 41 秒看到这些错误。示例 13:35:41但是根据我在 homestead 的 crontab,我没有安排任何 cron
更新 2:https://github.com/illuminate/auth/blob/5.5/Access/Gate.php能力方法存在于 5.5 中。但是我还是5.3。很奇怪,但我不知道是什么在调用该代码。也许是第三方包。

最佳答案

https://marketplace.visualstudio.com/items?itemName=amiralizadeh9480.laravel-extra-intellisense
这个 VS Code 扩展导致了 2 个错误,它每分钟都在尝试编译一些东西,因此它非常困惑,感觉就像一个在后台运行的 cron 作业。

关于php - 尝试升级到 Laravel 5.3,但我一直看到错误 `Call to undefined method Illuminate\Auth\Access\Gate::abilities()`,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63393167/

相关文章:

php - 如何在 Laravel 中显示模型关系?

javascript - php foreach 循环中的隐藏输入值未正确传递给 JQuery

php - 如何在自定义类 laravel 5 中使用 session ?

laravel - 如何从 Laravel 关系中获取数据而不将其加载到初始模型上

php - 将数组放入 session symfony2

php - 如何制作 PHP 测试套件

php - 同时查询的数据不一致

javascript - 在 Laravel 5.7 事件监听器中运行 Javascript

html - 如何缩小 Symfony/Twig 生成的 HTML 代码以满足 Google PageSpeed Insight?

unit-testing - catch block 中的 PHPUnit 测试代码