Skip to content

Latest commit

 

History

History
89 lines (73 loc) · 1.95 KB

UPGRADE.md

File metadata and controls

89 lines (73 loc) · 1.95 KB

Upgrading instructions for Yii2-user

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-user 0.8.*

  • APPLY NEW MIGRATIONS!

  • webUserClass module option has been removed. If you use your own user component class you should set in user application component configuration:

'components' => [
    'user' => [
        'class' => 'your\web\User',
    ],
],
  • ModelManager component has been removed. If you override models, now you should set them via modelMap module's property.

Before:

'modules' => [
    'user' => [
        'class' => 'dektrium\user\Module',
        'components' => [
            'manager' => [
                'User' => 'your\model\User',
                'Profile' => 'your\model\Profile',
                ...
            ],
        ],
    ],
],

After:

'modules' => [
    'user' => [
        'class' => 'dektrium\user\Module',
        'modelMap' => [
            'User' => 'your\model\User',
            'Profile' => 'your\model\Profile',
            ...
        ],
    ],
],
  • Mailer component has been changed. Now it should be configured via mailer module property. You can read more about mailer configuration here.

Before:

'modules' => [
    'user' => [
        'class' => 'dektrium\user\Module',
        'components' => [
            'mailer' => [
                'sender' => '[email protected]',
            ],
        ],
    ],
],

After:

'modules' => [
    'user' => [
        'class' => 'dektrium\user\Module',
        'mailer' => [
            'sender' => '[email protected]',
        ],
    ],
],
  • Urls user/settings/email and user/settings/password have been merged into a new one user/settings/account.