{"action":"created","issue":{"url":"https://api.github.com/repos/codeigniter4/CodeIgniter4/issues/1552","repository_url":"https://api.github.com/repos/codeigniter4/CodeIgniter4","labels_url":"https://api.github.com/repos/codeigniter4/CodeIgniter4/issues/1552/labels{/name}","comments_url":"https://api.github.com/repos/codeigniter4/CodeIgniter4/issues/1552/comments","events_url":"https://api.github.com/repos/codeigniter4/CodeIgniter4/issues/1552/events","html_url":"https://github.com/codeigniter4/CodeIgniter4/issues/1552","id":385604108,"node_id":"MDU6SXNzdWUzODU2MDQxMDg=","number":1552,"title":"Ability to add namespace to FileLocator class","user":{"login":"amigoscs","id":12295997,"node_id":"MDQ6VXNlcjEyMjk1OTk3","avatar_url":"https://avatars3.githubusercontent.com/u/12295997?v=4","gravatar_id":"","url":"https://api.github.com/users/amigoscs","html_url":"https://github.com/amigoscs","followers_url":"https://api.github.com/users/amigoscs/followers","following_url":"https://api.github.com/users/amigoscs/following{/other_user}","gists_url":"https://api.github.com/users/amigoscs/gists{/gist_id}","starred_url":"https://api.github.com/users/amigoscs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amigoscs/subscriptions","organizations_url":"https://api.github.com/users/amigoscs/orgs","repos_url":"https://api.github.com/users/amigoscs/repos","events_url":"https://api.github.com/users/amigoscs/events{/privacy}","received_events_url":"https://api.github.com/users/amigoscs/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-11-29T07:31:00Z","updated_at":"2018-11-29T12:04:31Z","closed_at":null,"author_association":"NONE","body":"I add a `namespace` (`Services::autoloader()->addNamespace()`) and expect the `FileLocator class` to look for my class also in the added namespace, but this does not happen.\r\n\r\n**Example:**\r\n\r\nIn my controller\r\n`Services::autoloader()->addNamespace('MyPlugin', APPPATH . 'Plugins/MyPlugin/');`\r\n\r\nNext, I try to access the language file\r\n`Lang('MyPlugin.title')`\r\n\r\nI expect the `Language class` will also load the file along the way \r\n`APPPATH . 'Plugins/MyPlugin/Language/{locale}/MyPlugin.php`\r\n\r\nbut this is not happening\r\n\r\n**CodeIgniter 4 version**\r\nCodeIgniter 4.0.0 alpha 2\r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/codeigniter4/CodeIgniter4/issues/comments/442809730","html_url":"https://github.com/codeigniter4/CodeIgniter4/issues/1552#issuecomment-442809730","issue_url":"https://api.github.com/repos/codeigniter4/CodeIgniter4/issues/1552","id":442809730,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0MjgwOTczMA==","user":{"login":"natanfelles","id":3011423,"node_id":"MDQ6VXNlcjMwMTE0MjM=","avatar_url":"https://avatars3.githubusercontent.com/u/3011423?v=4","gravatar_id":"","url":"https://api.github.com/users/natanfelles","html_url":"https://github.com/natanfelles","followers_url":"https://api.github.com/users/natanfelles/followers","following_url":"https://api.github.com/users/natanfelles/following{/other_user}","gists_url":"https://api.github.com/users/natanfelles/gists{/gist_id}","starred_url":"https://api.github.com/users/natanfelles/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/natanfelles/subscriptions","organizations_url":"https://api.github.com/users/natanfelles/orgs","repos_url":"https://api.github.com/users/natanfelles/repos","events_url":"https://api.github.com/users/natanfelles/events{/privacy}","received_events_url":"https://api.github.com/users/natanfelles/received_events","type":"User","site_admin":false},"created_at":"2018-11-29T12:04:31Z","updated_at":"2018-11-29T12:04:31Z","author_association":"COLLABORATOR","body":"For now, add the namespace in your \\Config\\Autoload that will work.\r\n\r\nFor some reason the Autoloader instance used by the FileLocator is not the same as when the system starts.\r\n\r\nInvestigating..."}}
{"actor":{"display_login":"natanfelles"}}