Highly customizable and extensible user management, authentication, and authorization Yii2 extension
tonydspaniard on master
Add nl_NL Dutch translation. Mi… Improve translations Merge pull request #301 from sq… (compare)
maxxer on master
Fix password expire service #293 (compare)
$ php yii migrate
Yii Migration Tool (based on Yii v2.0.13.1)
Total 7 new migrations to be applied:
Da\User\Migration\m000000_000001_create_user_table
Da\User\Migration\m000000_000002_create_profile_table
Da\User\Migration\m000000_000003_create_social_account_table
Da\User\Migration\m000000_000004_create_token_table
Da\User\Migration\m000000_000005_add_last_login_at
Da\User\Migration\m000000_000006_add_two_factor_fields
$ php yii migrate --migrationPath=@Da/User/Migration
Yii Migration Tool (based on Yii v2.0.13.1)
Total 1 new migration to be applied:
m000000_000006_add_two_factor_fields
Apply the above migration? (yes|no) [no]:y
*** applying m000000_000006_add_two_factor_fields
Exception 'ReflectionException' with message 'Class m000000_000006_add_two_factor_fields does not exist'
in /var/www/html/vendor/yiisoft/yii2/di/Container.php:426
Stack trace:
#0 /var/www/html/vendor/yiisoft/yii2/di/Container.php(426): ReflectionClass->__construct('m000000_000006_...')
#1 /var/www/html/vendor/yiisoft/yii2/di/Container.php(364): yii\di\Container->getDependencies('m000000_000006_...')
#2 /var/www/html/vendor/yiisoft/yii2/di/Container.php(156): yii\di\Container->build('m000000_000006_...', Array, Array)
#3 /var/www/html/vendor/yiisoft/yii2/BaseYii.php(349): yii\di\Container->get('m000000_000006_...', Array, Array)
#4 /var/www/html/vendor/yiisoft/yii2/console/controllers/MigrateController.php(195): yii\BaseYii::createObject(Array)
#5 /var/www/html/vendor/yiisoft/yii2/console/controllers/BaseMigrateController.php(724): yii\console\controllers\MigrateController->createMigration('m000000_000006_...')
#6 /var/www/html/vendor/yiisoft/yii2/console/controllers/BaseMigrateController.php(199): yii\console\controllers\BaseMigrateController->migrateUp('m000000_000006_...')
#7 [internal function]: yii\console\controllers\BaseMigrateController->actionUp(0)
#8 /var/www/html/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)
#9 /var/www/html/vendor/yiisoft/yii2/base/Controller.php(157): yii\base\InlineAction->runWithParams(Array)
#10 /var/www/html/vendor/yiisoft/yii2/console/Controller.php(135): yii\base\Controller->runAction('', Array)
#11 /var/www/html/vendor/yiisoft/yii2/base/Module.php(528): yii\console\Controller->runAction('', Array)
#12 /var/www/html/vendor/yiisoft/yii2/console/Application.php(180): yii\base\Module->runAction('migrate', Array)
#13 /var/www/html/vendor/yiisoft/yii2/console/Application.php(147): yii\console\Application->runAction('migrate', Array)
#14 /var/www/html/vendor/yiisoft/yii2/base/Application.php(386): yii\console\Application->handleRequest(Object(yii\console\Request))
#15 /var/www/html/yii(20): yii\base\Application->run()
#16 {main}
While operating namespaced migrations: creating new, reverting and so on, you should specify full namespace before migration name. Note that backslash () symbol is usually considered a special character in the shell, so you need to escape it properly to avoid shell errors or incorrect behavior. For example:
php yii migrate/mark Da\\User\\Migration\\m000000_000002
Unknown Method – yii\base\UnknownMethodException
Calling unknown method: common\models\User::getIsAdmin()
Another comment about the instructions: The second migration, yii migrate --migrationPath=@yii/rbac/migrations, won't work unless the authManager has been configured. Could you add that to the Components section of the example in Step 2? This would help people who aren't familiar with RBAC and haven't configured Dektrium before.
About my previous comment where I mentioned the User table and failing the first migration. My apologies, I see now you have a note to not install the Advanced Template migration m130524_201442_init.php. However, if a user has already completed the Advanced Template setup, they will have already done this migration. Perhaps you could place a note above the mention of the Advanced Template to warn users not to perform the migrations as the Advanced Template instructions state, and if they have done so, to drop the table?
Again, thanks for listening.