Skip to content

Use the corresponding StreamFactory in MessageFactory #19

@sagikazarmark

Description

@sagikazarmark

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:

  1. Accept a StreamFactory in the MessageFactory constructor (downside: increases complexity, also, I don't want the Guzzle message factory to use the diactoros one)
  2. Instantiate the corresponding StreamFactory in the Message factory. (downside: hard coupling)
  3. Mixture of the two: accept setter injection but fallback to a default implementation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions