Closed digitalkaoz closed 8 years ago
i think we should do a separate interface for that. otherwise we a) create a BC break as existing factories would suddenly need to implement a new interface and b) not all implementations necessarily can provide a multipart stream. in factory implementations, the same factory can (and should) implement both interfaces if possible. or maybe, the MultipartStreamFactoryInterface could even extend the StreamFactoryInterface, i can't imagine a case where you only can provide multipart but not simple streams. that will make injection simpler if you need both types of streams in an application.
i think extending the current StreamFactory makes sense
want to do a pull request for this? once merged, we can start to implement that on the factories for guzzle and so on... it can go into the next minor version, its a new feature without BC break.
i can try, but dont know if i find some time this weekend...the weather is quite nice this weekend and the kids needs to go outside ;)
@dbu done #30 ;)
Closed, see comment: https://github.com/php-http/message-factory/pull/30#issuecomment-233652431
currently if i want to create a MultiPart Form Request (Form Fields + Files) i cant do this without relying on a concrete Implementation (like https://github.com/guzzle/psr7/blob/master/src/MultipartStream.php)
either the current StreamFactory can handle mixed Stream Inputs, or we need a whole new Factory