{"action":"created","issue":{"url":"https://api.github.com/repos/laravel/framework/issues/7642","labels_url":"https://api.github.com/repos/laravel/framework/issues/7642/labels{/name}","comments_url":"https://api.github.com/repos/laravel/framework/issues/7642/comments","events_url":"https://api.github.com/repos/laravel/framework/issues/7642/events","html_url":"https://github.com/laravel/framework/pull/7642","id":59220904,"number":7642,"title":"Add a check for cyclic references","user":{"login":"ibrasho","id":188776,"avatar_url":"https://avatars.githubusercontent.com/u/188776?v=3","gravatar_id":"","url":"https://api.github.com/users/ibrasho","html_url":"https://github.com/ibrasho","followers_url":"https://api.github.com/users/ibrasho/followers","following_url":"https://api.github.com/users/ibrasho/following{/other_user}","gists_url":"https://api.github.com/users/ibrasho/gists{/gist_id}","starred_url":"https://api.github.com/users/ibrasho/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ibrasho/subscriptions","organizations_url":"https://api.github.com/users/ibrasho/orgs","repos_url":"https://api.github.com/users/ibrasho/repos","events_url":"https://api.github.com/users/ibrasho/events{/privacy}","received_events_url":"https://api.github.com/users/ibrasho/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-02-27T10:54:43Z","updated_at":"2015-02-27T11:01:27Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/laravel/framework/pulls/7642","html_url":"https://github.com/laravel/framework/pull/7642","diff_url":"https://github.com/laravel/framework/pull/7642.diff","patch_url":"https://github.com/laravel/framework/pull/7642.patch"},"body":"In response to https://github.com/laravel/framework/issues/7554"},"comment":{"url":"https://api.github.com/repos/laravel/framework/issues/comments/76376857","html_url":"https://github.com/laravel/framework/pull/7642#issuecomment-76376857","issue_url":"https://api.github.com/repos/laravel/framework/issues/7642","id":76376857,"user":{"login":"ibrasho","id":188776,"avatar_url":"https://avatars.githubusercontent.com/u/188776?v=3","gravatar_id":"","url":"https://api.github.com/users/ibrasho","html_url":"https://github.com/ibrasho","followers_url":"https://api.github.com/users/ibrasho/followers","following_url":"https://api.github.com/users/ibrasho/following{/other_user}","gists_url":"https://api.github.com/users/ibrasho/gists{/gist_id}","starred_url":"https://api.github.com/users/ibrasho/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ibrasho/subscriptions","organizations_url":"https://api.github.com/users/ibrasho/orgs","repos_url":"https://api.github.com/users/ibrasho/repos","events_url":"https://api.github.com/users/ibrasho/events{/privacy}","received_events_url":"https://api.github.com/users/ibrasho/received_events","type":"User","site_admin":false},"created_at":"2015-02-27T11:01:27Z","updated_at":"2015-02-27T11:01:27Z","body":"Just to explain:\r\nThis uses the `Container::$buildStack`. Whenever it's building something, it ensures that the `$buildStack` doesn't contains the concrete class it wants to instantiate.\r\n\r\nIt'll will throw a `BindingResolutionException` withe the first class and the current class.\r\n\r\nAssume class A depends on class B which depends on class A again `A > B > A`.\r\n\r\nI don't like the error message, but basically the first class name is the root of the dependencies `A` and the second class name is where the cyclic reference occurs which is `B`."}}