summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2021-06-10 14:39:58 +0200
committerRemi Collet <remi@remirepo.net>2021-06-10 14:39:58 +0200
commit647a092db1580ff04cacd857f0a2e2fbed1f5758 (patch)
treef22009bdc119a38940faf3f7431b202e86035125
parentb1d1f0b1bd564c2cddf87c30bf4cbd3cb66fd357 (diff)
add patch for PHP 8.1 fromHEADmaster
https://github.com/websupport-sk/pecl-memcache/pull/88
-rw-r--r--memcache-php81.patch25
-rw-r--r--php-pecl-memcache.spec18
2 files changed, 38 insertions, 5 deletions
diff --git a/memcache-php81.patch b/memcache-php81.patch
new file mode 100644
index 0000000..5dbd7dc
--- /dev/null
+++ b/memcache-php81.patch
@@ -0,0 +1,25 @@
+From d20c716286034a0d21cd5505a046351aceea4cbc Mon Sep 17 00:00:00 2001
+From: Remi Collet <remi@remirepo.net>
+Date: Thu, 10 Jun 2021 14:21:03 +0200
+Subject: [PATCH] Fix Deprecated: memcache_connect(): Passing null to
+ parameter #2...
+
+---
+ src/memcache.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/src/memcache.c b/src/memcache.c
+index 3048819..2cb675b 100644
+--- a/src/memcache.c
++++ b/src/memcache.c
+@@ -1319,8 +1319,9 @@ static void php_mmc_connect(INTERNAL_FUNCTION_PARAMETERS, zend_bool persistent)
+ size_t host_len;
+ zend_long tcp_port = MEMCACHE_G(default_port);
+ double timeout = MMC_DEFAULT_TIMEOUT;
++ zend_bool null_port;
+
+- if (zend_parse_parameters(ZEND_NUM_ARGS(), "s|ld", &host, &host_len, &tcp_port, &timeout) == FAILURE) {
++ if (zend_parse_parameters(ZEND_NUM_ARGS(), "s|l!d", &host, &host_len, &tcp_port, &null_port, &timeout) == FAILURE) {
+ return;
+ }
+
diff --git a/php-pecl-memcache.spec b/php-pecl-memcache.spec
index 7c38c19..57cad3c 100644
--- a/php-pecl-memcache.spec
+++ b/php-pecl-memcache.spec
@@ -1,6 +1,6 @@
# spec file for php-pecl-memcache
#
-# Copyright (c) 2007-2020 Remi Collet
+# Copyright (c) 2007-2021 Remi Collet
# License: CC-BY-SA
# http://creativecommons.org/licenses/by-sa/4.0/
#
@@ -21,11 +21,14 @@
Summary: Extension to work with the Memcached caching daemon
Name: %{?scl_prefix}php-pecl-memcache
Version: 8.0
-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;')}}
Source0: https://pecl.php.net/get/%{pecl_name}-%{version}%{?prever}.tgz
License: PHP
URL: https://pecl.php.net/package/%{pecl_name}
+Patch0: %{pecl_name}-php81.patch
+
+BuildRequires: make
BuildRequires: %{?dtsprefix}gcc
BuildRequires: %{?scl_prefix}php-devel >= 8.0
BuildRequires: %{?scl_prefix}php-pear
@@ -65,11 +68,10 @@ Obsoletes: php72u-pecl-%{pecl_name} <= %{version}
Obsoletes: php72w-pecl-%{pecl_name} <= %{version}
Obsoletes: php73-pecl-%{pecl_name} <= %{version}
Obsoletes: php73w-pecl-%{pecl_name} <= %{version}
-%if "%{php_version}" > "7.4"
Obsoletes: php74-pecl-%{pecl_name} <= %{version}
-%endif
-%if "%{php_version}" > "8.0"
Obsoletes: php80-pecl-%{pecl_name} <= %{version}
+%if "%{php_version}" > "8.1"
+Obsoletes: php81-pecl-%{pecl_name} <= %{version}
%endif
%endif
@@ -97,6 +99,8 @@ sed -e 's/role="test"/role="src"/' \
-i package.xml
pushd NTS
+%patch0 -p1
+
sed -e '/PHP_MEMCACHE_VERSION/s/4.0.5.2/%{version}/' -i src/php_memcache.h
# Check version as upstream often forget to update this
@@ -279,6 +283,10 @@ fi
%changelog
+* Thu Jun 10 2021 Remi Collet <remi@remirepo.net> - 8.0-2
+- add patch for PHP 8.1 from
+ https://github.com/websupport-sk/pecl-memcache/pull/88
+
* Mon Dec 7 2020 Remi Collet <remi@remirepo.net> - 8.0-1
- update to 8.0
- raise dependency on PHP 8.0