Yii2 Class yii\authclient\clients\GoogleOAuth 不存在
Yii2 Class yii\authclient\clients\GoogleOAuth does not exist
我使用 dektrium/yii2-user(在一个项目上)和 yiisoft/yii2-authclient(在另一个项目上)通过 Google 帐户登录。
前段时间一切正常,但我想在上次作曲家更新后发生了一些变化,现在我收到错误消息:"Class yii\authclient\clients\GoogleOAuth does not exist" 尝试打开登录页面时。
有没有人有同样的问题或知道出了什么问题?
谢谢
yii2-authclient
已在最新版本中修改,不向下兼容
Read about the upgrade process here.
两种解决方案:
- 修改 composer.json 以获取 2.0.6 版本(将
*
替换为 2.0.6
)- 无需其他更改,但此扩展不再更新。
- 按照上面 link 中的指南升级您的代码,这样您就可以保持最新。
在配置文件中
从
替换
'google' => [
'class' => 'yii\authclient\clients\GoogleOAuth',
..
],
替换为
'google' => [
'class' => 'yii\authclient\clients\Google',
...
],
在您的配置文件中使用 yii\authclient\clients\Google 而不是 yii\authclient\clients\GoogleOAuth。
我使用 dektrium/yii2-user(在一个项目上)和 yiisoft/yii2-authclient(在另一个项目上)通过 Google 帐户登录。 前段时间一切正常,但我想在上次作曲家更新后发生了一些变化,现在我收到错误消息:"Class yii\authclient\clients\GoogleOAuth does not exist" 尝试打开登录页面时。 有没有人有同样的问题或知道出了什么问题? 谢谢
yii2-authclient
已在最新版本中修改,不向下兼容
Read about the upgrade process here.
两种解决方案:
- 修改 composer.json 以获取 2.0.6 版本(将
*
替换为2.0.6
)- 无需其他更改,但此扩展不再更新。 - 按照上面 link 中的指南升级您的代码,这样您就可以保持最新。
在配置文件中 从
替换'google' => [
'class' => 'yii\authclient\clients\GoogleOAuth',
..
],
替换为
'google' => [ 'class' => 'yii\authclient\clients\Google', ... ],
在您的配置文件中使用 yii\authclient\clients\Google 而不是 yii\authclient\clients\GoogleOAuth。