{"action":"created","issue":{"url":"https://api.github.com/repos/Valloric/YouCompleteMe/issues/1728","labels_url":"https://api.github.com/repos/Valloric/YouCompleteMe/issues/1728/labels{/name}","comments_url":"https://api.github.com/repos/Valloric/YouCompleteMe/issues/1728/comments","events_url":"https://api.github.com/repos/Valloric/YouCompleteMe/issues/1728/events","html_url":"https://github.com/Valloric/YouCompleteMe/issues/1728","id":111057049,"number":1728,"title":"YCM freezes when using PHP method chaining in conjunction with closures","user":{"login":"JohnMaguire","id":440033,"avatar_url":"https://avatars.githubusercontent.com/u/440033?v=3","gravatar_id":"","url":"https://api.github.com/users/JohnMaguire","html_url":"https://github.com/JohnMaguire","followers_url":"https://api.github.com/users/JohnMaguire/followers","following_url":"https://api.github.com/users/JohnMaguire/following{/other_user}","gists_url":"https://api.github.com/users/JohnMaguire/gists{/gist_id}","starred_url":"https://api.github.com/users/JohnMaguire/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JohnMaguire/subscriptions","organizations_url":"https://api.github.com/users/JohnMaguire/orgs","repos_url":"https://api.github.com/users/JohnMaguire/repos","events_url":"https://api.github.com/users/JohnMaguire/events{/privacy}","received_events_url":"https://api.github.com/users/JohnMaguire/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-10-12T21:09:55Z","updated_at":"2015-10-12T22:12:03Z","closed_at":null,"body":"Proof of concept:\r\n\r\n```\r\n<?php\r\n\r\nclass Foobar {\r\n    public function hello($var) {\r\n        echo \"Hello \";\r\n        return $this;\r\n    }\r\n\r\n    public function world() {\r\n        echo \"World\";\r\n        return $this;\r\n    }\r\n}\r\n\r\n$o = new Foobar();\r\n$o->hello(function($var) use($asdf) {\r\n    echo \"closure\";\r\n})->\r\n```\r\n\r\nStart typing world at the end. As soon as you type \"w\" it will freeze.\r\n\r\nMethod chaining alone works fine (i.e. `$o->hello()->world()`), but when you pass a closure into one of the methods in the chain, YCM trips up."},"comment":{"url":"https://api.github.com/repos/Valloric/YouCompleteMe/issues/comments/147535285","html_url":"https://github.com/Valloric/YouCompleteMe/issues/1728#issuecomment-147535285","issue_url":"https://api.github.com/repos/Valloric/YouCompleteMe/issues/1728","id":147535285,"user":{"login":"JohnMaguire","id":440033,"avatar_url":"https://avatars.githubusercontent.com/u/440033?v=3","gravatar_id":"","url":"https://api.github.com/users/JohnMaguire","html_url":"https://github.com/JohnMaguire","followers_url":"https://api.github.com/users/JohnMaguire/followers","following_url":"https://api.github.com/users/JohnMaguire/following{/other_user}","gists_url":"https://api.github.com/users/JohnMaguire/gists{/gist_id}","starred_url":"https://api.github.com/users/JohnMaguire/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JohnMaguire/subscriptions","organizations_url":"https://api.github.com/users/JohnMaguire/orgs","repos_url":"https://api.github.com/users/JohnMaguire/repos","events_url":"https://api.github.com/users/JohnMaguire/events{/privacy}","received_events_url":"https://api.github.com/users/JohnMaguire/received_events","type":"User","site_admin":false},"created_at":"2015-10-12T22:12:03Z","updated_at":"2015-10-12T22:12:03Z","body":"Hopefully I understood you correctly. I ran `:let g:ycm_auto_trigger=0`, entered insert mode, put my cursor after `->` and typed `C-x C-o` (X, O). Again, vim froze."}}