Update react/stream to support 0.7.2 and future 1.x#38
Update react/stream to support 0.7.2 and future 1.x#38WyriHaximus merged 1 commit intoreactphp:masterfrom
Conversation
src/Process.php
Outdated
| $this->stdin = new WritableResourceStream($this->pipes[0], $loop); | ||
| $this->stdin->on('close', function () { | ||
| if (is_resource($this->pipes[0])) { | ||
| fclose($this->pipes[0]); |
There was a problem hiding this comment.
Currently this is needed until reactphp/stream#107 is merged and tagged
clue
left a comment
There was a problem hiding this comment.
The README probably also needs an update, otherwise LGTM 👍
src/Process.php
Outdated
| if (is_resource($that->pipes[0])) { | ||
| fclose($that->pipes[0]); | ||
| } | ||
| }); |
There was a problem hiding this comment.
I suppose this is work around for reactphp/stream#107? Does it make sense to back port this to older stream release and only target fixed versions here?
There was a problem hiding this comment.
Yes it is, made a comment on it after making the PR #38 (comment) and that makes sense 👍
There was a problem hiding this comment.
Just pushed the code removing this and going 0.7.2 and up with react/stream.
Yeah I'm working on that 👍 |
|
Ping @reactphp/core updated the readme 😎 |
README.md
Outdated
|
|
||
| Once a process is started, its I/O streams will be constructed as instances of | ||
| `React\Stream\Stream`. Before `start()` is called, these properties are `null`. | ||
| `React\Stream\ReadableResourceStream` as `React\Stream\WritableResourceStream`. Before `start()` is called, these properties are `null`. |
There was a problem hiding this comment.
as -> and
Also, should we use ReadableStreamInterface and WritableStreamInterface instead of the concrete implementations?
README.md
Outdated
| Each of these implement the underlying | ||
| [`DuplexStreamInterface`](https://github.com/reactphp/stream#duplexstreaminterface) | ||
| and you can use any of its events and methods as usual: | ||
| [`ReadableResourceStream`](https://github.com/reactphp/stream#readablestreaminterface) or [`WritableResourceStream`](https://github.com/reactphp/stream#writablestreaminterface) |
There was a problem hiding this comment.
See above comment about ReadableStreamInterface and WritableStreamInterface. If we mention the concrete implementations, we should probably also link to their docs (eg. https://github.com/reactphp/stream#readableresourcestream) instead of the interface docs.
README.md
Outdated
|
|
||
| For more details, see the | ||
| [`DuplexStreamInterface`](https://github.com/reactphp/stream#duplexstreaminterface). | ||
| [`ReadableResourceStream`](https://github.com/reactphp/stream#readablestreaminterface) and [`WritableResourceStream`](https://github.com/reactphp/stream#writablestreaminterface). |
There was a problem hiding this comment.
See above comments about ReadableStreamInterface and WritableStreamInterface.
clue
left a comment
There was a problem hiding this comment.
The README could use some line wraps and the commits should be squashed to a reasonable number, otherwise LGTM 👍
|
@clue wrapped the lines. Squashing in a moment 😎 |
PHP 5.3 fix Updated to react/stream:^0.7.2 Removed unused React\Stream\Stream import Updated readme to the updated streams As => and reactphp#38 (comment) Use interfaces instead of concrete classes in the documentation reactphp#38 (comment) Line folding
ff3828a to
4ef64e9
Compare
|
Squash commits 😎 |
Supersedes / closes #35
Implements / closes #37
Implements / closes #30