{"action":"created","issue":{"url":"https://api.github.com/repos/thephpleague/container/issues/15","labels_url":"https://api.github.com/repos/thephpleague/container/issues/15/labels{/name}","comments_url":"https://api.github.com/repos/thephpleague/container/issues/15/comments","events_url":"https://api.github.com/repos/thephpleague/container/issues/15/events","html_url":"https://github.com/thephpleague/container/issues/15","id":55353564,"number":15,"title":"Recursive dependencies","user":{"login":"sagikazarmark","id":1226384,"avatar_url":"https://avatars.githubusercontent.com/u/1226384?v=3","gravatar_id":"","url":"https://api.github.com/users/sagikazarmark","html_url":"https://github.com/sagikazarmark","followers_url":"https://api.github.com/users/sagikazarmark/followers","following_url":"https://api.github.com/users/sagikazarmark/following{/other_user}","gists_url":"https://api.github.com/users/sagikazarmark/gists{/gist_id}","starred_url":"https://api.github.com/users/sagikazarmark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sagikazarmark/subscriptions","organizations_url":"https://api.github.com/users/sagikazarmark/orgs","repos_url":"https://api.github.com/users/sagikazarmark/repos","events_url":"https://api.github.com/users/sagikazarmark/events{/privacy}","received_events_url":"https://api.github.com/users/sagikazarmark/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-01-24T01:28:16Z","updated_at":"2015-01-24T12:03:28Z","closed_at":null,"body":"Do this package allow recursive dependencies?\r\n\r\n``` php\r\nclass Recursive \r\n{\r\n    public function __construct(Recursive $recursive) { }\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/thephpleague/container/issues/comments/71313822","html_url":"https://github.com/thephpleague/container/issues/15#issuecomment-71313822","issue_url":"https://api.github.com/repos/thephpleague/container/issues/15","id":71313822,"user":{"login":"sagikazarmark","id":1226384,"avatar_url":"https://avatars.githubusercontent.com/u/1226384?v=3","gravatar_id":"","url":"https://api.github.com/users/sagikazarmark","html_url":"https://github.com/sagikazarmark","followers_url":"https://api.github.com/users/sagikazarmark/followers","following_url":"https://api.github.com/users/sagikazarmark/following{/other_user}","gists_url":"https://api.github.com/users/sagikazarmark/gists{/gist_id}","starred_url":"https://api.github.com/users/sagikazarmark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sagikazarmark/subscriptions","organizations_url":"https://api.github.com/users/sagikazarmark/orgs","repos_url":"https://api.github.com/users/sagikazarmark/repos","events_url":"https://api.github.com/users/sagikazarmark/events{/privacy}","received_events_url":"https://api.github.com/users/sagikazarmark/received_events","type":"User","site_admin":false},"created_at":"2015-01-24T12:03:28Z","updated_at":"2015-01-24T12:03:28Z","body":"``` php\r\nprotected $buildStack = [];\r\n\r\npublic function get($alias, array $args = [])\r\n{\r\n    if (in_array($alias, $this->buildStack)) {\r\n        throw new Exception('Recursive dependency');\r\n    }\r\n\r\n    $this->buildStack[] = $alias;\r\n\r\n    // some code\r\n\r\n    array_pop($this->buildStack);\r\n\r\n    // return\r\n}\r\n```"}}