{"action":"created","issue":{"url":"https://api.github.com/repos/dereuromark/cakephp-tinyauth/issues/20","labels_url":"https://api.github.com/repos/dereuromark/cakephp-tinyauth/issues/20/labels{/name}","comments_url":"https://api.github.com/repos/dereuromark/cakephp-tinyauth/issues/20/comments","events_url":"https://api.github.com/repos/dereuromark/cakephp-tinyauth/issues/20/events","html_url":"https://github.com/dereuromark/cakephp-tinyauth/pull/20","id":125065694,"number":20,"title":"Removed config keys for <table>Plugin Now use the standard dot notation.","user":{"login":"mtancoigne","id":1732268,"avatar_url":"https://avatars.githubusercontent.com/u/1732268?v=3","gravatar_id":"","url":"https://api.github.com/users/mtancoigne","html_url":"https://github.com/mtancoigne","followers_url":"https://api.github.com/users/mtancoigne/followers","following_url":"https://api.github.com/users/mtancoigne/following{/other_user}","gists_url":"https://api.github.com/users/mtancoigne/gists{/gist_id}","starred_url":"https://api.github.com/users/mtancoigne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mtancoigne/subscriptions","organizations_url":"https://api.github.com/users/mtancoigne/orgs","repos_url":"https://api.github.com/users/mtancoigne/repos","events_url":"https://api.github.com/users/mtancoigne/events{/privacy}","received_events_url":"https://api.github.com/users/mtancoigne/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-01-05T22:26:24Z","updated_at":"2016-01-06T07:48:20Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/dereuromark/cakephp-tinyauth/pulls/20","html_url":"https://github.com/dereuromark/cakephp-tinyauth/pull/20","diff_url":"https://github.com/dereuromark/cakephp-tinyauth/pull/20.diff","patch_url":"https://github.com/dereuromark/cakephp-tinyauth/pull/20.patch"},"body":"As I can't make the tests yet, let's Travis do this..."},"comment":{"url":"https://api.github.com/repos/dereuromark/cakephp-tinyauth/issues/comments/169260442","html_url":"https://github.com/dereuromark/cakephp-tinyauth/pull/20#issuecomment-169260442","issue_url":"https://api.github.com/repos/dereuromark/cakephp-tinyauth/issues/20","id":169260442,"user":{"login":"mtancoigne","id":1732268,"avatar_url":"https://avatars.githubusercontent.com/u/1732268?v=3","gravatar_id":"","url":"https://api.github.com/users/mtancoigne","html_url":"https://github.com/mtancoigne","followers_url":"https://api.github.com/users/mtancoigne/followers","following_url":"https://api.github.com/users/mtancoigne/following{/other_user}","gists_url":"https://api.github.com/users/mtancoigne/gists{/gist_id}","starred_url":"https://api.github.com/users/mtancoigne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mtancoigne/subscriptions","organizations_url":"https://api.github.com/users/mtancoigne/orgs","repos_url":"https://api.github.com/users/mtancoigne/repos","events_url":"https://api.github.com/users/mtancoigne/events{/privacy}","received_events_url":"https://api.github.com/users/mtancoigne/received_events","type":"User","site_admin":false},"created_at":"2016-01-06T07:48:20Z","updated_at":"2016-01-06T07:48:20Z","body":"I'copy/paste the discussion with @bravo-kernel wich bring me here:\r\n\r\n```irc\r\n[22:17:00 CET] <bravo_kernel> we keep the \"old\" rolesTable setting\r\n[22:17:13 CET] <elcms> yep\r\n[22:17:27 CET] <bravo_kernel> make it support either Roles or Plugin.Roles inside the code\r\n[22:17:47 CET] <elcms> so we split it in our code\r\n[22:17:50 CET] <bravo_kernel> same for the other two \"old\" variables\r\n[22:18:05 CET] <bravo_kernel> exactly, whatever is needed there\r\n[22:18:31 CET] <bravo_kernel> the plugin syntax is 100% trustworthy so if detected we try to load a plugin class\r\n[22:18:34 CET] <elcms> yeah, that sound a great way to keep it right with cake\r\n[22:18:44 CET] <bravo_kernel> I think it is\r\n[22:18:55 CET] <bravo_kernel> just for fun\r\n[22:19:04 CET] <bravo_kernel> I learned Cake3 updating this plugin from cake2\r\n[22:19:08 CET] <elcms> now there's something : if the pivot table is in anther plugin ?\r\n[22:19:16 CET] <bravo_kernel> the hardest part was grasping the plugin notation :P\r\n[22:19:29 CET] <bravo_kernel> ok\r\n[22:19:37 CET] <elcms> bah, the user should fill the right thing\r\n[22:19:40 CET] <bravo_kernel> hmmm\r\n[22:19:48 CET] <bravo_kernel> probably \r\n[22:19:50 CET] <elcms> and we should stop to construct it by ourselve\r\n[22:19:55 CET] <bravo_kernel> and maybe we should not overengineer\r\n[22:19:57 CET] <elcms> *ourselves\r\n[22:20:18 CET] <elcms> I agree\r\n[22:20:34 CET] <bravo_kernel> I would say.... detect plugin notation: try loading class from plugin\r\n[22:20:43 CET] <bravo_kernel> no plugin: load plain\r\n[22:20:55 CET] <bravo_kernel> seems like that could cater all possibilities or not?\r\n[22:21:11 CET] <elcms> explode the chain, if more than 2 items in the array, we have a plugin, that's ok\r\n[22:21:23 CET] <bravo_kernel> haha\r\n[22:21:45 CET] <bravo_kernel> I can't tell for sure\r\n[22:21:58 CET] <bravo_kernel> but you will figure it out, maybe check the core somewhere to see how they do it\r\n[22:22:09 CET] <bravo_kernel> I'm only a hobbyist so far from a pro\r\n[22:22:14 CET] <elcms> Plugin.Model is basically two strings with a dot\r\n[22:22:24 CET] <bravo_kernel> totally true :)\r\n[22:22:41 CET] <bravo_kernel> I don't think you really can go wrong there\r\n[22:22:48 CET] <elcms> same here, but i'm a nearby full free time hobbyist\r\n[22:22:53 CET] <bravo_kernel> and Mark will jump in if needed but this feels right\r\n[22:23:01 CET] <bravo_kernel> haha, not unplanned I hope\r\n[22:23:12 CET] <elcms> ok, let sum this up\r\n[22:23:40 CET] <elcms> we keep usersTable, rolesTable, pivotTable\r\n[22:23:51 CET] <bravo_kernel> check\r\n[22:24:17 CET] <elcms> if pivotTable is empty and we are in multi-group, throw an error for misconfiguration\r\n[22:24:55 CET] <elcms> else, do as natural with the given config : test the strings and load the models\r\n[22:25:18 CET] <bravo_kernel> sounds good to me\r\n[22:25:24 CET] <bravo_kernel> i like exceptions for misconfigurations\r\n[22:25:40 CET] <elcms> me too\r\n[22:25:44 CET] <bravo_kernel> cool :)\r\n```\r\n\r\nTL;DR; we get rid of autoconfig and throw an exception if the pivot table is missing, so we don't even need to parse the table name for a plugin in it."}}