diff options
author | Remi Collet <remi@remirepo.net> | 2022-06-03 17:25:21 +0200 |
---|---|---|
committer | Remi Collet <remi@php.net> | 2022-06-03 17:25:21 +0200 |
commit | 59da31bc2824ce5613f83a5daf4c418ca1df9c1e (patch) | |
tree | c2e5c69715caa180e51ae1426bc74be7cffbff3f | |
parent | ed7aaeae81936032c995aecc481a05e8db2eea69 (diff) |
add upstream patch for PHP 8.2
-rw-r--r-- | memcached-upstream.patch | 64 | ||||
-rw-r--r-- | php-pecl-memcached.spec | 10 |
2 files changed, 73 insertions, 1 deletions
diff --git a/memcached-upstream.patch b/memcached-upstream.patch new file mode 100644 index 0000000..42c3b51 --- /dev/null +++ b/memcached-upstream.patch @@ -0,0 +1,64 @@ +From 1f22de74379208d9758ba99a9bd7373eefeb48f2 Mon Sep 17 00:00:00 2001 +From: Remi Collet <remi@remirepo.net> +Date: Mon, 28 Mar 2022 08:09:29 +0200 +Subject: [PATCH] fix #513 skip test with old and dead libmemcached + +--- + tests/memcachedserver.phpt | 1 - + tests/memcachedserver6.phpt | 3 +++ + 2 files changed, 3 insertions(+), 1 deletion(-) + +diff --git a/tests/memcachedserver.phpt b/tests/memcachedserver.phpt +index 7b058d70..407fcf97 100644 +--- a/tests/memcachedserver.phpt ++++ b/tests/memcachedserver.phpt +@@ -8,7 +8,6 @@ if (!extension_loaded("memcached")) { + if (!class_exists("MemcachedServer")) { + die("skip memcached not built with libmemcachedprotocol support\n"); + } +- + if (Memcached::LIBMEMCACHED_VERSION_HEX < 0x1001000) { + die("skip needs at least libmemcached 1.1.0\n"); + } +diff --git a/tests/memcachedserver6.phpt b/tests/memcachedserver6.phpt +index a2277b4a..3d02b244 100644 +--- a/tests/memcachedserver6.phpt ++++ b/tests/memcachedserver6.phpt +@@ -8,6 +8,9 @@ if (!extension_loaded("memcached")) { + if (!class_exists("MemcachedServer")) { + die("skip memcached not built with libmemcachedprotocol support\n"); + } ++if (Memcached::LIBMEMCACHED_VERSION_HEX < 0x1001000) { ++ die("skip needs at least libmemcached 1.1.0\n"); ++} + ?> + --FILE-- + <?php +From fc388e65e7ceab9e6d52bc77b6306f71db981873 Mon Sep 17 00:00:00 2001 +From: Remi Collet <remi@remirepo.net> +Date: Fri, 3 Jun 2022 16:56:00 +0200 +Subject: [PATCH] fix ${var} deprecation + +--- + tests/touch_binary.phpt | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/tests/touch_binary.phpt b/tests/touch_binary.phpt +index 382c1778..059ec74c 100644 +--- a/tests/touch_binary.phpt ++++ b/tests/touch_binary.phpt +@@ -28,12 +28,12 @@ function status_print ($op, $mem, $expected) + $code = $mem->getResultcode(); + + if ($code == $expected) +- echo "${op} status code as expected" . PHP_EOL; ++ echo "{$op} status code as expected" . PHP_EOL; + else { + $expected = resolve_to_constant ($expected); + $code = resolve_to_constant ($code); + +- echo "${op} status code mismatch, expected ${expected} but got ${code}" . PHP_EOL; ++ echo "{$op} status code mismatch, expected {$expected} but got {$code}" . PHP_EOL; + } + } + diff --git a/php-pecl-memcached.spec b/php-pecl-memcached.spec index d4a7425..f85a10d 100644 --- a/php-pecl-memcached.spec +++ b/php-pecl-memcached.spec @@ -40,12 +40,15 @@ Summary: Extension to work with the Memcached caching daemon Name: %{?sub_prefix}php-pecl-memcached Version: %{upstream_version}%{?upstream_prever:~%{upstream_lower}} -Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} +Release: 2%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} License: PHP URL: https://pecl.php.net/package/%{pecl_name} Source0: https://pecl.php.net/get/%{pecl_name}-%{upstream_version}%{?upstream_prever}.tgz +# upstream patch for PHP 8.2 +Patch0: %{pecl_name}-upstream.patch + BuildRequires: %{?dtsprefix}gcc BuildRequires: %{?scl_prefix}php-devel >= 7.0 BuildRequires: %{?scl_prefix}php-pear @@ -163,6 +166,8 @@ sed -e 's/role="test"/role="src"/' \ -i package.xml cd NTS +%patch0 -p1 + %if %{with fastlz} rm -r fastlz sed -e '/name=.fastlz/d' -i ../package.xml @@ -372,6 +377,9 @@ exit $ret %changelog +* Fri Jun 3 2022 Remi Collet <remi@remirepo.net> - 3.2.0-2 +- add upstream patch for PHP 8.2 + * Thu Mar 24 2022 Remi Collet <remi@remirepo.net> - 3.2.0-1 - update to 3.2.0 |