From 0a9c703f19331bb32a094284343f465a60341dd1 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 13 Dec 2021 08:40:41 +0100 Subject: update to 1.0.0 drop patches merged upstream open https://github.com/improved-php-library/http-message/issues/5 version 1.0.0 missing on pecl open https://github.com/improved-php-library/http-message/issues/6 comptibility with psr 1.2.0 add patch for ext 1.2.0 from https://github.com/improved-php-library/http-message/pull/7 --- 7.patch | 65 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 7.patch (limited to '7.patch') diff --git a/7.patch b/7.patch new file mode 100644 index 0000000..dd5e4a3 --- /dev/null +++ b/7.patch @@ -0,0 +1,65 @@ +From f0cdf565fd129136ef4ee43c9e2aa9b12bb3eb8a Mon Sep 17 00:00:00 2001 +From: Remi Collet +Date: Mon, 13 Dec 2021 08:05:14 +0100 +Subject: [PATCH] fix #6 compatibility with psr 1.2.0 + +--- + tests/Factory/createUploadedFile_err01.phpt | 4 ++-- + tests/Message/body_err01.phpt | 2 +- + tests/Request/uri_err01.phpt | 2 +- + uri.c | 5 ++++- + 4 files changed, 8 insertions(+), 5 deletions(-) + +diff --git a/tests/Factory/createUploadedFile_err01.phpt b/tests/Factory/createUploadedFile_err01.phpt +index 0bc72b9..13186e1 100644 +--- a/tests/Factory/createUploadedFile_err01.phpt ++++ b/tests/Factory/createUploadedFile_err01.phpt +@@ -43,8 +43,8 @@ try { + + ?> + --EXPECTF-- +-%sttpMessage\Factory::createUploadedFile()%s Psr\Http\Message\StreamInterface, string given +-%sttpMessage\Factory::createUploadedFile()%s Psr\Http\Message\StreamInterface,%sstdClass given ++%sttpMessage\Factory::createUploadedFile()%s\Http\Message\StreamInterface, string given ++%sttpMessage\Factory::createUploadedFile()%s\Http\Message\StreamInterface,%sstdClass given + %sttpMessage\Factory::createUploadedFile()%s, array given + %sttpMessage\Factory::createUploadedFile()%sint, array given + %sttpMessage\Factory::createUploadedFile()%s, array given +diff --git a/tests/Message/body_err01.phpt b/tests/Message/body_err01.phpt +index 720ff6a..5925676 100644 +--- a/tests/Message/body_err01.phpt ++++ b/tests/Message/body_err01.phpt +@@ -19,5 +19,5 @@ try { + + ?> + --EXPECTF-- +-%sttpMessage\Message::withBody()%s Psr\Http\Message\StreamInterface, resource given ++%sttpMessage\Message::withBody()%s\Http\Message\StreamInterface, resource given + HttpMessage\Message::withBody() expects exactly 1 %s, 0 given +diff --git a/tests/Request/uri_err01.phpt b/tests/Request/uri_err01.phpt +index 8803d73..6903e8e 100644 +--- a/tests/Request/uri_err01.phpt ++++ b/tests/Request/uri_err01.phpt +@@ -19,4 +19,4 @@ try { + ?> + --EXPECTF-- + HttpMessage\Request::withUri() expects exactly 1 %s, 0 given +-%sttpMessage\Request::withUri()%sPsr\Http\Message\UriInterface, string given ++%sttpMessage\Request::withUri()%s\Http\Message\UriInterface, string given +diff --git a/uri.c b/uri.c +index 1f5b4c6..77782cf 100644 +--- a/uri.c ++++ b/uri.c +@@ -113,8 +113,11 @@ PHP_METHOD(Uri, __construct) + + + /* __toString */ +- ++#if PHP_VERSION_ID >= 80000 && PHP_PSR_VERSION_ID >= 10200 ++ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_HttpMessageUri_toString, 0, 0, IS_STRING, 0) ++#else + ZEND_BEGIN_ARG_INFO_EX(arginfo_HttpMessageUri_toString, 0, 0, 0) ++#endif + ZEND_END_ARG_INFO() + + PHP_METHOD(Uri, __toString) -- cgit