Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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. 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. Does anybody has the same issue or know what's wrong? Thank you

like image 641
Iana Tempos Avatar asked Dec 15 '22 04:12

Iana Tempos


1 Answers

yii2-authclient has been modified in the latest version which is not backward compatible.
Read about the upgrade process here.

Two solutions:

  1. Modify composer.json to fetch 2.0.6 version (replace * with 2.0.6) - no other changes are needed but no more updates for this extension.
  2. Upgrade your code following the guide in the link above so you can be up-to-date.
like image 131
Bizley Avatar answered Dec 25 '22 09:12

Bizley