From 3ddc130b973884e89ed350c55898f5fdaabdc254 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 12 Jul 2021 08:08:50 +0200 Subject: update to 1.2.0 --- php-react-stream-php8.patch | 34 ---------------------------------- 1 file changed, 34 deletions(-) delete mode 100644 php-react-stream-php8.patch (limited to 'php-react-stream-php8.patch') diff --git a/php-react-stream-php8.patch b/php-react-stream-php8.patch deleted file mode 100644 index b973488..0000000 --- a/php-react-stream-php8.patch +++ /dev/null @@ -1,34 +0,0 @@ -diff -up ./src/WritableResourceStream.php.php8 ./src/WritableResourceStream.php ---- ./src/WritableResourceStream.php.php8 2021-04-07 16:22:09.048553209 +0200 -+++ ./src/WritableResourceStream.php 2021-04-07 16:22:14.797526978 +0200 -@@ -117,10 +117,15 @@ final class WritableResourceStream exten - $error = $errstr; - }); - -- if ($this->writeChunkSize === -1) { -- $sent = \fwrite($this->stream, $this->data); -+ if (is_resource($this->stream)) { -+ if ($this->writeChunkSize === -1) { -+ $sent = \fwrite($this->stream, $this->data); -+ } else { -+ $sent = \fwrite($this->stream, $this->data, $this->writeChunkSize); -+ } - } else { -- $sent = \fwrite($this->stream, $this->data, $this->writeChunkSize); -+ $sent = 0; -+ $error = 'this is not a valid stream resource'; - } - - \restore_error_handler(); -diff -up ./tests/WritableStreamResourceTest.php.php8 ./tests/WritableStreamResourceTest.php ---- ./tests/WritableStreamResourceTest.php.php8 2021-04-07 16:18:25.234574523 +0200 -+++ ./tests/WritableStreamResourceTest.php 2021-04-07 16:18:44.985484393 +0200 -@@ -508,7 +508,7 @@ class WritableResourceStreamTest extends - $buffer->handleWrite(); - - $this->assertInstanceOf('Exception', $error); -- $this->assertSame('Unable to write to stream: fwrite(): send of 3 bytes failed with errno=32 Broken pipe', $error->getMessage()); -+ $this->assertEqualsIgnoringCase('Unable to write to stream: fwrite(): send of 3 bytes failed with errno=32 Broken pipe', $error->getMessage()); - } - - private function createWriteableLoopMock() -- cgit