{"action":"created","issue":{"url":"https://api.github.com/repos/http-interop/http-factory/issues/4","repository_url":"https://api.github.com/repos/http-interop/http-factory","labels_url":"https://api.github.com/repos/http-interop/http-factory/issues/4/labels{/name}","comments_url":"https://api.github.com/repos/http-interop/http-factory/issues/4/comments","events_url":"https://api.github.com/repos/http-interop/http-factory/issues/4/events","html_url":"https://github.com/http-interop/http-factory/issues/4","id":171388133,"number":4,"title":"Create a separate package for additional streams","user":{"login":"shadowhand","id":38203,"avatar_url":"https://avatars.githubusercontent.com/u/38203?v=3","gravatar_id":"","url":"https://api.github.com/users/shadowhand","html_url":"https://github.com/shadowhand","followers_url":"https://api.github.com/users/shadowhand/followers","following_url":"https://api.github.com/users/shadowhand/following{/other_user}","gists_url":"https://api.github.com/users/shadowhand/gists{/gist_id}","starred_url":"https://api.github.com/users/shadowhand/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shadowhand/subscriptions","organizations_url":"https://api.github.com/users/shadowhand/orgs","repos_url":"https://api.github.com/users/shadowhand/repos","events_url":"https://api.github.com/users/shadowhand/events{/privacy}","received_events_url":"https://api.github.com/users/shadowhand/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":12,"created_at":"2016-08-16T11:44:46Z","updated_at":"2016-08-23T06:27:33Z","closed_at":null,"body":"Would it make sense to create a `http-factory-streams` package that contains additional stream types like `CallbackStream`, etc?\r\n\r\nRefs https://github.com/http-interop/http-factory/pull/1#issuecomment-239760194\r\n\r\ncc @http-interop/http-factory-contributors "},"comment":{"url":"https://api.github.com/repos/http-interop/http-factory/issues/comments/241638899","html_url":"https://github.com/http-interop/http-factory/issues/4#issuecomment-241638899","issue_url":"https://api.github.com/repos/http-interop/http-factory/issues/4","id":241638899,"user":{"login":"Nyholm","id":1275206,"avatar_url":"https://avatars.githubusercontent.com/u/1275206?v=3","gravatar_id":"","url":"https://api.github.com/users/Nyholm","html_url":"https://github.com/Nyholm","followers_url":"https://api.github.com/users/Nyholm/followers","following_url":"https://api.github.com/users/Nyholm/following{/other_user}","gists_url":"https://api.github.com/users/Nyholm/gists{/gist_id}","starred_url":"https://api.github.com/users/Nyholm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Nyholm/subscriptions","organizations_url":"https://api.github.com/users/Nyholm/orgs","repos_url":"https://api.github.com/users/Nyholm/repos","events_url":"https://api.github.com/users/Nyholm/events{/privacy}","received_events_url":"https://api.github.com/users/Nyholm/received_events","type":"User","site_admin":false},"created_at":"2016-08-23T06:27:33Z","updated_at":"2016-08-23T06:27:33Z","body":"> You're not thinking of the case where a special type of stream is introduced for special purposes - if everything is dependent on a single interface, the concept does not extend beyond anything we've defined.\r\n\r\nThere is no special type of stream. There is just one stream in PSR-7. And PSR-7 is the communities best attempt to model HTTP. \r\n\r\n> You're also not thinking about the potential to add a new stream factory to the PSR itself in the future - this would be a breaking change.\r\n\r\nThat is not a valid argument. That \"potential new stream factory\" could be in a separate interface. That would not be a breaking change. \r\n\r\n> You're also not thinking about testing - we don't want to have to mock six different factory methods for the purposes of testing a component that only uses one or two of those.\r\n\r\nOf course not, one have to respect the interface segregation principle. But I guess misunderstood my suggestion. I suggest to have one interface and method to create a stream. `StreamFactory::createStream`. When you are writing your mocks you do only have to mock one factory method.\r\n\r\n> Those are some (but not even all) of the reasons we abide by SRP in general.\r\n\r\nCan we (for the discussion) name that responsibility? Im my opinion it is \"To create a stream\". I fear over engineering. If you apply SRP everywhere and in detail you end up with classes/interfaces with only one method. \r\n\r\n> Please don't assume that we haven't thought of the implications of both approaches - it has been discussed at length already, and we settled on this.\r\n\r\nI did not know. Sorry for that. Please reference me to those discussions. "}}
{"actor":{"display_login":"Nyholm"}}