{"action":"created","issue":{"url":"https://api.github.com/repos/phpspec/phpspec/issues/985","repository_url":"https://api.github.com/repos/phpspec/phpspec","labels_url":"https://api.github.com/repos/phpspec/phpspec/issues/985/labels{/name}","comments_url":"https://api.github.com/repos/phpspec/phpspec/issues/985/comments","events_url":"https://api.github.com/repos/phpspec/phpspec/issues/985/events","html_url":"https://github.com/phpspec/phpspec/pull/985","id":172810944,"number":985,"title":"Removed ConsoleIO dependency from *most* Generators","user":{"login":"guiwoda","id":1625545,"avatar_url":"https://avatars.githubusercontent.com/u/1625545?v=3","gravatar_id":"","url":"https://api.github.com/users/guiwoda","html_url":"https://github.com/guiwoda","followers_url":"https://api.github.com/users/guiwoda/followers","following_url":"https://api.github.com/users/guiwoda/following{/other_user}","gists_url":"https://api.github.com/users/guiwoda/gists{/gist_id}","starred_url":"https://api.github.com/users/guiwoda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guiwoda/subscriptions","organizations_url":"https://api.github.com/users/guiwoda/orgs","repos_url":"https://api.github.com/users/guiwoda/repos","events_url":"https://api.github.com/users/guiwoda/events{/privacy}","received_events_url":"https://api.github.com/users/guiwoda/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-08-23T21:26:09Z","updated_at":"2016-08-25T08:29:34Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/phpspec/phpspec/pulls/985","html_url":"https://github.com/phpspec/phpspec/pull/985","diff_url":"https://github.com/phpspec/phpspec/pull/985.diff","patch_url":"https://github.com/phpspec/phpspec/pull/985.patch"},"body":"Generators could report back to the caller instead of writing directly to output, so now the `generate` method returns the string that used to be written directly.\r\n\r\nOutput used to be void, so there shouldn't be any risk of BC.\r\nI think I've been thorough with usage lookup, but let me know if there's any other case I can cover.\r\n\r\nThe PromptingGenerators are pretty much impossible to decouple. I would consider switching out `ConsoleIO` for `IO` instead, that way those classes can be used with a simple `NullIO` object in non-console scenarios."},"comment":{"url":"https://api.github.com/repos/phpspec/phpspec/issues/comments/242315765","html_url":"https://github.com/phpspec/phpspec/pull/985#issuecomment-242315765","issue_url":"https://api.github.com/repos/phpspec/phpspec/issues/985","id":242315765,"user":{"login":"stof","id":439401,"avatar_url":"https://avatars.githubusercontent.com/u/439401?v=3","gravatar_id":"","url":"https://api.github.com/users/stof","html_url":"https://github.com/stof","followers_url":"https://api.github.com/users/stof/followers","following_url":"https://api.github.com/users/stof/following{/other_user}","gists_url":"https://api.github.com/users/stof/gists{/gist_id}","starred_url":"https://api.github.com/users/stof/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stof/subscriptions","organizations_url":"https://api.github.com/users/stof/orgs","repos_url":"https://api.github.com/users/stof/repos","events_url":"https://api.github.com/users/stof/events{/privacy}","received_events_url":"https://api.github.com/users/stof/received_events","type":"User","site_admin":false},"created_at":"2016-08-25T08:29:33Z","updated_at":"2016-08-25T08:29:33Z","body":"@ciaranmcnulty simple echo statements are a bad idea IMO. If someone wants to write a UI running phpspec in the background (I know someone did it for Behat in the past for instance, so this is not an insane idea), being able to pass a different implementation of OutputInterface (for instance the Symfony BufferOutput) is an easy way to collect the output. If you switch to echo, it becomes much more painful (especially if part of the output uses echo and the other one uses the Symfony OutputInterface, as you would still be forced to use the OutputInterface doing echo as well, to keep the output in the right order)"}}
{"actor":{"display_login":"stof"}}