summaryrefslogtreecommitdiffstats
path: root/7.patch
diff options
context:
space:
mode:
Diffstat (limited to '7.patch')
-rw-r--r--7.patch65
1 files changed, 65 insertions, 0 deletions
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 <remi@remirepo.net>
+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)