1.5 KiB
Upgrading Instructions for Yii Framework v2
!!!IMPORTANT!!!
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 Yii 2.0 Beta
-
If you used
clearAll()orclearAllAssignments()ofyii\rbac\DbManager, you should replace them withremoveAll()andremoveAllAssignments()respectively. -
If you created RBAC rule classes, you should modify their
execute()method by adding$useras the first parameter:execute($user, $item, $params). The$userparameter represents the ID of the user currently being access checked. Previously, this is passed via$params['user']. -
If you override
yii\grid\DataColumn::getDataCellValue()with visibilityprotectedyou have to change visibility topublicas visibility of the base method has changed. -
If you have classes implementing
yii\web\IdentityInterface(very common), you should modify the signature offindIdentityByAccessToken()aspublic static function findIdentityByAccessToken($token, $type = null). The new$typeparameter will contain the type information about the access token. For example, if you useyii\filters\auth\HttpBearerAuthauthentication method, the value of this parameter will beyii\filters\auth\HttpBearerAuth. This allows you to differentiate access tokens taken by different authentication methods.