{"action":"opened","issue":{"url":"https://api.github.com/repos/thephpleague/container/issues/37","labels_url":"https://api.github.com/repos/thephpleague/container/issues/37/labels{/name}","comments_url":"https://api.github.com/repos/thephpleague/container/issues/37/comments","events_url":"https://api.github.com/repos/thephpleague/container/issues/37/events","html_url":"https://github.com/thephpleague/container/issues/37","id":63013653,"number":37,"title":"Using an alias does not properly look into the Service Providers","user":{"login":"nebulousGirl","id":1899256,"avatar_url":"https://avatars.githubusercontent.com/u/1899256?v=3","gravatar_id":"","url":"https://api.github.com/users/nebulousGirl","html_url":"https://github.com/nebulousGirl","followers_url":"https://api.github.com/users/nebulousGirl/followers","following_url":"https://api.github.com/users/nebulousGirl/following{/other_user}","gists_url":"https://api.github.com/users/nebulousGirl/gists{/gist_id}","starred_url":"https://api.github.com/users/nebulousGirl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nebulousGirl/subscriptions","organizations_url":"https://api.github.com/users/nebulousGirl/orgs","repos_url":"https://api.github.com/users/nebulousGirl/repos","events_url":"https://api.github.com/users/nebulousGirl/events{/privacy}","received_events_url":"https://api.github.com/users/nebulousGirl/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-03-19T15:17:54Z","updated_at":"2015-03-19T15:17:54Z","closed_at":null,"body":"The commented line throws an error:  **Argument 1 passed to App\\Users\\UserMapper::__construct() must be an instance of Spot\\Locator, none given**. And the second line works properly, but defeats the purpose of lazy loading.\r\n\r\n```\r\n// $container->add('App\\Authentication\\UserMapperInterface', 'App\\Users\\UserMapper');\r\n$container->add('App\\Authentication\\UserMapperInterface', $container->get('App\\Users\\UserMapper'));\r\n```\r\nThe problem seems to be with Spot\\Locator being registered in a service provider. Using the commented line, the container does not look into the providers to find the service, like it does when using the get method"}}