You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently code is duplicated in Message and Stream factories. Thanks to @mekras we now have Stream factories which we can use to create streams.
Few solutions in my mind:
Accept a StreamFactory in the MessageFactory constructor (downside: increases complexity, also, I don't want the Guzzle message factory to use the diactoros one)
Instantiate the corresponding StreamFactory in the Message factory. (downside: hard coupling)
Mixture of the two: accept setter injection but fallback to a default implementation.