{"action":"created","issue":{"url":"https://api.github.com/repos/cakephp/cakephp/issues/5836","labels_url":"https://api.github.com/repos/cakephp/cakephp/issues/5836/labels{/name}","comments_url":"https://api.github.com/repos/cakephp/cakephp/issues/5836/comments","events_url":"https://api.github.com/repos/cakephp/cakephp/issues/5836/events","html_url":"https://github.com/cakephp/cakephp/pull/5836","id":56655788,"number":5836,"title":"The plugin alias should not be ignored","user":{"login":"AD7six","id":33387,"avatar_url":"https://avatars.githubusercontent.com/u/33387?v=3","gravatar_id":"","url":"https://api.github.com/users/AD7six","html_url":"https://github.com/AD7six","followers_url":"https://api.github.com/users/AD7six/followers","following_url":"https://api.github.com/users/AD7six/following{/other_user}","gists_url":"https://api.github.com/users/AD7six/gists{/gist_id}","starred_url":"https://api.github.com/users/AD7six/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AD7six/subscriptions","organizations_url":"https://api.github.com/users/AD7six/orgs","repos_url":"https://api.github.com/users/AD7six/repos","events_url":"https://api.github.com/users/AD7six/events{/privacy}","received_events_url":"https://api.github.com/users/AD7six/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/cakephp/cakephp/labels/Defect","name":"Defect","color":"f7c6c7"},{"url":"https://api.github.com/repos/cakephp/cakephp/labels/Enhancement","name":"Enhancement","color":"bfe5bf"},{"url":"https://api.github.com/repos/cakephp/cakephp/labels/RFC","name":"RFC","color":"c7def8"}],"state":"closed","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/cakephp/cakephp/milestones/7","labels_url":"https://api.github.com/repos/cakephp/cakephp/milestones/7/labels","id":453043,"number":7,"title":"3.0.0","description":"New major release that breaks compatibility with 2.x\r\n\r\n- PHP5.4.19+\r\n- New ORM & behaviors.\r\n- Improved Routing\r\n- PSR-0 and composer support.\r\n- Simpler configuration and bootstrapping.\r\n- Improved configuration handling.\r\n- Improved bake.\r\n\r\nSee [the roadmap](http://github.com/cakephp/cakephp/wiki/3.0-roadmap) for more details.","creator":{"login":"lh-import","id":5175817,"avatar_url":"https://avatars.githubusercontent.com/u/5175817?v=3","gravatar_id":"","url":"https://api.github.com/users/lh-import","html_url":"https://github.com/lh-import","followers_url":"https://api.github.com/users/lh-import/followers","following_url":"https://api.github.com/users/lh-import/following{/other_user}","gists_url":"https://api.github.com/users/lh-import/gists{/gist_id}","starred_url":"https://api.github.com/users/lh-import/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lh-import/subscriptions","organizations_url":"https://api.github.com/users/lh-import/orgs","repos_url":"https://api.github.com/users/lh-import/repos","events_url":"https://api.github.com/users/lh-import/events{/privacy}","received_events_url":"https://api.github.com/users/lh-import/received_events","type":"User","site_admin":false},"open_issues":20,"closed_issues":2308,"state":"open","created_at":"2013-10-11T20:56:23Z","updated_at":"2015-02-14T13:57:41Z","due_on":null,"closed_at":null},"comments":17,"created_at":"2015-02-05T11:01:33Z","updated_at":"2015-02-14T18:14:31Z","closed_at":"2015-02-12T16:52:21Z","pull_request":{"url":"https://api.github.com/repos/cakephp/cakephp/pulls/5836","html_url":"https://github.com/cakephp/cakephp/pull/5836","diff_url":"https://github.com/cakephp/cakephp/pull/5836.diff","patch_url":"https://github.com/cakephp/cakephp/pull/5836.patch"},"body":"I realize this might be contested (since it was intentional functionality), but allowing fuzzy-alias matching is problematic, and IMO propogating developer error - which the framework shouldn't be doing.\r\n\r\nThe scenario which brought me here was this:\r\n\r\n![gc](https://cloud.githubusercontent.com/assets/33387/6059085/f73b2d70-ad2d-11e4-93b6-ed7a5013f17f.png)\r\n\r\nThe error actually came from debug kit:\r\n\r\n```\r\n2015-02-05 10:22:07 Error: [BadMethodCallException] Unknown method \"gc\"\r\nRequest URL: /\r\nStack Trace:\r\n#0 vendor/cakephp/debug_kit/src/Routing/Filter/DebugBarFilter.php(187): Cake\\ORM\\Table->__call('gc', Array)\r\n#1 vendor/cakephp/debug_kit/src/Routing/Filter/DebugBarFilter.php(187): Api\\Model\\Table\\RequestsTable->gc()\r\n#2 vendor/cakephp/cakephp/src/Event/EventManager.php(380): DebugKit\\Routing\\Filter\\DebugBarFilter->afterDispatch(Object(Cake\\Event\\Event), Object(Cake\\Network\\Request), Object(Cake\\Network\\Response))\r\n#3 vendor/cakephp/cakephp/src/Event/EventManager.php(346): Cake\\Event\\EventManager->_callListener(Array, Object(Cake\\Event\\Event))\r\n#4 vendor/cakephp/cakephp/src/Event/EventManagerTrait.php(78): Cake\\Event\\EventManager->dispatch(Object(Cake\\Event\\Event))\r\n#5 vendor/cakephp/cakephp/src/Routing/Dispatcher.php(92): Cake\\Routing\\Dispatcher->dispatchEvent('Dispatcher.afte...', Array)\r\n#6 webroot/index.php(37): Cake\\Routing\\Dispatcher->dispatch(Object(Cake\\Network\\Request), Object(Cake\\Network\\Response))\r\n#7 {main}\r\n```\r\n\r\nBecause [these lines of code](https://github.com/cakephp/debug_kit/blob/3.0/src/Routing/Filter/DebugBarFilter.php#L186-L187):\r\n\r\n```\r\n$requests = TableRegistry::get('DebugKit.Requests');\r\n$requests->gc();\r\n```\r\n\r\nDid _not_ return the table class from debug kit, but instead from my own Api plugin. I would expect this to be an ongoing problem since namespaces aught to eliminate the need for loose-alias matching.\r\n\r\nSo, should we use table aliases plugin-prefixed within the table registry?"},"comment":{"url":"https://api.github.com/repos/cakephp/cakephp/issues/comments/74385704","html_url":"https://github.com/cakephp/cakephp/pull/5836#issuecomment-74385704","issue_url":"https://api.github.com/repos/cakephp/cakephp/issues/5836","id":74385704,"user":{"login":"AD7six","id":33387,"avatar_url":"https://avatars.githubusercontent.com/u/33387?v=3","gravatar_id":"","url":"https://api.github.com/users/AD7six","html_url":"https://github.com/AD7six","followers_url":"https://api.github.com/users/AD7six/followers","following_url":"https://api.github.com/users/AD7six/following{/other_user}","gists_url":"https://api.github.com/users/AD7six/gists{/gist_id}","starred_url":"https://api.github.com/users/AD7six/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AD7six/subscriptions","organizations_url":"https://api.github.com/users/AD7six/orgs","repos_url":"https://api.github.com/users/AD7six/repos","events_url":"https://api.github.com/users/AD7six/events{/privacy}","received_events_url":"https://api.github.com/users/AD7six/received_events","type":"User","site_admin":false},"created_at":"2015-02-14T18:14:31Z","updated_at":"2015-02-14T18:14:31Z","body":"I'd rather we didn't revert, this pr isn't in RC2, and while it sure is a PITA we/I aught to be able to sort them out fast enough. All these errors are implicit \"source == table registry key\" assumptions I missed in this PR, and we won't find them without exposing ourselves to a brief, difficult, period of chaos.\r\n\r\n@patrickconroy best action for any such scenario is to PR a failing test case (without making any assumptions about how the internals work), though I would expect https://github.com/cakephp/cakephp/pull/5884 fixes that particular problem."}}