-
-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[RFC] Remove "end" event #21
Conversation
@@ -26,9 +26,9 @@ public static function pipe(ReadableStreamInterface $source, WritableStreamInter | |||
$source->resume(); | |||
}); | |||
|
|||
$end = isset($options['end']) ? $options['end'] : true; | |||
$end = isset($options['close']) ? $options['close'] : true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure about the API and its implications here, so I'm just putting this out here for now.
+1
|
Also flagged this for v0.5 as it's technically an API break. One scenario I thought of is that since |
Exactly my point, looks like a half-baked feature which never quite made it. After looking up Node.js's documentation I stumbled upon this:
A related blog post related to the stream2 API also includes this:
As such, afaict it looks like the If this is indeed the only use case, I'd suggest removing the |
To be clear: I'm currently 👎 on getting this in, I'm merely hoping to spark some discussion. IMHO we should look into #27 instead. In this case we could probably make proper use of the |
See #59 instead. |
This PR is a RFC – any input is welcome.
Whenever we reach EOF for a stream, we invoke the
end()
method. This will always emit an "end" and a "close" event.This PR aims to serve as a discussion basis whether it actually makes sense to keep both.