summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--0001-ignore-deprecated.patch33
-rw-r--r--0001-return-string-in-output-handler.patch31
-rw-r--r--php-pecl-http.spec10
3 files changed, 38 insertions, 36 deletions
diff --git a/0001-ignore-deprecated.patch b/0001-ignore-deprecated.patch
deleted file mode 100644
index 5f3b5d5..0000000
--- a/0001-ignore-deprecated.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From fd752f8aab924b4edf834e57fdcbe34375b2e975 Mon Sep 17 00:00:00 2001
-From: Remi Collet <remi@remirepo.net>
-Date: Tue, 8 Jul 2025 15:27:59 +0200
-Subject: [PATCH] ignore deprecated
-
----
- tests/skipif.inc | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/tests/skipif.inc b/tests/skipif.inc
-index 76c3bd7..53a2753 100644
---- a/tests/skipif.inc
-+++ b/tests/skipif.inc
-@@ -8,14 +8,14 @@ function _ext($ext) {
- }
-
- function utf8locale() {
-- $locale = setlocale(LC_CTYPE, null);
-+ $locale = @setlocale(LC_CTYPE, null);
- if (stristr($locale, "utf") && substr($locale, -1) === "8") {
- return true;
- }
- if (stristr(setlocale(LC_CTYPE, "C.UTF-8"), "utf")) {
- return true;
- }
-- $locale = setlocale(LC_CTYPE, null);
-+ $locale = @setlocale(LC_CTYPE, null);
- if (stristr($locale, "utf") && substr($locale, -1) === "8") {
- return true;
- }
---
-2.50.0
-
diff --git a/0001-return-string-in-output-handler.patch b/0001-return-string-in-output-handler.patch
new file mode 100644
index 0000000..717e603
--- /dev/null
+++ b/0001-return-string-in-output-handler.patch
@@ -0,0 +1,31 @@
+From 36201dbbe628f2bc40cb1ed6c22f4486f3468b27 Mon Sep 17 00:00:00 2001
+From: Remi Collet <remi@remirepo.net>
+Date: Fri, 18 Jul 2025 07:19:36 +0200
+Subject: [PATCH] return string in output handler
+
+Returning a non-string result from user output handler is deprecated
+
+From https://wiki.php.net/rfc/deprecations_php_8_4
+
+ A return value of true is treated like a context reset,
+ which is identical to returning an empty string.
+---
+ src/php_http_env_response.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/php_http_env_response.c b/src/php_http_env_response.c
+index 3dba5b9..b44c58d 100644
+--- a/src/php_http_env_response.c
++++ b/src/php_http_env_response.c
+@@ -1165,7 +1165,7 @@ static PHP_METHOD(HttpEnvResponse, __invoke)
+ } else {
+ php_http_message_body_append(obj->message->body, ob_str, ob_len);
+ }
+- RETURN_TRUE;
++ RETURN_EMPTY_STRING();
+ }
+ }
+
+--
+2.50.1
+
diff --git a/php-pecl-http.spec b/php-pecl-http.spec
index 468d518..2ed6b69 100644
--- a/php-pecl-http.spec
+++ b/php-pecl-http.spec
@@ -37,7 +37,7 @@
Name: %{?scl_prefix}php-pecl-http
Version: %{upstream_version}%{?upstream_prever:~%{upstream_lower}}
-Release: 4%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
+Release: 5%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
Source0: https://pecl.php.net/get/%{proj_name}-%{upstream_version}%{?upstream_prever}.tgz
Summary: Extended HTTP support
@@ -48,7 +48,7 @@ URL: https://pecl.php.net/package/pecl_http
Source1: %{proj_name}.ini
Patch0: 0001-fix-incompatible-pointer-type.patch
-Patch1: 0001-ignore-deprecated.patch
+Patch1: 0001-return-string-in-output-handler.patch
BuildRequires: make
BuildRequires: %{?dtsprefix}gcc
@@ -278,8 +278,12 @@ TEST_PHP_ARGS="-n $modules -d extension=$PWD/../NTS/modules/%{pecl_name}.so" \
%changelog
+* Fri Jul 18 2025 Remi Collet <remi@fedoraproject.org> - 4.2.6-5
+- add patch for test suite with PHP 8.5.0lapha2 from
+ https://github.com/m6w6/ext-http/pull/149
+
* Tue Jul 8 2025 Remi Collet <remi@fedoraproject.org> - 4.2.6-4
-- add patch for test suite with PHP 8.5 from
+- add patch for test suite with PHP 8.5.0alpha1 from
https://github.com/m6w6/ext-http/pull/148
* Thu Jan 23 2025 Remi Collet <remi@fedoraproject.org> - 4.2.6-3