Skip to content

SecureStream should extend Stream #21

Closed

Description

@clue

PR #14 by @cboden introduced a new SecureStream class to work around an SSL buffering issue.
The workaround is only applied to affected versions, i.e. to any but the newest PHP versions.

This workaround has been shipped with the latest v0.4.2 release.
I absolutely agree that we should provide this workaround.

However, the workaround introduces a subtle BC break - something that should not happen in a minor release.

The documentation of this project states that every call to create() resolves with a Stream instance. The (undocumented) workaround changes this to return a SecureStream instead.
The SecureStream currently does not extend the Stream class.

This breaks our backwards compatibility with all packages that depend on this project that explicitly expect a Stream instance. Arguably, we should have provided an interface to depend on to begin with.

The easiest fix would be to modify the SecureStream to extend the Stream class and release a v0.4.3 tag.

An alternative would be to update the documentation and state that we only return an object that implements the DuplexStreamInterface and release a v0.5.0 tag. In that case we would have to depend on react/stream: >= 0.4.2, < 0.5.0.

Activity

  1. cboden commented on Nov 16, 2014

    @cboden
    Contributor

    👍

    Let's

    • Have SecureStream extend Stream until the next minor release.
    • Update the documentation to expect DuplexStreamInterface instead of Stream
  2. added this to the v0.4.3 milestone on Mar 20, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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