{"action":"created","issue":{"url":"https://api.github.com/repos/bupy7/yii2-activerecord-history/issues/1","repository_url":"https://api.github.com/repos/bupy7/yii2-activerecord-history","labels_url":"https://api.github.com/repos/bupy7/yii2-activerecord-history/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/bupy7/yii2-activerecord-history/issues/1/comments","events_url":"https://api.github.com/repos/bupy7/yii2-activerecord-history/issues/1/events","html_url":"https://github.com/bupy7/yii2-activerecord-history/issues/1","id":172069397,"number":1,"title":"Usage with yii2-user","user":{"login":"maxxer","id":240201,"avatar_url":"https://avatars.githubusercontent.com/u/240201?v=3","gravatar_id":"","url":"https://api.github.com/users/maxxer","html_url":"https://github.com/maxxer","followers_url":"https://api.github.com/users/maxxer/followers","following_url":"https://api.github.com/users/maxxer/following{/other_user}","gists_url":"https://api.github.com/users/maxxer/gists{/gist_id}","starred_url":"https://api.github.com/users/maxxer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maxxer/subscriptions","organizations_url":"https://api.github.com/users/maxxer/orgs","repos_url":"https://api.github.com/users/maxxer/repos","events_url":"https://api.github.com/users/maxxer/events{/privacy}","received_events_url":"https://api.github.com/users/maxxer/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/bupy7/yii2-activerecord-history/labels/help%20wanted","name":"help wanted","color":"159818"},{"url":"https://api.github.com/repos/bupy7/yii2-activerecord-history/labels/question","name":"question","color":"cc317c"}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":13,"created_at":"2016-08-19T07:16:54Z","updated_at":"2016-08-19T14:12:53Z","closed_at":"2016-08-19T14:09:46Z","body":"The Module::init checks that the User component **is** *yii\\web\\User*. When using the [yii2-user](https://github.com/dektrium/yii2-user) extension the component class can be a custom one, like *app\\models\\User*. This makes migration fails with the following message:\r\n\r\n```\r\n$ ./yii migrate/up --migrationPath=@bupy7/activerecord/history/migrations\r\nException 'yii\\base\\InvalidConfigException' with message '\"user\" refers to a app\\models\\User component. yii\\web\\User is expected.'\r\n\r\nin /home/maxxer/yii2app/vendor/yiisoft/yii2/di/Instance.php:135\r\n\r\nStack trace:\r\n#0 /home/maxxer/yii2app/vendor/bupy7/yii2-activerecord-history/Module.php(42): yii\\di\\Instance::ensure('user', 'yii\\\\web\\\\User')\r\n#1 /home/maxxer/yii2app/vendor/yiisoft/yii2/base/Object.php(107): bupy7\\activerecord\\history\\Module->init()\r\n#2 /home/maxxer/yii2app/vendor/yiisoft/yii2/base/Module.php(138): yii\\base\\Object->__construct(Array)\r\n#3 [internal function]: yii\\base\\Module->__construct('arhistory', Object(yii\\console\\Application), Array)\r\n#4 /home/maxxer/yii2app/vendor/yiisoft/yii2/di/Container.php(373): ReflectionClass->newInstanceArgs(Array)\r\n#5 /home/maxxer/yii2app/vendor/yiisoft/yii2/di/Container.php(154): yii\\di\\Container->build('bupy7\\\\activerec...', Array, Array)\r\n#6 /home/maxxer/yii2app/vendor/yiisoft/yii2/BaseYii.php(344): yii\\di\\Container->get('bupy7\\\\activerec...', Array, Array)\r\n#7 /home/maxxer/yii2app/vendor/yiisoft/yii2/base/Module.php(353): yii\\BaseYii::createObject(Array, Array)\r\n#8 /home/maxxer/yii2app/vendor/yiisoft/yii2/base/Application.php(304): yii\\base\\Module->getModule('arhistory')\r\n#9 /home/maxxer/yii2app/vendor/yiisoft/yii2/base/Application.php(267): yii\\base\\Application->bootstrap()\r\n#10 /home/maxxer/yii2app/vendor/yiisoft/yii2/console/Application.php(124): yii\\base\\Application->init()\r\n#11 /home/maxxer/yii2app/vendor/yiisoft/yii2/base/Object.php(107): yii\\console\\Application->init()\r\n#12 /home/maxxer/yii2app/vendor/yiisoft/yii2/base/Application.php(206): yii\\base\\Object->__construct(Array)\r\n#13 /home/maxxer/yii2app/vendor/yiisoft/yii2/console/Application.php(89): yii\\base\\Application->__construct(Array)\r\n#14 /home/maxxer/yii2app/yii(19): yii\\console\\Application->__construct(Array)\r\n#15 {main}\r\n```\r\n\r\nIs it possible to make it work with any custom User class?"},"comment":{"url":"https://api.github.com/repos/bupy7/yii2-activerecord-history/issues/comments/241029357","html_url":"https://github.com/bupy7/yii2-activerecord-history/issues/1#issuecomment-241029357","issue_url":"https://api.github.com/repos/bupy7/yii2-activerecord-history/issues/1","id":241029357,"user":{"login":"bupy7","id":5145037,"avatar_url":"https://avatars.githubusercontent.com/u/5145037?v=3","gravatar_id":"","url":"https://api.github.com/users/bupy7","html_url":"https://github.com/bupy7","followers_url":"https://api.github.com/users/bupy7/followers","following_url":"https://api.github.com/users/bupy7/following{/other_user}","gists_url":"https://api.github.com/users/bupy7/gists{/gist_id}","starred_url":"https://api.github.com/users/bupy7/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bupy7/subscriptions","organizations_url":"https://api.github.com/users/bupy7/orgs","repos_url":"https://api.github.com/users/bupy7/repos","events_url":"https://api.github.com/users/bupy7/events{/privacy}","received_events_url":"https://api.github.com/users/bupy7/received_events","type":"User","site_admin":false},"created_at":"2016-08-19T14:12:53Z","updated_at":"2016-08-19T14:12:53Z","body":";)"}}
{"actor":{"display_login":"bupy7"}}