Iana Sergieieva Iana Sergieieva - 1 month ago 5
PHP Question

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

Answer

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.
Comments