diff options
| author | Remi Collet <remi@remirepo.net> | 2026-07-16 07:27:30 +0200 |
|---|---|---|
| committer | Remi Collet <remi@php.net> | 2026-07-16 07:27:30 +0200 |
| commit | 54ade05cb27510ba6f2a5e82910e236b459832e2 (patch) | |
| tree | c2af30254401a9135bc0b7fdb091b475dc337464 /php86.patch | |
| parent | a565dbb56b32a0e9b177d49f0963705a3cef2f1f (diff) | |
Diffstat (limited to 'php86.patch')
| -rw-r--r-- | php86.patch | 128 |
1 files changed, 128 insertions, 0 deletions
diff --git a/php86.patch b/php86.patch new file mode 100644 index 0000000..6b86de1 --- /dev/null +++ b/php86.patch @@ -0,0 +1,128 @@ +From 8ba604b2a97d8433d0b5691f92dc022adf229725 Mon Sep 17 00:00:00 2001 +From: Remi Collet <remi@remirepo.net> +Date: Fri, 26 Jun 2026 08:14:44 +0200 +Subject: [PATCH 1/3] zval_dtor remomved in 8.6 + +--- + rpminfo.c | 2 +- + tests/008-rpmdbsearch.phpt | 4 +++- + 2 files changed, 4 insertions(+), 2 deletions(-) + +diff --git a/rpminfo.c b/rpminfo.c +index ee6e0c6..c90be1e 100644 +--- a/rpminfo.c ++++ b/rpminfo.c +@@ -234,7 +234,7 @@ PHP_FUNCTION(rpminfo) + } + if (error) { + ZVAL_DEREF(error); +- zval_dtor(error); ++ zval_ptr_dtor_nogc(error); + ZVAL_NULL(error); + } + if (php_check_open_basedir(path)) { +diff --git a/tests/008-rpmdbsearch.phpt b/tests/008-rpmdbsearch.phpt +index 6e0e402..2bd04f1 100644 +--- a/tests/008-rpmdbsearch.phpt ++++ b/tests/008-rpmdbsearch.phpt +@@ -2,7 +2,9 @@ + Check for rpmdbinfo function + --SKIPIF-- + <?php +-if (!extension_loaded("rpminfo")) print "skip"; ++if (!extension_loaded("rpminfo")) dir('skip extension missing'); ++$a = rpmdbsearch(PHP_BINARY, RPMTAG_INSTFILENAMES); ++if (is_null($a)) die('skip PHP installed from sources'); + ?> + + --FILE-- +-- +2.55.0 + +From 4f2744656cad572fe8ebe91cb0dc13b03069e569 Mon Sep 17 00:00:00 2001 +From: Remi Collet <remi@remirepo.net> +Date: Fri, 26 Jun 2026 09:34:58 +0200 +Subject: [PATCH 2/3] simplify previous + +--- + rpminfo.c | 6 ++---- + tests/006-rpminfo-errors.phpt | 1 + + 2 files changed, 3 insertions(+), 4 deletions(-) + +diff --git a/rpminfo.c b/rpminfo.c +index c90be1e..1183ff5 100644 +--- a/rpminfo.c ++++ b/rpminfo.c +@@ -233,9 +233,7 @@ PHP_FUNCTION(rpminfo) + RETURN_THROWS(); + } + if (error) { +- ZVAL_DEREF(error); +- zval_ptr_dtor_nogc(error); +- ZVAL_NULL(error); ++ ZEND_TRY_ASSIGN_REF_NULL(error); + } + if (php_check_open_basedir(path)) { + RETURN_NULL(); +@@ -268,7 +266,7 @@ PHP_FUNCTION(rpminfo) + } + if (e_len) { + if (error) { +- ZVAL_STRINGL(error, e_msg, e_len); ++ ZEND_TRY_ASSIGN_REF_STRINGL(error, e_msg, e_len); + } else { + php_error_docref(NULL, E_WARNING, "%s", e_msg); + } +diff --git a/tests/006-rpminfo-errors.phpt b/tests/006-rpminfo-errors.phpt +index 5d205d7..007ed5c 100644 +--- a/tests/006-rpminfo-errors.phpt ++++ b/tests/006-rpminfo-errors.phpt +@@ -9,6 +9,7 @@ var_dump(rpminfo(__DIR__ . "/missing.rpm")); + var_dump(rpminfo(__FILE__)); + + echo "\n+ PHP Warnings\n"; ++$error='xxx'; + var_dump(rpminfo(__DIR__ . "/missing.rpm", true, $error), + $error); + var_dump(rpminfo(__FILE__, false, $error), +-- +2.55.0 + +From 12e2cba1a2c33e3d709c6e1a4246ba236670c77f Mon Sep 17 00:00:00 2001 +From: Remi Collet <remi@remirepo.net> +Date: Fri, 26 Jun 2026 09:44:23 +0200 +Subject: [PATCH 3/3] improve rpminfo errors test + +--- + tests/006-rpminfo-errors.phpt | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/tests/006-rpminfo-errors.phpt b/tests/006-rpminfo-errors.phpt +index 007ed5c..bf3a5f6 100644 +--- a/tests/006-rpminfo-errors.phpt ++++ b/tests/006-rpminfo-errors.phpt +@@ -7,8 +7,9 @@ Check for rpminfo function errors + echo "+ PHP Warnings\n"; + var_dump(rpminfo(__DIR__ . "/missing.rpm")); + var_dump(rpminfo(__FILE__)); ++var_dump(is_array(rpminfo(__DIR__ . "/bidon.rpm"))); + +-echo "\n+ PHP Warnings\n"; ++echo "\n+ Error returned\n"; + $error='xxx'; + var_dump(rpminfo(__DIR__ . "/missing.rpm", true, $error), + $error); +@@ -26,8 +27,9 @@ NULL + + Warning: rpminfo(): Can't read '%s/tests/006-rpminfo-errors.php': Argument is not a RPM file in %s on line %d + NULL ++bool(true) + +-+ PHP Warnings +++ Error returned + NULL + string(%d) "Can't open '%s/tests/missing.rpm': No such file or directory" + NULL +-- +2.55.0 + |
