Upgrading Instructions for Yii Framework v2 AuthClient Extension
The following upgrading instructions are cumulative. That is, if you want to upgrade from version A to version C and there is version B between A and C, you need to following the instructions for both A and B.
Upgrade from yii2-authclient 2.2.5
Default request option for turning off SSL peer verification was removed. If you need to skip peer verification you can configure individual client request options:
return [ 'components' => [ 'authClientCollection' => [ 'class' => 'yii\authclient\Collection', 'clients' => [ 'google' => [ 'class' => 'yii\authclient\clients\Google', 'clientId' => 'google_client_id', 'clientSecret' => 'google_client_secret', 'requestOptions' => [ 'sslVerifyPeer' => false, // <-- here ], ], // etc. ], ] // ... ], // ... ];
Upgrade from yii2-authclient 2.1.0
- The signature of the
yii\authclient\BaseOAuth::saveAccessToken()method has been changed. In case you are extending related class and override this method, you should check, if it matches parent declaration.
Upgrade from yii2-authclient 2.0.6
yii\authclient\clients\GoogleOAuthhas been renamed to
yii\authclient\clients\Google. Make sure you are using correct name for this class.
yii\authclient\clients\YandexOAuthhas been renamed to
yii\authclient\clients\Yandex. Make sure you are using correct name for this class.
The signature of the following methods has been changed:
yii\authclient\widgets\AuthChoice::createClientUrl(). Make sure you invoke those methods correctly. In case you are extending related classes, you should check, if overridden methods match parent declaration.
yii\authclient\BaseOAuth::curlOptionsand related methods have been removed - use
Following methods have been removed:
yii\authclient\BaseOAuth::determineContentTypeByRaw(). Make sure you do not invoke them.
responseBodyhave been removed, field
responseadded instead, holding
yii\httpclient\Responseinstance. Class constructor adjusted accordingly. Make sure you throw and process this exception correctly.
yii\authclient\BaseClient::initUserAttributes()has been made abstract. If you extend
yii\authclient\BaseClientclass, make sure you provide implementation for this method, or declare your class as abstract.
yii\authclient\OAuth2have been made abstract. Make sure you do not instantiate these classes.
yii\authclient\clients\YandexOpenIdhave been removed, since Google and Yandex no longer supports OpenID protocol. Make sure you do not use or refer these classes.
yii\authclient\widgets\AuthChoicehas been changed to return the generated HTML instead of echo it. Make sure you invoke or override these methods correctly.
Markup generated by
yii\authclient\widgets\AuthChoiceand related CSS has been simplified. In case you customize styles or HTML for
AuthChoice, you should check it to produce valid widget appearance.
Automatic auth 'state' validation added to
yii\authclient\OAuth2. In case state validation is not supported or not desirable for your particular client, you should disabled it setting