[英]Yii2 Class yii\authclient\clients\GoogleOAuth does not exist
I use dektrium/yii2-user (on one project) and yiisoft/yii2-authclient (on another one) to login via Google account. 我使用dektrium / yii2-user(在一个项目上)和yiisoft / yii2-authclient(在另一个项目上)通过Google帐户登录。 Some time ago it was everything ok, but i guess after last composer update something was changed and now i get an error: "Class yii\\authclient\\clients\\GoogleOAuth does not exist" when try to open login page. 前段时间一切都还好,但我想在最后一个作曲家更新之后发生了一些变化,现在我得到一个错误:当尝试打开登录页面时,“类yii \\ authclient \\ clients \\ GoogleOAuth不存在”。 Does anybody has the same issue or know what's wrong? 有没有人有同样的问题或知道什么是错的? Thank you 谢谢
yii2-authclient
has been modified in the latest version which is not backward compatible. yii2-authclient
已在最新版本中进行了修改,该版本不向后兼容。
Read about the upgrade process here . 在此处阅读升级过程 。
Two solutions: 两种解决方案
*
with 2.0.6
) - no other changes are needed but no more updates for this extension. 修改composer.json以获取2.0.6版本(用2.0.6
替换*
) - 不需要进行其他更改,但不再需要此扩展的更新。 In the config file Replace from 在配置文件中替换
'google' => [
'class' => 'yii\authclient\clients\GoogleOAuth',
..
],
Replace to 替换为
'google' => [ 'class' => 'yii\\authclient\\clients\\Google', ... ], 'google'=> ['class'=>'yii \\ authclient \\ clients \\ Google',...],
在配置文件中使用yii \\ authclient \\ clients \\ Google而不是yii \\ authclient \\ clients \\ GoogleOAuth。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.