diff options
-rw-r--r-- | php-react-stream-php8.patch | 34 | ||||
-rw-r--r-- | php-react-stream.spec | 12 |
2 files changed, 6 insertions, 40 deletions
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() diff --git a/php-react-stream.spec b/php-react-stream.spec index 26dbd64..c432883 100644 --- a/php-react-stream.spec +++ b/php-react-stream.spec @@ -12,8 +12,8 @@ %global github_owner reactphp %global github_name stream -%global github_version 1.1.1 -%global github_commit 7c02b510ee3f582c810aeccd3a197b9c2f52ff1a +%global github_version 1.2.0 +%global github_commit 7a423506ee1903e89f1e08ec5f0ed430ff784ae9 %global composer_vendor react %global composer_project stream @@ -44,7 +44,7 @@ Name: php-%{composer_vendor}-%{composer_project} Version: %{github_version} -Release: 5%{?github_release}%{?dist} +Release: 1%{?github_release}%{?dist} Summary: Basic readable and writable stream interfaces that support piping License: MIT @@ -55,8 +55,6 @@ URL: https://reactphp.org/stream/ Source0: %{name}-%{github_version}-%{github_commit}.tar.gz Source1: %{name}-get-source.sh -Patch0: %{name}-php8.patch - BuildArch: noarch # Tests %if %{with_tests} @@ -118,7 +116,6 @@ Autoloader: %{phpdir}/React/Stream/autoload.php %prep %setup -qn %{github_name}-%{github_commit} -%patch0 -p1 %build @@ -186,6 +183,9 @@ exit $RETURN_CODE %changelog +* Mon Jul 12 2021 Remi Collet <remi@remirepo.net> - 1.2.0-1 +- update to 1.2.0 + * Wed Apr 7 2021 Remi Collet <remi@remirepo.net> - 1.1.1-5 - fix FTBFS with PHP 8 |