简体   繁体   English

未定义的方法 Laravel\Lumen\Application::booted()

[英]Undefined method Laravel\Lumen\Application::booted()

Using Lumen not Laravel, I know that this package should work with Lumen as I've installed it on an alternative microservice which is also Lumen.使用 Lumen 而不是 Laravel,我知道这个 package 应该与 Lumen 一起使用,因为我已经将它安装在另一个也是 Lumen 的微服务上。 Can anyone help?任何人都可以帮忙吗?

Trying to register the socialite providers service provider尝试注册社交名流服务提供商

$app->register(\SocialiteProviders\Manager\ServiceProvider::class);

When I'm greeted with,当我被打招呼时,

(1/1) Error
Call to undefined method Laravel\Lumen\Application::booted()

Issue comes from this code inside the socialite providers package.问题来自社交名流提供商 package 内部的此代码。

$this->app->booted(function () {
    $socialiteWasCalled = app(SocialiteWasCalled::class);

    event($socialiteWasCalled);
});

It looks like there is a bug in that package for Lumen support.看起来 package 中存在一个用于流明支持的错误。 There was a commit recently to fix this issue - https://github.com/SocialiteProviders/Manager/commit/09903d33429f9f6c0da32c545c036a3e18964bbf最近有一个提交来解决这个问题 - https://github.com/SocialiteProviders/Manager/commit/09903d33429f9f6c0da32c545c036a3e18964bbf

You should wait until this has been released, or use the master branch;你应该等到这个发布,或者使用master分支; but this isn't recommended.但这不推荐。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM