summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--461.patch25
-rw-r--r--463.patch1713
-rw-r--r--465.patch67
-rw-r--r--467.patch162
-rw-r--r--468.patch70
-rw-r--r--469.patch86
-rw-r--r--472.patch123
-rw-r--r--473.patch37
-rw-r--r--486.patch105
-rw-r--r--487.patch33
-rw-r--r--PHPINFO7
-rw-r--r--REFLECTION388
-rw-r--r--memcached-build.patch41
-rw-r--r--memcached-upstream.patch254
-rw-r--r--php-pecl-memcached.spec183
15 files changed, 660 insertions, 2634 deletions
diff --git a/461.patch b/461.patch
deleted file mode 100644
index 859907d..0000000
--- a/461.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From 1b68fe77b9674e1f1da4fa0e8706e3a35f1eda03 Mon Sep 17 00:00:00 2001
-From: Dmitriy <dims.main@gmail.com>
-Date: Fri, 2 Oct 2020 10:53:28 +0300
-Subject: [PATCH] fix php 8.0 build
-
-fci.no_separation removed on php 8.0.
-https://github.com/php/php-src/commit/302933daea77663f5759b10accd1d0231393b24c
----
- php_memcached_server.c | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/php_memcached_server.c b/php_memcached_server.c
-index 4c0080e..870209c 100644
---- a/php_memcached_server.c
-+++ b/php_memcached_server.c
-@@ -63,7 +63,9 @@ long s_invoke_php_callback (php_memc_server_cb_t *cb, zval *params, ssize_t para
- cb->fci.retval = retval;
- cb->fci.params = params;
- cb->fci.param_count = param_count;
-+#if PHP_VERSION_ID < 80000
- cb->fci.no_separation = 1;
-+#endif
-
- if (zend_call_function(&(cb->fci), &(cb->fci_cache)) == FAILURE) {
- char *buf = php_memc_printable_func(&(cb->fci), &(cb->fci_cache));
diff --git a/463.patch b/463.patch
deleted file mode 100644
index 37bb169..0000000
--- a/463.patch
+++ /dev/null
@@ -1,1713 +0,0 @@
-From e8f53777d3f578586f2a32f1b3bdcc3f53e74b39 Mon Sep 17 00:00:00 2001
-From: Remi Collet <remi@remirepo.net>
-Date: Thu, 8 Oct 2020 11:58:43 +0200
-Subject: [PATCH 1/2] generate arginfo from stub for PHP 7 and 8
-
----
- php_memcached.c | 404 +-------------------------------
- php_memcached.stub.php | 94 ++++++++
- php_memcached_arginfo.h | 411 +++++++++++++++++++++++++++++++++
- php_memcached_legacy_arginfo.h | 407 ++++++++++++++++++++++++++++++++
- tests/bad_construct.phpt | 5 +-
- tests/bad_construct_8.phpt | 34 +++
- tests/expire.phpt | 1 +
- tests/undefined_set.phpt | 10 +-
- tests/vbucket.phpt | 20 --
- tests/vbucket_error_7.phpt | 40 ++++
- tests/vbucket_error_8.phpt | 41 ++++
- 11 files changed, 1044 insertions(+), 423 deletions(-)
- create mode 100644 php_memcached.stub.php
- create mode 100644 php_memcached_arginfo.h
- create mode 100644 php_memcached_legacy_arginfo.h
- create mode 100644 tests/bad_construct_8.phpt
- create mode 100644 tests/vbucket_error_7.phpt
- create mode 100644 tests/vbucket_error_8.phpt
-
-diff --git a/php_memcached.c b/php_memcached.c
-index 5063695..147cb4a 100644
---- a/php_memcached.c
-+++ b/php_memcached.c
-@@ -1853,7 +1853,7 @@ static void php_memc_setMulti_impl(INTERNAL_FUNCTION_PARAMETERS, zend_bool by_ke
- {
- zval *entries;
- zend_string *server_key = NULL;
-- zend_long expiration = 0, ignored;
-+ zend_long expiration = 0;
- zval *value;
- zend_string *skey;
- zend_ulong num_key;
-@@ -1867,7 +1867,6 @@ static void php_memc_setMulti_impl(INTERNAL_FUNCTION_PARAMETERS, zend_bool by_ke
- Z_PARAM_ARRAY(entries)
- Z_PARAM_OPTIONAL
- Z_PARAM_LONG(expiration)
-- Z_PARAM_LONG(ignored)
- ZEND_PARSE_PARAMETERS_END();
- } else {
- /* "a|ll" */
-@@ -1875,7 +1874,6 @@ static void php_memc_setMulti_impl(INTERNAL_FUNCTION_PARAMETERS, zend_bool by_ke
- Z_PARAM_ARRAY(entries)
- Z_PARAM_OPTIONAL
- Z_PARAM_LONG(expiration)
-- Z_PARAM_LONG(ignored)
- ZEND_PARSE_PARAMETERS_END();
- }
-
-@@ -2071,7 +2069,6 @@ static void php_memc_cas_impl(INTERNAL_FUNCTION_PARAMETERS, zend_bool by_key)
- zend_string *server_key = NULL;
- zval *value;
- zend_long expiration = 0;
-- zend_long ignored;
- zend_string *payload;
- uint32_t flags = 0;
- memcached_return status;
-@@ -2086,7 +2083,6 @@ static void php_memc_cas_impl(INTERNAL_FUNCTION_PARAMETERS, zend_bool by_key)
- Z_PARAM_ZVAL(value)
- Z_PARAM_OPTIONAL
- Z_PARAM_LONG(expiration)
-- Z_PARAM_LONG(ignored)
- ZEND_PARSE_PARAMETERS_END();
- } else {
- /* "zSz|ll" */
-@@ -2096,7 +2092,6 @@ static void php_memc_cas_impl(INTERNAL_FUNCTION_PARAMETERS, zend_bool by_key)
- Z_PARAM_ZVAL(value)
- Z_PARAM_OPTIONAL
- Z_PARAM_LONG(expiration)
-- Z_PARAM_LONG(ignored)
- ZEND_PARSE_PARAMETERS_END();
- }
-
-@@ -3862,395 +3857,10 @@ PHP_METHOD(MemcachedServer, on)
-
- #endif
-
--/* {{{ methods arginfo */
--ZEND_BEGIN_ARG_INFO_EX(arginfo___construct, 0, 0, 0)
-- ZEND_ARG_INFO(0, persistent_id)
-- ZEND_ARG_INFO(0, callback)
--ZEND_END_ARG_INFO()
--
--ZEND_BEGIN_ARG_INFO(arginfo_getResultCode, 0)
--ZEND_END_ARG_INFO()
--
--ZEND_BEGIN_ARG_INFO(arginfo_getResultMessage, 0)
--ZEND_END_ARG_INFO()
--
--ZEND_BEGIN_ARG_INFO_EX(arginfo_get, 0, 0, 1)
-- ZEND_ARG_INFO(0, key)
-- ZEND_ARG_INFO(0, cache_cb)
-- ZEND_ARG_INFO(0, get_flags)
--ZEND_END_ARG_INFO()
--
--ZEND_BEGIN_ARG_INFO_EX(arginfo_getByKey, 0, 0, 2)
-- ZEND_ARG_INFO(0, server_key)
-- ZEND_ARG_INFO(0, key)
-- ZEND_ARG_INFO(0, cache_cb)
-- ZEND_ARG_INFO(0, get_flags)
--ZEND_END_ARG_INFO()
--
--ZEND_BEGIN_ARG_INFO_EX(arginfo_getMulti, 0, 0, 1)
-- ZEND_ARG_ARRAY_INFO(0, keys, 0)
-- ZEND_ARG_INFO(0, get_flags)
--ZEND_END_ARG_INFO()
--
--ZEND_BEGIN_ARG_INFO_EX(arginfo_getMultiByKey, 0, 0, 2)
-- ZEND_ARG_INFO(0, server_key)
-- ZEND_ARG_ARRAY_INFO(0, keys, 0)
-- ZEND_ARG_INFO(0, get_flags)
--ZEND_END_ARG_INFO()
--
--ZEND_BEGIN_ARG_INFO_EX(arginfo_getDelayed, 0, 0, 1)
-- ZEND_ARG_ARRAY_INFO(0, keys, 0)
-- ZEND_ARG_INFO(0, with_cas)
-- ZEND_ARG_INFO(0, value_cb)
--ZEND_END_ARG_INFO()
--
--ZEND_BEGIN_ARG_INFO_EX(arginfo_getDelayedByKey, 0, 0, 2)
-- ZEND_ARG_INFO(0, server_key)
-- ZEND_ARG_ARRAY_INFO(0, keys, 0)
-- ZEND_ARG_INFO(0, with_cas)
-- ZEND_ARG_INFO(0, value_cb)
--ZEND_END_ARG_INFO()
--
--ZEND_BEGIN_ARG_INFO(arginfo_fetch, 0)
--ZEND_END_ARG_INFO()
--
--ZEND_BEGIN_ARG_INFO(arginfo_fetchAll, 0)
--ZEND_END_ARG_INFO()
--
--ZEND_BEGIN_ARG_INFO_EX(arginfo_set, 0, 0, 2)
-- ZEND_ARG_INFO(0, key)
-- ZEND_ARG_INFO(0, value)
-- ZEND_ARG_INFO(0, expiration)
--ZEND_END_ARG_INFO()
--
--ZEND_BEGIN_ARG_INFO_EX(arginfo_setByKey, 0, 0, 3)
-- ZEND_ARG_INFO(0, server_key)
-- ZEND_ARG_INFO(0, key)
-- ZEND_ARG_INFO(0, value)
-- ZEND_ARG_INFO(0, expiration)
--ZEND_END_ARG_INFO()
--
--ZEND_BEGIN_ARG_INFO_EX(arginfo_touch, 0, 0, 2)
-- ZEND_ARG_INFO(0, key)
-- ZEND_ARG_INFO(0, expiration)
--ZEND_END_ARG_INFO()
--
--ZEND_BEGIN_ARG_INFO_EX(arginfo_touchByKey, 0, 0, 3)
-- ZEND_ARG_INFO(0, server_key)
-- ZEND_ARG_INFO(0, key)
-- ZEND_ARG_INFO(0, expiration)
--ZEND_END_ARG_INFO()
--
--ZEND_BEGIN_ARG_INFO_EX(arginfo_setMulti, 0, 0, 1)
-- ZEND_ARG_ARRAY_INFO(0, items, 0)
-- ZEND_ARG_INFO(0, expiration)
--ZEND_END_ARG_INFO()
--
--ZEND_BEGIN_ARG_INFO_EX(arginfo_setMultiByKey, 0, 0, 2)
-- ZEND_ARG_INFO(0, server_key)
-- ZEND_ARG_ARRAY_INFO(0, items, 0)
-- ZEND_ARG_INFO(0, expiration)
--ZEND_END_ARG_INFO()
--
--ZEND_BEGIN_ARG_INFO_EX(arginfo_add, 0, 0, 2)
-- ZEND_ARG_INFO(0, key)
-- ZEND_ARG_INFO(0, value)
-- ZEND_ARG_INFO(0, expiration)
--ZEND_END_ARG_INFO()
--
--ZEND_BEGIN_ARG_INFO_EX(arginfo_addByKey, 0, 0, 3)
-- ZEND_ARG_INFO(0, server_key)
-- ZEND_ARG_INFO(0, key)
-- ZEND_ARG_INFO(0, value)
-- ZEND_ARG_INFO(0, expiration)
--ZEND_END_ARG_INFO()
--
--ZEND_BEGIN_ARG_INFO_EX(arginfo_replace, 0, 0, 2)
-- ZEND_ARG_INFO(0, key)
-- ZEND_ARG_INFO(0, value)
-- ZEND_ARG_INFO(0, expiration)
--ZEND_END_ARG_INFO()
--
--ZEND_BEGIN_ARG_INFO_EX(arginfo_replaceByKey, 0, 0, 3)
-- ZEND_ARG_INFO(0, server_key)
-- ZEND_ARG_INFO(0, key)
-- ZEND_ARG_INFO(0, value)
-- ZEND_ARG_INFO(0, expiration)
--ZEND_END_ARG_INFO()
--
--ZEND_BEGIN_ARG_INFO_EX(arginfo_append, 0, 0, 2)
-- ZEND_ARG_INFO(0, key)
-- ZEND_ARG_INFO(0, value)
--ZEND_END_ARG_INFO()
--
--ZEND_BEGIN_ARG_INFO_EX(arginfo_appendByKey, 0, 0, 3)
-- ZEND_ARG_INFO(0, server_key)
-- ZEND_ARG_INFO(0, key)
-- ZEND_ARG_INFO(0, value)
--ZEND_END_ARG_INFO()
--
--ZEND_BEGIN_ARG_INFO_EX(arginfo_prepend, 0, 0, 2)
-- ZEND_ARG_INFO(0, key)
-- ZEND_ARG_INFO(0, value)
--ZEND_END_ARG_INFO()
--
--ZEND_BEGIN_ARG_INFO_EX(arginfo_prependByKey, 0, 0, 3)
-- ZEND_ARG_INFO(0, server_key)
-- ZEND_ARG_INFO(0, key)
-- ZEND_ARG_INFO(0, value)
--ZEND_END_ARG_INFO()
--
--ZEND_BEGIN_ARG_INFO_EX(arginfo_cas, 0, 0, 3)
-- ZEND_ARG_INFO(0, cas_token)
-- ZEND_ARG_INFO(0, key)
-- ZEND_ARG_INFO(0, value)
-- ZEND_ARG_INFO(0, expiration)
--ZEND_END_ARG_INFO()
--
--ZEND_BEGIN_ARG_INFO_EX(arginfo_casByKey, 0, 0, 4)
-- ZEND_ARG_INFO(0, cas_token)
-- ZEND_ARG_INFO(0, server_key)
-- ZEND_ARG_INFO(0, key)
-- ZEND_ARG_INFO(0, value)
-- ZEND_ARG_INFO(0, expiration)
--ZEND_END_ARG_INFO()
--
--ZEND_BEGIN_ARG_INFO_EX(arginfo_delete, 0, 0, 1)
-- ZEND_ARG_INFO(0, key)
-- ZEND_ARG_INFO(0, time)
--ZEND_END_ARG_INFO()
--
--ZEND_BEGIN_ARG_INFO_EX(arginfo_deleteMulti, 0, 0, 1)
-- ZEND_ARG_INFO(0, keys)
-- ZEND_ARG_INFO(0, time)
--ZEND_END_ARG_INFO()
--
--ZEND_BEGIN_ARG_INFO_EX(arginfo_deleteByKey, 0, 0, 2)
-- ZEND_ARG_INFO(0, server_key)
-- ZEND_ARG_INFO(0, key)
-- ZEND_ARG_INFO(0, time)
--ZEND_END_ARG_INFO()
--
--ZEND_BEGIN_ARG_INFO_EX(arginfo_deleteMultiByKey, 0, 0, 2)
-- ZEND_ARG_INFO(0, server_key)
-- ZEND_ARG_INFO(0, keys)
-- ZEND_ARG_INFO(0, time)
--ZEND_END_ARG_INFO()
--
--ZEND_BEGIN_ARG_INFO_EX(arginfo_increment, 0, 0, 1)
-- ZEND_ARG_INFO(0, key)
-- ZEND_ARG_INFO(0, offset)
-- ZEND_ARG_INFO(0, initial_value)
-- ZEND_ARG_INFO(0, expiry)
--ZEND_END_ARG_INFO()
--
--ZEND_BEGIN_ARG_INFO_EX(arginfo_decrement, 0, 0, 1)
-- ZEND_ARG_INFO(0, key)
-- ZEND_ARG_INFO(0, offset)
-- ZEND_ARG_INFO(0, initial_value)
-- ZEND_ARG_INFO(0, expiry)
--ZEND_END_ARG_INFO()
--
--ZEND_BEGIN_ARG_INFO_EX(arginfo_incrementByKey, 0, 0, 2)
-- ZEND_ARG_INFO(0, server_key)
-- ZEND_ARG_INFO(0, key)
-- ZEND_ARG_INFO(0, offset)
-- ZEND_ARG_INFO(0, initial_value)
-- ZEND_ARG_INFO(0, expiry)
--ZEND_END_ARG_INFO()
--
--ZEND_BEGIN_ARG_INFO_EX(arginfo_decrementByKey, 0, 0, 2)
-- ZEND_ARG_INFO(0, server_key)
-- ZEND_ARG_INFO(0, key)
-- ZEND_ARG_INFO(0, offset)
-- ZEND_ARG_INFO(0, initial_value)
-- ZEND_ARG_INFO(0, expiry)
--ZEND_END_ARG_INFO()
--
--ZEND_BEGIN_ARG_INFO_EX(arginfo_flush, 0, 0, 0)
-- ZEND_ARG_INFO(0, delay)
--ZEND_END_ARG_INFO()
--
--ZEND_BEGIN_ARG_INFO_EX(arginfo_addServer, 0, 0, 2)
-- ZEND_ARG_INFO(0, host)
-- ZEND_ARG_INFO(0, port)
-- ZEND_ARG_INFO(0, weight)
--ZEND_END_ARG_INFO()
--
--ZEND_BEGIN_ARG_INFO_EX(arginfo_getStats, 0, 0, 0)
-- ZEND_ARG_INFO(0, type)
--ZEND_END_ARG_INFO()
--
--ZEND_BEGIN_ARG_INFO(arginfo_addServers, 0)
-- ZEND_ARG_ARRAY_INFO(0, servers, 0)
--ZEND_END_ARG_INFO()
--
--ZEND_BEGIN_ARG_INFO(arginfo_getServerList, 0)
--ZEND_END_ARG_INFO()
--
--ZEND_BEGIN_ARG_INFO(arginfo_resetServerList, 0)
--ZEND_END_ARG_INFO()
--
--ZEND_BEGIN_ARG_INFO(arginfo_quit, 0)
--ZEND_END_ARG_INFO()
--
--ZEND_BEGIN_ARG_INFO(arginfo_flushBuffers, 0)
--ZEND_END_ARG_INFO()
--
--ZEND_BEGIN_ARG_INFO(arginfo_getServerByKey, 0)
-- ZEND_ARG_INFO(0, server_key)
--ZEND_END_ARG_INFO()
--
--ZEND_BEGIN_ARG_INFO(arginfo_getLastErrorMessage, 0)
--ZEND_END_ARG_INFO()
--
--ZEND_BEGIN_ARG_INFO(arginfo_getLastErrorCode, 0)
--ZEND_END_ARG_INFO()
--
--ZEND_BEGIN_ARG_INFO(arginfo_getLastErrorErrno, 0)
--ZEND_END_ARG_INFO()
--
--ZEND_BEGIN_ARG_INFO(arginfo_getLastDisconnectedServer, 0)
--ZEND_END_ARG_INFO()
--
--ZEND_BEGIN_ARG_INFO(arginfo_getOption, 0)
-- ZEND_ARG_INFO(0, option)
--ZEND_END_ARG_INFO()
--
--#ifdef HAVE_MEMCACHED_SASL
--ZEND_BEGIN_ARG_INFO(arginfo_setSaslAuthData, 0)
-- ZEND_ARG_INFO(0, username)
-- ZEND_ARG_INFO(0, password)
--ZEND_END_ARG_INFO()
--#endif
--
--#ifdef HAVE_MEMCACHED_SET_ENCODING_KEY
--ZEND_BEGIN_ARG_INFO(arginfo_setEncodingKey, 0)
-- ZEND_ARG_INFO(0, key)
--ZEND_END_ARG_INFO()
--#endif
--
--ZEND_BEGIN_ARG_INFO(arginfo_setOption, 0)
-- ZEND_ARG_INFO(0, option)
-- ZEND_ARG_INFO(0, value)
--ZEND_END_ARG_INFO()
--
--ZEND_BEGIN_ARG_INFO(arginfo_setOptions, 0)
-- ZEND_ARG_INFO(0, options)
--ZEND_END_ARG_INFO()
--
--ZEND_BEGIN_ARG_INFO(arginfo_setBucket, 3)
-- ZEND_ARG_INFO(0, host_map)
-- ZEND_ARG_INFO(0, forward_map)
-- ZEND_ARG_INFO(0, replicas)
--ZEND_END_ARG_INFO()
--
--ZEND_BEGIN_ARG_INFO(arginfo_getVersion, 0)
--ZEND_END_ARG_INFO()
--
--ZEND_BEGIN_ARG_INFO(arginfo_isPersistent, 0)
--ZEND_END_ARG_INFO()
--
--ZEND_BEGIN_ARG_INFO(arginfo_isPristine, 0)
--ZEND_END_ARG_INFO()
--
--ZEND_BEGIN_ARG_INFO(arginfo_getAllKeys, 0)
--ZEND_END_ARG_INFO()
--/* }}} */
--
--/* {{{ memcached_class_methods */
--#define MEMC_ME(name, args) PHP_ME(Memcached, name, args, ZEND_ACC_PUBLIC)
--static zend_function_entry memcached_class_methods[] = {
-- MEMC_ME(__construct, arginfo___construct)
--
-- MEMC_ME(getResultCode, arginfo_getResultCode)
-- MEMC_ME(getResultMessage, arginfo_getResultMessage)
--
-- MEMC_ME(get, arginfo_get)
-- MEMC_ME(getByKey, arginfo_getByKey)
-- MEMC_ME(getMulti, arginfo_getMulti)
-- MEMC_ME(getMultiByKey, arginfo_getMultiByKey)
-- MEMC_ME(getDelayed, arginfo_getDelayed)
-- MEMC_ME(getDelayedByKey, arginfo_getDelayedByKey)
-- MEMC_ME(fetch, arginfo_fetch)
-- MEMC_ME(fetchAll, arginfo_fetchAll)
--
-- MEMC_ME(set, arginfo_set)
-- MEMC_ME(setByKey, arginfo_setByKey)
--
-- MEMC_ME(touch, arginfo_touch)
-- MEMC_ME(touchByKey, arginfo_touchByKey)
--
-- MEMC_ME(setMulti, arginfo_setMulti)
-- MEMC_ME(setMultiByKey, arginfo_setMultiByKey)
--
-- MEMC_ME(cas, arginfo_cas)
-- MEMC_ME(casByKey, arginfo_casByKey)
-- MEMC_ME(add, arginfo_add)
-- MEMC_ME(addByKey, arginfo_addByKey)
-- MEMC_ME(append, arginfo_append)
-- MEMC_ME(appendByKey, arginfo_appendByKey)
-- MEMC_ME(prepend, arginfo_prepend)
-- MEMC_ME(prependByKey, arginfo_prependByKey)
-- MEMC_ME(replace, arginfo_replace)
-- MEMC_ME(replaceByKey, arginfo_replaceByKey)
-- MEMC_ME(delete, arginfo_delete)
-- MEMC_ME(deleteMulti, arginfo_deleteMulti)
-- MEMC_ME(deleteByKey, arginfo_deleteByKey)
-- MEMC_ME(deleteMultiByKey, arginfo_deleteMultiByKey)
--
-- MEMC_ME(increment, arginfo_increment)
-- MEMC_ME(decrement, arginfo_decrement)
-- MEMC_ME(incrementByKey, arginfo_incrementByKey)
-- MEMC_ME(decrementByKey, arginfo_decrementByKey)
--
-- MEMC_ME(addServer, arginfo_addServer)
-- MEMC_ME(addServers, arginfo_addServers)
-- MEMC_ME(getServerList, arginfo_getServerList)
-- MEMC_ME(getServerByKey, arginfo_getServerByKey)
-- MEMC_ME(resetServerList, arginfo_resetServerList)
-- MEMC_ME(quit, arginfo_quit)
-- MEMC_ME(flushBuffers, arginfo_flushBuffers)
--
-- MEMC_ME(getLastErrorMessage, arginfo_getLastErrorMessage)
-- MEMC_ME(getLastErrorCode, arginfo_getLastErrorCode)
-- MEMC_ME(getLastErrorErrno, arginfo_getLastErrorErrno)
-- MEMC_ME(getLastDisconnectedServer, arginfo_getLastDisconnectedServer)
--
-- MEMC_ME(getStats, arginfo_getStats)
-- MEMC_ME(getVersion, arginfo_getVersion)
-- MEMC_ME(getAllKeys, arginfo_getAllKeys)
--
-- MEMC_ME(flush, arginfo_flush)
--
-- MEMC_ME(getOption, arginfo_getOption)
-- MEMC_ME(setOption, arginfo_setOption)
-- MEMC_ME(setOptions, arginfo_setOptions)
-- MEMC_ME(setBucket, arginfo_setBucket)
--#ifdef HAVE_MEMCACHED_SASL
-- MEMC_ME(setSaslAuthData, arginfo_setSaslAuthData)
--#endif
--#ifdef HAVE_MEMCACHED_SET_ENCODING_KEY
-- MEMC_ME(setEncodingKey, arginfo_setEncodingKey)
--#endif
-- MEMC_ME(isPersistent, arginfo_isPersistent)
-- MEMC_ME(isPristine, arginfo_isPristine)
-- { NULL, NULL, NULL }
--};
--#undef MEMC_ME
--/* }}} */
--
--#ifdef HAVE_MEMCACHED_PROTOCOL
--/* {{{ */
--#define MEMC_SE_ME(name, args) PHP_ME(MemcachedServer, name, args, ZEND_ACC_PUBLIC)
--static
--zend_function_entry memcached_server_class_methods[] = {
-- MEMC_SE_ME(run, NULL)
-- MEMC_SE_ME(on, NULL)
-- { NULL, NULL, NULL }
--};
--#undef MEMC_SE_ME
--/* }}} */
-+#if PHP_VERSION_ID < 80000
-+#include "php_memcached_legacy_arginfo.h"
-+#else
-+#include "php_memcached_arginfo.h"
- #endif
-
- /* {{{ memcached_module_entry
-@@ -4592,7 +4202,7 @@ PHP_MINIT_FUNCTION(memcached)
-
- le_memc = zend_register_list_destructors_ex(NULL, php_memc_dtor, "Memcached persistent connection", module_number);
-
-- INIT_CLASS_ENTRY(ce, "Memcached", memcached_class_methods);
-+ INIT_CLASS_ENTRY(ce, "Memcached", class_Memcached_methods);
- memcached_ce = zend_register_internal_class(&ce);
- memcached_ce->create_object = php_memc_object_new;
-
-@@ -4602,7 +4212,7 @@ PHP_MINIT_FUNCTION(memcached)
- memcached_server_object_handlers.clone_obj = NULL;
- memcached_server_object_handlers.free_obj = php_memc_server_free_storage;
-
-- INIT_CLASS_ENTRY(ce, "MemcachedServer", memcached_server_class_methods);
-+ INIT_CLASS_ENTRY(ce, "MemcachedServer", class_MemcachedServer_methods);
- memcached_server_ce = zend_register_internal_class(&ce);
- memcached_server_ce->create_object = php_memc_server_new;
- #endif
-diff --git a/php_memcached.stub.php b/php_memcached.stub.php
-new file mode 100644
-index 0000000..4ba6d5b
---- /dev/null
-+++ b/php_memcached.stub.php
-@@ -0,0 +1,94 @@
-+<?php
-+
-+/**
-+ * @generate-function-entries
-+ * @generate-legacy-arginfo
-+ */
-+
-+
-+class Memcached {
-+
-+ public function __construct(string $persistent_id=NULL, callable $callback=NULL, string $connection_str=NULL) {}
-+
-+ public function getResultCode(): int {}
-+ public function getResultMessage(): string {}
-+
-+ public function get(string $key, callable $cache_cb=NULL, int $get_flags=0): mixed {}
-+ public function getByKey(string $server_key, string $key, callable $cache_cb=NULL, int $get_flags=0): mixed {}
-+ public function getMulti(array $keys, int $get_flags=0): false|array {}
-+ public function getMultiByKey(string $server_key, array $keys, int $get_flags=0): false|array {}
-+ public function getDelayed(array $keys, bool $with_cas=0, callable $value_cb=NULL): bool {}
-+ public function getDelayedByKey(string $server_key, array $keys, bool $with_cas=0, callable $value_cb=NULL): bool {}
-+ public function fetch(): false|array {}
-+ public function fetchAll(): false|array {}
-+
-+ public function set(string $key, mixed $value, int $expiration=0): bool {}
-+ public function setByKey(string $server_key, string $key, mixed $value, int $expiration=0): bool {}
-+
-+ public function touch(string $key, int $expiration=0): bool {}
-+ public function touchByKey(string $server_key, string $key, int $expiration=0): bool {}
-+
-+ public function setMulti(array $items, int $expiration=0): bool {}
-+ public function setMultiByKey(string $server_key, array $items, int $expiration=0): bool {}
-+
-+ public function cas(string $cas_token, string $key, mixed $value, int $expiration=0): bool {}
-+ public function casByKey(string $cas_token, string $server_key, string $key, mixed $value, int $expiration=0): bool {}
-+ public function add(string $key, mixed $value, int $expiration=0): bool {}
-+ public function addByKey(string $server_key, string $key, mixed $value, int $expiration=0): bool {}
-+ public function append(string $key, string $value): bool {}
-+ public function appendByKey(string $server_key, string $key, string $value): bool {}
-+ public function prepend(string $key, string $value): bool {}
-+ public function prependByKey(string $server_key, string $key, string $value): bool {}
-+ public function replace(string $key, mixed $value, int $expiration=0): bool {}
-+ public function replaceByKey(string $server_key, string $key, mixed $value, int $expiration=0): bool {}
-+ public function delete(string $key, int $time=0): bool {}
-+ public function deleteMulti(array $keys, int $time=0): bool {}
-+ public function deleteByKey(string $server_key, string $key, int $time=0): bool {}
-+ public function deleteMultiByKey(string $server_key, array $keys, int $time=0): bool {}
-+
-+ public function increment(string $key, int $offset=1, int $initial_value=0, int $expiry=0): false|int {}
-+ public function decrement(string $key, int $offset=1, int $initial_value=0, int $expiry=0): false|int {}
-+ public function incrementByKey(string $server_key, string $key, int $offset=1, int $initial_value=0, int $expiry=0): false|int {}
-+ public function decrementByKey(string $server_key, string $key, int $offset=1, int $initial_value=0, int $expiry=0): false|int {}
-+
-+ public function addServer(string $host, int $port, int $weight=0): bool {}
-+ public function addServers(array $servers): bool {}
-+ public function getServerList(): array {}
-+ public function getServerByKey(string $server_key): false|array {}
-+ public function resetServerList(): bool {}
-+ public function quit(): bool {}
-+ public function flushBuffers(): bool {}
-+
-+ public function getLastErrorMessage(): string {}
-+ public function getLastErrorCode(): int {}
-+ public function getLastErrorErrno(): int {}
-+ public function getLastDisconnectedServer(): false|array {}
-+
-+ public function getStats(string $type=NULL): false|array {}
-+ public function getVersion(): false|array {}
-+ public function getAllKeys(): false|array {}
-+
-+ public function flush(int $delay=0): bool {}
-+
-+ public function getOption(int $option): mixed {}
-+ public function setOption(int $option, mixed $value): bool {}
-+ public function setOptions(array $options): bool {}
-+ public function setBucket(array $host_map, array $forward_map, int $replicas): bool {}
-+#ifdef HAVE_MEMCACHED_SASL
-+ public function setSaslAuthData(string $username, string $password): bool {}
-+#endif
-+
-+#ifdef HAVE_MEMCACHED_SET_ENCODING_KEY
-+ public function setEncodingKey(string $key): bool {}
-+#endif
-+ public function isPersistent(): bool {}
-+ public function isPristine(): bool {}
-+}
-+
-+#ifdef HAVE_MEMCACHED_PROTOCOL
-+class MemcachedServer {
-+
-+ public function run(string $address): bool {}
-+ public function on(int $event, callable $callback): bool {}
-+}
-+#endif
-diff --git a/php_memcached_arginfo.h b/php_memcached_arginfo.h
-new file mode 100644
-index 0000000..6729dd3
---- /dev/null
-+++ b/php_memcached_arginfo.h
-@@ -0,0 +1,411 @@
-+/* This is a generated file, edit the .stub.php file instead.
-+ * Stub hash: a33d23c6659922e98d3704879eb4bc820e1819df */
-+
-+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Memcached___construct, 0, 0, 0)
-+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, persistent_id, IS_STRING, 0, "NULL")
-+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, callback, IS_CALLABLE, 0, "NULL")
-+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, connection_str, IS_STRING, 0, "NULL")
-+ZEND_END_ARG_INFO()
-+
-+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Memcached_getResultCode, 0, 0, IS_LONG, 0)
-+ZEND_END_ARG_INFO()
-+
-+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Memcached_getResultMessage, 0, 0, IS_STRING, 0)
-+ZEND_END_ARG_INFO()
-+
-+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Memcached_get, 0, 1, IS_MIXED, 0)
-+ ZEND_ARG_TYPE_INFO(0, key, IS_STRING, 0)
-+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, cache_cb, IS_CALLABLE, 0, "NULL")
-+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, get_flags, IS_LONG, 0, "0")
-+ZEND_END_ARG_INFO()
-+
-+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Memcached_getByKey, 0, 2, IS_MIXED, 0)
-+ ZEND_ARG_TYPE_INFO(0, server_key, IS_STRING, 0)
-+ ZEND_ARG_TYPE_INFO(0, key, IS_STRING, 0)
-+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, cache_cb, IS_CALLABLE, 0, "NULL")
-+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, get_flags, IS_LONG, 0, "0")
-+ZEND_END_ARG_INFO()
-+
-+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_class_Memcached_getMulti, 0, 1, MAY_BE_FALSE|MAY_BE_ARRAY)
-+ ZEND_ARG_TYPE_INFO(0, keys, IS_ARRAY, 0)
-+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, get_flags, IS_LONG, 0, "0")
-+ZEND_END_ARG_INFO()
-+
-+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_class_Memcached_getMultiByKey, 0, 2, MAY_BE_FALSE|MAY_BE_ARRAY)
-+ ZEND_ARG_TYPE_INFO(0, server_key, IS_STRING, 0)
-+ ZEND_ARG_TYPE_INFO(0, keys, IS_ARRAY, 0)
-+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, get_flags, IS_LONG, 0, "0")
-+ZEND_END_ARG_INFO()
-+
-+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Memcached_getDelayed, 0, 1, _IS_BOOL, 0)
-+ ZEND_ARG_TYPE_INFO(0, keys, IS_ARRAY, 0)
-+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, with_cas, _IS_BOOL, 0, "0")
-+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, value_cb, IS_CALLABLE, 0, "NULL")
-+ZEND_END_ARG_INFO()
-+
-+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Memcached_getDelayedByKey, 0, 2, _IS_BOOL, 0)
-+ ZEND_ARG_TYPE_INFO(0, server_key, IS_STRING, 0)
-+ ZEND_ARG_TYPE_INFO(0, keys, IS_ARRAY, 0)
-+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, with_cas, _IS_BOOL, 0, "0")
-+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, value_cb, IS_CALLABLE, 0, "NULL")
-+ZEND_END_ARG_INFO()
-+
-+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_class_Memcached_fetch, 0, 0, MAY_BE_FALSE|MAY_BE_ARRAY)
-+ZEND_END_ARG_INFO()
-+
-+#define arginfo_class_Memcached_fetchAll arginfo_class_Memcached_fetch
-+
-+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Memcached_set, 0, 2, _IS_BOOL, 0)
-+ ZEND_ARG_TYPE_INFO(0, key, IS_STRING, 0)
-+ ZEND_ARG_TYPE_INFO(0, value, IS_MIXED, 0)
-+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, expiration, IS_LONG, 0, "0")
-+ZEND_END_ARG_INFO()
-+
-+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Memcached_setByKey, 0, 3, _IS_BOOL, 0)
-+ ZEND_ARG_TYPE_INFO(0, server_key, IS_STRING, 0)
-+ ZEND_ARG_TYPE_INFO(0, key, IS_STRING, 0)
-+ ZEND_ARG_TYPE_INFO(0, value, IS_MIXED, 0)
-+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, expiration, IS_LONG, 0, "0")
-+ZEND_END_ARG_INFO()
-+
-+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Memcached_touch, 0, 1, _IS_BOOL, 0)
-+ ZEND_ARG_TYPE_INFO(0, key, IS_STRING, 0)
-+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, expiration, IS_LONG, 0, "0")
-+ZEND_END_ARG_INFO()
-+
-+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Memcached_touchByKey, 0, 2, _IS_BOOL, 0)
-+ ZEND_ARG_TYPE_INFO(0, server_key, IS_STRING, 0)
-+ ZEND_ARG_TYPE_INFO(0, key, IS_STRING, 0)
-+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, expiration, IS_LONG, 0, "0")
-+ZEND_END_ARG_INFO()
-+
-+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Memcached_setMulti, 0, 1, _IS_BOOL, 0)
-+ ZEND_ARG_TYPE_INFO(0, items, IS_ARRAY, 0)
-+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, expiration, IS_LONG, 0, "0")
-+ZEND_END_ARG_INFO()
-+
-+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Memcached_setMultiByKey, 0, 2, _IS_BOOL, 0)
-+ ZEND_ARG_TYPE_INFO(0, server_key, IS_STRING, 0)
-+ ZEND_ARG_TYPE_INFO(0, items, IS_ARRAY, 0)
-+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, expiration, IS_LONG, 0, "0")
-+ZEND_END_ARG_INFO()
-+
-+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Memcached_cas, 0, 3, _IS_BOOL, 0)
-+ ZEND_ARG_TYPE_INFO(0, cas_token, IS_STRING, 0)
-+ ZEND_ARG_TYPE_INFO(0, key, IS_STRING, 0)
-+ ZEND_ARG_TYPE_INFO(0, value, IS_MIXED, 0)
-+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, expiration, IS_LONG, 0, "0")
-+ZEND_END_ARG_INFO()
-+
-+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Memcached_casByKey, 0, 4, _IS_BOOL, 0)
-+ ZEND_ARG_TYPE_INFO(0, cas_token, IS_STRING, 0)
-+ ZEND_ARG_TYPE_INFO(0, server_key, IS_STRING, 0)
-+ ZEND_ARG_TYPE_INFO(0, key, IS_STRING, 0)
-+ ZEND_ARG_TYPE_INFO(0, value, IS_MIXED, 0)
-+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, expiration, IS_LONG, 0, "0")
-+ZEND_END_ARG_INFO()
-+
-+#define arginfo_class_Memcached_add arginfo_class_Memcached_set
-+
-+#define arginfo_class_Memcached_addByKey arginfo_class_Memcached_setByKey
-+
-+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Memcached_append, 0, 2, _IS_BOOL, 0)
-+ ZEND_ARG_TYPE_INFO(0, key, IS_STRING, 0)
-+ ZEND_ARG_TYPE_INFO(0, value, IS_STRING, 0)
-+ZEND_END_ARG_INFO()
-+
-+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Memcached_appendByKey, 0, 3, _IS_BOOL, 0)
-+ ZEND_ARG_TYPE_INFO(0, server_key, IS_STRING, 0)
-+ ZEND_ARG_TYPE_INFO(0, key, IS_STRING, 0)
-+ ZEND_ARG_TYPE_INFO(0, value, IS_STRING, 0)
-+ZEND_END_ARG_INFO()
-+
-+#define arginfo_class_Memcached_prepend arginfo_class_Memcached_append
-+
-+#define arginfo_class_Memcached_prependByKey arginfo_class_Memcached_appendByKey
-+
-+#define arginfo_class_Memcached_replace arginfo_class_Memcached_set
-+
-+#define arginfo_class_Memcached_replaceByKey arginfo_class_Memcached_setByKey
-+
-+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Memcached_delete, 0, 1, _IS_BOOL, 0)
-+ ZEND_ARG_TYPE_INFO(0, key, IS_STRING, 0)
-+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, time, IS_LONG, 0, "0")
-+ZEND_END_ARG_INFO()
-+
-+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Memcached_deleteMulti, 0, 1, _IS_BOOL, 0)
-+ ZEND_ARG_TYPE_INFO(0, keys, IS_ARRAY, 0)
-+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, time, IS_LONG, 0, "0")
-+ZEND_END_ARG_INFO()
-+
-+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Memcached_deleteByKey, 0, 2, _IS_BOOL, 0)
-+ ZEND_ARG_TYPE_INFO(0, server_key, IS_STRING, 0)
-+ ZEND_ARG_TYPE_INFO(0, key, IS_STRING, 0)
-+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, time, IS_LONG, 0, "0")
-+ZEND_END_ARG_INFO()
-+
-+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Memcached_deleteMultiByKey, 0, 2, _IS_BOOL, 0)
-+ ZEND_ARG_TYPE_INFO(0, server_key, IS_STRING, 0)
-+ ZEND_ARG_TYPE_INFO(0, keys, IS_ARRAY, 0)
-+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, time, IS_LONG, 0, "0")
-+ZEND_END_ARG_INFO()
-+
-+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_class_Memcached_increment, 0, 1, MAY_BE_FALSE|MAY_BE_LONG)
-+ ZEND_ARG_TYPE_INFO(0, key, IS_STRING, 0)
-+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, offset, IS_LONG, 0, "1")
-+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, initial_value, IS_LONG, 0, "0")
-+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, expiry, IS_LONG, 0, "0")
-+ZEND_END_ARG_INFO()
-+
-+#define arginfo_class_Memcached_decrement arginfo_class_Memcached_increment
-+
-+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_class_Memcached_incrementByKey, 0, 2, MAY_BE_FALSE|MAY_BE_LONG)
-+ ZEND_ARG_TYPE_INFO(0, server_key, IS_STRING, 0)
-+ ZEND_ARG_TYPE_INFO(0, key, IS_STRING, 0)
-+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, offset, IS_LONG, 0, "1")
-+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, initial_value, IS_LONG, 0, "0")
-+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, expiry, IS_LONG, 0, "0")
-+ZEND_END_ARG_INFO()
-+
-+#define arginfo_class_Memcached_decrementByKey arginfo_class_Memcached_incrementByKey
-+
-+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Memcached_addServer, 0, 2, _IS_BOOL, 0)
-+ ZEND_ARG_TYPE_INFO(0, host, IS_STRING, 0)
-+ ZEND_ARG_TYPE_INFO(0, port, IS_LONG, 0)
-+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, weight, IS_LONG, 0, "0")
-+ZEND_END_ARG_INFO()
-+
-+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Memcached_addServers, 0, 1, _IS_BOOL, 0)
-+ ZEND_ARG_TYPE_INFO(0, servers, IS_ARRAY, 0)
-+ZEND_END_ARG_INFO()
-+
-+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Memcached_getServerList, 0, 0, IS_ARRAY, 0)
-+ZEND_END_ARG_INFO()
-+
-+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_class_Memcached_getServerByKey, 0, 1, MAY_BE_FALSE|MAY_BE_ARRAY)
-+ ZEND_ARG_TYPE_INFO(0, server_key, IS_STRING, 0)
-+ZEND_END_ARG_INFO()
-+
-+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Memcached_resetServerList, 0, 0, _IS_BOOL, 0)
-+ZEND_END_ARG_INFO()
-+
-+#define arginfo_class_Memcached_quit arginfo_class_Memcached_resetServerList
-+
-+#define arginfo_class_Memcached_flushBuffers arginfo_class_Memcached_resetServerList
-+
-+#define arginfo_class_Memcached_getLastErrorMessage arginfo_class_Memcached_getResultMessage
-+
-+#define arginfo_class_Memcached_getLastErrorCode arginfo_class_Memcached_getResultCode
-+
-+#define arginfo_class_Memcached_getLastErrorErrno arginfo_class_Memcached_getResultCode
-+
-+#define arginfo_class_Memcached_getLastDisconnectedServer arginfo_class_Memcached_fetch
-+
-+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_class_Memcached_getStats, 0, 0, MAY_BE_FALSE|MAY_BE_ARRAY)
-+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, type, IS_STRING, 0, "NULL")
-+ZEND_END_ARG_INFO()
-+
-+#define arginfo_class_Memcached_getVersion arginfo_class_Memcached_fetch
-+
-+#define arginfo_class_Memcached_getAllKeys arginfo_class_Memcached_fetch
-+
-+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Memcached_flush, 0, 0, _IS_BOOL, 0)
-+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, delay, IS_LONG, 0, "0")
-+ZEND_END_ARG_INFO()
-+
-+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Memcached_getOption, 0, 1, IS_MIXED, 0)
-+ ZEND_ARG_TYPE_INFO(0, option, IS_LONG, 0)
-+ZEND_END_ARG_INFO()
-+
-+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Memcached_setOption, 0, 2, _IS_BOOL, 0)
-+ ZEND_ARG_TYPE_INFO(0, option, IS_LONG, 0)
-+ ZEND_ARG_TYPE_INFO(0, value, IS_MIXED, 0)
-+ZEND_END_ARG_INFO()
-+
-+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Memcached_setOptions, 0, 1, _IS_BOOL, 0)
-+ ZEND_ARG_TYPE_INFO(0, options, IS_ARRAY, 0)
-+ZEND_END_ARG_INFO()
-+
-+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Memcached_setBucket, 0, 3, _IS_BOOL, 0)
-+ ZEND_ARG_TYPE_INFO(0, host_map, IS_ARRAY, 0)
-+ ZEND_ARG_TYPE_INFO(0, forward_map, IS_ARRAY, 0)
-+ ZEND_ARG_TYPE_INFO(0, replicas, IS_LONG, 0)
-+ZEND_END_ARG_INFO()
-+
-+#if defined(HAVE_MEMCACHED_SASL)
-+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Memcached_setSaslAuthData, 0, 2, _IS_BOOL, 0)
-+ ZEND_ARG_TYPE_INFO(0, username, IS_STRING, 0)
-+ ZEND_ARG_TYPE_INFO(0, password, IS_STRING, 0)
-+ZEND_END_ARG_INFO()
-+#endif
-+
-+#if defined(HAVE_MEMCACHED_SET_ENCODING_KEY)
-+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Memcached_setEncodingKey, 0, 1, _IS_BOOL, 0)
-+ ZEND_ARG_TYPE_INFO(0, key, IS_STRING, 0)
-+ZEND_END_ARG_INFO()
-+#endif
-+
-+#define arginfo_class_Memcached_isPersistent arginfo_class_Memcached_resetServerList
-+
-+#define arginfo_class_Memcached_isPristine arginfo_class_Memcached_resetServerList
-+
-+#if defined(HAVE_MEMCACHED_PROTOCOL)
-+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_MemcachedServer_run, 0, 1, _IS_BOOL, 0)
-+ ZEND_ARG_TYPE_INFO(0, address, IS_STRING, 0)
-+ZEND_END_ARG_INFO()
-+#endif
-+
-+#if defined(HAVE_MEMCACHED_PROTOCOL)
-+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_MemcachedServer_on, 0, 2, _IS_BOOL, 0)
-+ ZEND_ARG_TYPE_INFO(0, event, IS_LONG, 0)
-+ ZEND_ARG_TYPE_INFO(0, callback, IS_CALLABLE, 0)
-+ZEND_END_ARG_INFO()
-+#endif
-+
-+
-+ZEND_METHOD(Memcached, __construct);
-+ZEND_METHOD(Memcached, getResultCode);
-+ZEND_METHOD(Memcached, getResultMessage);
-+ZEND_METHOD(Memcached, get);
-+ZEND_METHOD(Memcached, getByKey);
-+ZEND_METHOD(Memcached, getMulti);
-+ZEND_METHOD(Memcached, getMultiByKey);
-+ZEND_METHOD(Memcached, getDelayed);
-+ZEND_METHOD(Memcached, getDelayedByKey);
-+ZEND_METHOD(Memcached, fetch);
-+ZEND_METHOD(Memcached, fetchAll);
-+ZEND_METHOD(Memcached, set);
-+ZEND_METHOD(Memcached, setByKey);
-+ZEND_METHOD(Memcached, touch);
-+ZEND_METHOD(Memcached, touchByKey);
-+ZEND_METHOD(Memcached, setMulti);
-+ZEND_METHOD(Memcached, setMultiByKey);
-+ZEND_METHOD(Memcached, cas);
-+ZEND_METHOD(Memcached, casByKey);
-+ZEND_METHOD(Memcached, add);
-+ZEND_METHOD(Memcached, addByKey);
-+ZEND_METHOD(Memcached, append);
-+ZEND_METHOD(Memcached, appendByKey);
-+ZEND_METHOD(Memcached, prepend);
-+ZEND_METHOD(Memcached, prependByKey);
-+ZEND_METHOD(Memcached, replace);
-+ZEND_METHOD(Memcached, replaceByKey);
-+ZEND_METHOD(Memcached, delete);
-+ZEND_METHOD(Memcached, deleteMulti);
-+ZEND_METHOD(Memcached, deleteByKey);
-+ZEND_METHOD(Memcached, deleteMultiByKey);
-+ZEND_METHOD(Memcached, increment);
-+ZEND_METHOD(Memcached, decrement);
-+ZEND_METHOD(Memcached, incrementByKey);
-+ZEND_METHOD(Memcached, decrementByKey);
-+ZEND_METHOD(Memcached, addServer);
-+ZEND_METHOD(Memcached, addServers);
-+ZEND_METHOD(Memcached, getServerList);
-+ZEND_METHOD(Memcached, getServerByKey);
-+ZEND_METHOD(Memcached, resetServerList);
-+ZEND_METHOD(Memcached, quit);
-+ZEND_METHOD(Memcached, flushBuffers);
-+ZEND_METHOD(Memcached, getLastErrorMessage);
-+ZEND_METHOD(Memcached, getLastErrorCode);
-+ZEND_METHOD(Memcached, getLastErrorErrno);
-+ZEND_METHOD(Memcached, getLastDisconnectedServer);
-+ZEND_METHOD(Memcached, getStats);
-+ZEND_METHOD(Memcached, getVersion);
-+ZEND_METHOD(Memcached, getAllKeys);
-+ZEND_METHOD(Memcached, flush);
-+ZEND_METHOD(Memcached, getOption);
-+ZEND_METHOD(Memcached, setOption);
-+ZEND_METHOD(Memcached, setOptions);
-+ZEND_METHOD(Memcached, setBucket);
-+#if defined(HAVE_MEMCACHED_SASL)
-+ZEND_METHOD(Memcached, setSaslAuthData);
-+#endif
-+#if defined(HAVE_MEMCACHED_SET_ENCODING_KEY)
-+ZEND_METHOD(Memcached, setEncodingKey);
-+#endif
-+ZEND_METHOD(Memcached, isPersistent);
-+ZEND_METHOD(Memcached, isPristine);
-+#if defined(HAVE_MEMCACHED_PROTOCOL)
-+ZEND_METHOD(MemcachedServer, run);
-+#endif
-+#if defined(HAVE_MEMCACHED_PROTOCOL)
-+ZEND_METHOD(MemcachedServer, on);
-+#endif
-+
-+
-+static const zend_function_entry class_Memcached_methods[] = {
-+ ZEND_ME(Memcached, __construct, arginfo_class_Memcached___construct, ZEND_ACC_PUBLIC)
-+ ZEND_ME(Memcached, getResultCode, arginfo_class_Memcached_getResultCode, ZEND_ACC_PUBLIC)
-+ ZEND_ME(Memcached, getResultMessage, arginfo_class_Memcached_getResultMessage, ZEND_ACC_PUBLIC)
-+ ZEND_ME(Memcached, get, arginfo_class_Memcached_get, ZEND_ACC_PUBLIC)
-+ ZEND_ME(Memcached, getByKey, arginfo_class_Memcached_getByKey, ZEND_ACC_PUBLIC)
-+ ZEND_ME(Memcached, getMulti, arginfo_class_Memcached_getMulti, ZEND_ACC_PUBLIC)
-+ ZEND_ME(Memcached, getMultiByKey, arginfo_class_Memcached_getMultiByKey, ZEND_ACC_PUBLIC)
-+ ZEND_ME(Memcached, getDelayed, arginfo_class_Memcached_getDelayed, ZEND_ACC_PUBLIC)
-+ ZEND_ME(Memcached, getDelayedByKey, arginfo_class_Memcached_getDelayedByKey, ZEND_ACC_PUBLIC)
-+ ZEND_ME(Memcached, fetch, arginfo_class_Memcached_fetch, ZEND_ACC_PUBLIC)
-+ ZEND_ME(Memcached, fetchAll, arginfo_class_Memcached_fetchAll, ZEND_ACC_PUBLIC)
-+ ZEND_ME(Memcached, set, arginfo_class_Memcached_set, ZEND_ACC_PUBLIC)
-+ ZEND_ME(Memcached, setByKey, arginfo_class_Memcached_setByKey, ZEND_ACC_PUBLIC)
-+ ZEND_ME(Memcached, touch, arginfo_class_Memcached_touch, ZEND_ACC_PUBLIC)
-+ ZEND_ME(Memcached, touchByKey, arginfo_class_Memcached_touchByKey, ZEND_ACC_PUBLIC)
-+ ZEND_ME(Memcached, setMulti, arginfo_class_Memcached_setMulti, ZEND_ACC_PUBLIC)
-+ ZEND_ME(Memcached, setMultiByKey, arginfo_class_Memcached_setMultiByKey, ZEND_ACC_PUBLIC)
-+ ZEND_ME(Memcached, cas, arginfo_class_Memcached_cas, ZEND_ACC_PUBLIC)
-+ ZEND_ME(Memcached, casByKey, arginfo_class_Memcached_casByKey, ZEND_ACC_PUBLIC)
-+ ZEND_ME(Memcached, add, arginfo_class_Memcached_add, ZEND_ACC_PUBLIC)
-+ ZEND_ME(Memcached, addByKey, arginfo_class_Memcached_addByKey, ZEND_ACC_PUBLIC)
-+ ZEND_ME(Memcached, append, arginfo_class_Memcached_append, ZEND_ACC_PUBLIC)
-+ ZEND_ME(Memcached, appendByKey, arginfo_class_Memcached_appendByKey, ZEND_ACC_PUBLIC)
-+ ZEND_ME(Memcached, prepend, arginfo_class_Memcached_prepend, ZEND_ACC_PUBLIC)
-+ ZEND_ME(Memcached, prependByKey, arginfo_class_Memcached_prependByKey, ZEND_ACC_PUBLIC)
-+ ZEND_ME(Memcached, replace, arginfo_class_Memcached_replace, ZEND_ACC_PUBLIC)
-+ ZEND_ME(Memcached, replaceByKey, arginfo_class_Memcached_replaceByKey, ZEND_ACC_PUBLIC)
-+ ZEND_ME(Memcached, delete, arginfo_class_Memcached_delete, ZEND_ACC_PUBLIC)
-+ ZEND_ME(Memcached, deleteMulti, arginfo_class_Memcached_deleteMulti, ZEND_ACC_PUBLIC)
-+ ZEND_ME(Memcached, deleteByKey, arginfo_class_Memcached_deleteByKey, ZEND_ACC_PUBLIC)
-+ ZEND_ME(Memcached, deleteMultiByKey, arginfo_class_Memcached_deleteMultiByKey, ZEND_ACC_PUBLIC)
-+ ZEND_ME(Memcached, increment, arginfo_class_Memcached_increment, ZEND_ACC_PUBLIC)
-+ ZEND_ME(Memcached, decrement, arginfo_class_Memcached_decrement, ZEND_ACC_PUBLIC)
-+ ZEND_ME(Memcached, incrementByKey, arginfo_class_Memcached_incrementByKey, ZEND_ACC_PUBLIC)
-+ ZEND_ME(Memcached, decrementByKey, arginfo_class_Memcached_decrementByKey, ZEND_ACC_PUBLIC)
-+ ZEND_ME(Memcached, addServer, arginfo_class_Memcached_addServer, ZEND_ACC_PUBLIC)
-+ ZEND_ME(Memcached, addServers, arginfo_class_Memcached_addServers, ZEND_ACC_PUBLIC)
-+ ZEND_ME(Memcached, getServerList, arginfo_class_Memcached_getServerList, ZEND_ACC_PUBLIC)
-+ ZEND_ME(Memcached, getServerByKey, arginfo_class_Memcached_getServerByKey, ZEND_ACC_PUBLIC)
-+ ZEND_ME(Memcached, resetServerList, arginfo_class_Memcached_resetServerList, ZEND_ACC_PUBLIC)
-+ ZEND_ME(Memcached, quit, arginfo_class_Memcached_quit, ZEND_ACC_PUBLIC)
-+ ZEND_ME(Memcached, flushBuffers, arginfo_class_Memcached_flushBuffers, ZEND_ACC_PUBLIC)
-+ ZEND_ME(Memcached, getLastErrorMessage, arginfo_class_Memcached_getLastErrorMessage, ZEND_ACC_PUBLIC)
-+ ZEND_ME(Memcached, getLastErrorCode, arginfo_class_Memcached_getLastErrorCode, ZEND_ACC_PUBLIC)
-+ ZEND_ME(Memcached, getLastErrorErrno, arginfo_class_Memcached_getLastErrorErrno, ZEND_ACC_PUBLIC)
-+ ZEND_ME(Memcached, getLastDisconnectedServer, arginfo_class_Memcached_getLastDisconnectedServer, ZEND_ACC_PUBLIC)
-+ ZEND_ME(Memcached, getStats, arginfo_class_Memcached_getStats, ZEND_ACC_PUBLIC)
-+ ZEND_ME(Memcached, getVersion, arginfo_class_Memcached_getVersion, ZEND_ACC_PUBLIC)
-+ ZEND_ME(Memcached, getAllKeys, arginfo_class_Memcached_getAllKeys, ZEND_ACC_PUBLIC)
-+ ZEND_ME(Memcached, flush, arginfo_class_Memcached_flush, ZEND_ACC_PUBLIC)
-+ ZEND_ME(Memcached, getOption, arginfo_class_Memcached_getOption, ZEND_ACC_PUBLIC)
-+ ZEND_ME(Memcached, setOption, arginfo_class_Memcached_setOption, ZEND_ACC_PUBLIC)
-+ ZEND_ME(Memcached, setOptions, arginfo_class_Memcached_setOptions, ZEND_ACC_PUBLIC)
-+ ZEND_ME(Memcached, setBucket, arginfo_class_Memcached_setBucket, ZEND_ACC_PUBLIC)
-+#if defined(HAVE_MEMCACHED_SASL)
-+ ZEND_ME(Memcached, setSaslAuthData, arginfo_class_Memcached_setSaslAuthData, ZEND_ACC_PUBLIC)
-+#endif
-+#if defined(HAVE_MEMCACHED_SET_ENCODING_KEY)
-+ ZEND_ME(Memcached, setEncodingKey, arginfo_class_Memcached_setEncodingKey, ZEND_ACC_PUBLIC)
-+#endif
-+ ZEND_ME(Memcached, isPersistent, arginfo_class_Memcached_isPersistent, ZEND_ACC_PUBLIC)
-+ ZEND_ME(Memcached, isPristine, arginfo_class_Memcached_isPristine, ZEND_ACC_PUBLIC)
-+ ZEND_FE_END
-+};
-+
-+
-+static const zend_function_entry class_MemcachedServer_methods[] = {
-+#if defined(HAVE_MEMCACHED_PROTOCOL)
-+ ZEND_ME(MemcachedServer, run, arginfo_class_MemcachedServer_run, ZEND_ACC_PUBLIC)
-+#endif
-+#if defined(HAVE_MEMCACHED_PROTOCOL)
-+ ZEND_ME(MemcachedServer, on, arginfo_class_MemcachedServer_on, ZEND_ACC_PUBLIC)
-+#endif
-+ ZEND_FE_END
-+};
-diff --git a/php_memcached_legacy_arginfo.h b/php_memcached_legacy_arginfo.h
-new file mode 100644
-index 0000000..6f21d2a
---- /dev/null
-+++ b/php_memcached_legacy_arginfo.h
-@@ -0,0 +1,407 @@
-+/* This is a generated file, edit the .stub.php file instead.
-+ * Stub hash: a33d23c6659922e98d3704879eb4bc820e1819df */
-+
-+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Memcached___construct, 0, 0, 0)
-+ ZEND_ARG_INFO(0, persistent_id)
-+ ZEND_ARG_INFO(0, callback)
-+ ZEND_ARG_INFO(0, connection_str)
-+ZEND_END_ARG_INFO()
-+
-+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Memcached_getResultCode, 0, 0, 0)
-+ZEND_END_ARG_INFO()
-+
-+#define arginfo_class_Memcached_getResultMessage arginfo_class_Memcached_getResultCode
-+
-+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Memcached_get, 0, 0, 1)
-+ ZEND_ARG_INFO(0, key)
-+ ZEND_ARG_INFO(0, cache_cb)
-+ ZEND_ARG_INFO(0, get_flags)
-+ZEND_END_ARG_INFO()
-+
-+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Memcached_getByKey, 0, 0, 2)
-+ ZEND_ARG_INFO(0, server_key)
-+ ZEND_ARG_INFO(0, key)
-+ ZEND_ARG_INFO(0, cache_cb)
-+ ZEND_ARG_INFO(0, get_flags)
-+ZEND_END_ARG_INFO()
-+
-+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Memcached_getMulti, 0, 0, 1)
-+ ZEND_ARG_INFO(0, keys)
-+ ZEND_ARG_INFO(0, get_flags)
-+ZEND_END_ARG_INFO()
-+
-+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Memcached_getMultiByKey, 0, 0, 2)
-+ ZEND_ARG_INFO(0, server_key)
-+ ZEND_ARG_INFO(0, keys)
-+ ZEND_ARG_INFO(0, get_flags)
-+ZEND_END_ARG_INFO()
-+
-+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Memcached_getDelayed, 0, 0, 1)
-+ ZEND_ARG_INFO(0, keys)
-+ ZEND_ARG_INFO(0, with_cas)
-+ ZEND_ARG_INFO(0, value_cb)
-+ZEND_END_ARG_INFO()
-+
-+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Memcached_getDelayedByKey, 0, 0, 2)
-+ ZEND_ARG_INFO(0, server_key)
-+ ZEND_ARG_INFO(0, keys)
-+ ZEND_ARG_INFO(0, with_cas)
-+ ZEND_ARG_INFO(0, value_cb)
-+ZEND_END_ARG_INFO()
-+
-+#define arginfo_class_Memcached_fetch arginfo_class_Memcached_getResultCode
-+
-+#define arginfo_class_Memcached_fetchAll arginfo_class_Memcached_getResultCode
-+
-+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Memcached_set, 0, 0, 2)
-+ ZEND_ARG_INFO(0, key)
-+ ZEND_ARG_INFO(0, value)
-+ ZEND_ARG_INFO(0, expiration)
-+ZEND_END_ARG_INFO()
-+
-+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Memcached_setByKey, 0, 0, 3)
-+ ZEND_ARG_INFO(0, server_key)
-+ ZEND_ARG_INFO(0, key)
-+ ZEND_ARG_INFO(0, value)
-+ ZEND_ARG_INFO(0, expiration)
-+ZEND_END_ARG_INFO()
-+
-+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Memcached_touch, 0, 0, 1)
-+ ZEND_ARG_INFO(0, key)
-+ ZEND_ARG_INFO(0, expiration)
-+ZEND_END_ARG_INFO()
-+
-+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Memcached_touchByKey, 0, 0, 2)
-+ ZEND_ARG_INFO(0, server_key)
-+ ZEND_ARG_INFO(0, key)
-+ ZEND_ARG_INFO(0, expiration)
-+ZEND_END_ARG_INFO()
-+
-+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Memcached_setMulti, 0, 0, 1)
-+ ZEND_ARG_INFO(0, items)
-+ ZEND_ARG_INFO(0, expiration)
-+ZEND_END_ARG_INFO()
-+
-+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Memcached_setMultiByKey, 0, 0, 2)
-+ ZEND_ARG_INFO(0, server_key)
-+ ZEND_ARG_INFO(0, items)
-+ ZEND_ARG_INFO(0, expiration)
-+ZEND_END_ARG_INFO()
-+
-+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Memcached_cas, 0, 0, 3)
-+ ZEND_ARG_INFO(0, cas_token)
-+ ZEND_ARG_INFO(0, key)
-+ ZEND_ARG_INFO(0, value)
-+ ZEND_ARG_INFO(0, expiration)
-+ZEND_END_ARG_INFO()
-+
-+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Memcached_casByKey, 0, 0, 4)
-+ ZEND_ARG_INFO(0, cas_token)
-+ ZEND_ARG_INFO(0, server_key)
-+ ZEND_ARG_INFO(0, key)
-+ ZEND_ARG_INFO(0, value)
-+ ZEND_ARG_INFO(0, expiration)
-+ZEND_END_ARG_INFO()
-+
-+#define arginfo_class_Memcached_add arginfo_class_Memcached_set
-+
-+#define arginfo_class_Memcached_addByKey arginfo_class_Memcached_setByKey
-+
-+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Memcached_append, 0, 0, 2)
-+ ZEND_ARG_INFO(0, key)
-+ ZEND_ARG_INFO(0, value)
-+ZEND_END_ARG_INFO()
-+
-+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Memcached_appendByKey, 0, 0, 3)
-+ ZEND_ARG_INFO(0, server_key)
-+ ZEND_ARG_INFO(0, key)
-+ ZEND_ARG_INFO(0, value)
-+ZEND_END_ARG_INFO()
-+
-+#define arginfo_class_Memcached_prepend arginfo_class_Memcached_append
-+
-+#define arginfo_class_Memcached_prependByKey arginfo_class_Memcached_appendByKey
-+
-+#define arginfo_class_Memcached_replace arginfo_class_Memcached_set
-+
-+#define arginfo_class_Memcached_replaceByKey arginfo_class_Memcached_setByKey
-+
-+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Memcached_delete, 0, 0, 1)
-+ ZEND_ARG_INFO(0, key)
-+ ZEND_ARG_INFO(0, time)
-+ZEND_END_ARG_INFO()
-+
-+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Memcached_deleteMulti, 0, 0, 1)
-+ ZEND_ARG_INFO(0, keys)
-+ ZEND_ARG_INFO(0, time)
-+ZEND_END_ARG_INFO()
-+
-+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Memcached_deleteByKey, 0, 0, 2)
-+ ZEND_ARG_INFO(0, server_key)
-+ ZEND_ARG_INFO(0, key)
-+ ZEND_ARG_INFO(0, time)
-+ZEND_END_ARG_INFO()
-+
-+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Memcached_deleteMultiByKey, 0, 0, 2)
-+ ZEND_ARG_INFO(0, server_key)
-+ ZEND_ARG_INFO(0, keys)
-+ ZEND_ARG_INFO(0, time)
-+ZEND_END_ARG_INFO()
-+
-+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Memcached_increment, 0, 0, 1)
-+ ZEND_ARG_INFO(0, key)
-+ ZEND_ARG_INFO(0, offset)
-+ ZEND_ARG_INFO(0, initial_value)
-+ ZEND_ARG_INFO(0, expiry)
-+ZEND_END_ARG_INFO()
-+
-+#define arginfo_class_Memcached_decrement arginfo_class_Memcached_increment
-+
-+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Memcached_incrementByKey, 0, 0, 2)
-+ ZEND_ARG_INFO(0, server_key)
-+ ZEND_ARG_INFO(0, key)
-+ ZEND_ARG_INFO(0, offset)
-+ ZEND_ARG_INFO(0, initial_value)
-+ ZEND_ARG_INFO(0, expiry)
-+ZEND_END_ARG_INFO()
-+
-+#define arginfo_class_Memcached_decrementByKey arginfo_class_Memcached_incrementByKey
-+
-+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Memcached_addServer, 0, 0, 2)
-+ ZEND_ARG_INFO(0, host)
-+ ZEND_ARG_INFO(0, port)
-+ ZEND_ARG_INFO(0, weight)
-+ZEND_END_ARG_INFO()
-+
-+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Memcached_addServers, 0, 0, 1)
-+ ZEND_ARG_INFO(0, servers)
-+ZEND_END_ARG_INFO()
-+
-+#define arginfo_class_Memcached_getServerList arginfo_class_Memcached_getResultCode
-+
-+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Memcached_getServerByKey, 0, 0, 1)
-+ ZEND_ARG_INFO(0, server_key)
-+ZEND_END_ARG_INFO()
-+
-+#define arginfo_class_Memcached_resetServerList arginfo_class_Memcached_getResultCode
-+
-+#define arginfo_class_Memcached_quit arginfo_class_Memcached_getResultCode
-+
-+#define arginfo_class_Memcached_flushBuffers arginfo_class_Memcached_getResultCode
-+
-+#define arginfo_class_Memcached_getLastErrorMessage arginfo_class_Memcached_getResultCode
-+
-+#define arginfo_class_Memcached_getLastErrorCode arginfo_class_Memcached_getResultCode
-+
-+#define arginfo_class_Memcached_getLastErrorErrno arginfo_class_Memcached_getResultCode
-+
-+#define arginfo_class_Memcached_getLastDisconnectedServer arginfo_class_Memcached_getResultCode
-+
-+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Memcached_getStats, 0, 0, 0)
-+ ZEND_ARG_INFO(0, type)
-+ZEND_END_ARG_INFO()
-+
-+#define arginfo_class_Memcached_getVersion arginfo_class_Memcached_getResultCode
-+
-+#define arginfo_class_Memcached_getAllKeys arginfo_class_Memcached_getResultCode
-+
-+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Memcached_flush, 0, 0, 0)
-+ ZEND_ARG_INFO(0, delay)
-+ZEND_END_ARG_INFO()
-+
-+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Memcached_getOption, 0, 0, 1)
-+ ZEND_ARG_INFO(0, option)
-+ZEND_END_ARG_INFO()
-+
-+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Memcached_setOption, 0, 0, 2)
-+ ZEND_ARG_INFO(0, option)
-+ ZEND_ARG_INFO(0, value)
-+ZEND_END_ARG_INFO()
-+
-+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Memcached_setOptions, 0, 0, 1)
-+ ZEND_ARG_INFO(0, options)
-+ZEND_END_ARG_INFO()
-+
-+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Memcached_setBucket, 0, 0, 3)
-+ ZEND_ARG_INFO(0, host_map)
-+ ZEND_ARG_INFO(0, forward_map)
-+ ZEND_ARG_INFO(0, replicas)
-+ZEND_END_ARG_INFO()
-+
-+#if defined(HAVE_MEMCACHED_SASL)
-+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Memcached_setSaslAuthData, 0, 0, 2)
-+ ZEND_ARG_INFO(0, username)
-+ ZEND_ARG_INFO(0, password)
-+ZEND_END_ARG_INFO()
-+#endif
-+
-+#if defined(HAVE_MEMCACHED_SET_ENCODING_KEY)
-+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Memcached_setEncodingKey, 0, 0, 1)
-+ ZEND_ARG_INFO(0, key)
-+ZEND_END_ARG_INFO()
-+#endif
-+
-+#define arginfo_class_Memcached_isPersistent arginfo_class_Memcached_getResultCode
-+
-+#define arginfo_class_Memcached_isPristine arginfo_class_Memcached_getResultCode
-+
-+#if defined(HAVE_MEMCACHED_PROTOCOL)
-+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_MemcachedServer_run, 0, 0, 1)
-+ ZEND_ARG_INFO(0, address)
-+ZEND_END_ARG_INFO()
-+#endif
-+
-+#if defined(HAVE_MEMCACHED_PROTOCOL)
-+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_MemcachedServer_on, 0, 0, 2)
-+ ZEND_ARG_INFO(0, event)
-+ ZEND_ARG_INFO(0, callback)
-+ZEND_END_ARG_INFO()
-+#endif
-+
-+
-+ZEND_METHOD(Memcached, __construct);
-+ZEND_METHOD(Memcached, getResultCode);
-+ZEND_METHOD(Memcached, getResultMessage);
-+ZEND_METHOD(Memcached, get);
-+ZEND_METHOD(Memcached, getByKey);
-+ZEND_METHOD(Memcached, getMulti);
-+ZEND_METHOD(Memcached, getMultiByKey);
-+ZEND_METHOD(Memcached, getDelayed);
-+ZEND_METHOD(Memcached, getDelayedByKey);
-+ZEND_METHOD(Memcached, fetch);
-+ZEND_METHOD(Memcached, fetchAll);
-+ZEND_METHOD(Memcached, set);
-+ZEND_METHOD(Memcached, setByKey);
-+ZEND_METHOD(Memcached, touch);
-+ZEND_METHOD(Memcached, touchByKey);
-+ZEND_METHOD(Memcached, setMulti);
-+ZEND_METHOD(Memcached, setMultiByKey);
-+ZEND_METHOD(Memcached, cas);
-+ZEND_METHOD(Memcached, casByKey);
-+ZEND_METHOD(Memcached, add);
-+ZEND_METHOD(Memcached, addByKey);
-+ZEND_METHOD(Memcached, append);
-+ZEND_METHOD(Memcached, appendByKey);
-+ZEND_METHOD(Memcached, prepend);
-+ZEND_METHOD(Memcached, prependByKey);
-+ZEND_METHOD(Memcached, replace);
-+ZEND_METHOD(Memcached, replaceByKey);
-+ZEND_METHOD(Memcached, delete);
-+ZEND_METHOD(Memcached, deleteMulti);
-+ZEND_METHOD(Memcached, deleteByKey);
-+ZEND_METHOD(Memcached, deleteMultiByKey);
-+ZEND_METHOD(Memcached, increment);
-+ZEND_METHOD(Memcached, decrement);
-+ZEND_METHOD(Memcached, incrementByKey);
-+ZEND_METHOD(Memcached, decrementByKey);
-+ZEND_METHOD(Memcached, addServer);
-+ZEND_METHOD(Memcached, addServers);
-+ZEND_METHOD(Memcached, getServerList);
-+ZEND_METHOD(Memcached, getServerByKey);
-+ZEND_METHOD(Memcached, resetServerList);
-+ZEND_METHOD(Memcached, quit);
-+ZEND_METHOD(Memcached, flushBuffers);
-+ZEND_METHOD(Memcached, getLastErrorMessage);
-+ZEND_METHOD(Memcached, getLastErrorCode);
-+ZEND_METHOD(Memcached, getLastErrorErrno);
-+ZEND_METHOD(Memcached, getLastDisconnectedServer);
-+ZEND_METHOD(Memcached, getStats);
-+ZEND_METHOD(Memcached, getVersion);
-+ZEND_METHOD(Memcached, getAllKeys);
-+ZEND_METHOD(Memcached, flush);
-+ZEND_METHOD(Memcached, getOption);
-+ZEND_METHOD(Memcached, setOption);
-+ZEND_METHOD(Memcached, setOptions);
-+ZEND_METHOD(Memcached, setBucket);
-+#if defined(HAVE_MEMCACHED_SASL)
-+ZEND_METHOD(Memcached, setSaslAuthData);
-+#endif
-+#if defined(HAVE_MEMCACHED_SET_ENCODING_KEY)
-+ZEND_METHOD(Memcached, setEncodingKey);
-+#endif
-+ZEND_METHOD(Memcached, isPersistent);
-+ZEND_METHOD(Memcached, isPristine);
-+#if defined(HAVE_MEMCACHED_PROTOCOL)
-+ZEND_METHOD(MemcachedServer, run);
-+#endif
-+#if defined(HAVE_MEMCACHED_PROTOCOL)
-+ZEND_METHOD(MemcachedServer, on);
-+#endif
-+
-+
-+static const zend_function_entry class_Memcached_methods[] = {
-+ ZEND_ME(Memcached, __construct, arginfo_class_Memcached___construct, ZEND_ACC_PUBLIC)
-+ ZEND_ME(Memcached, getResultCode, arginfo_class_Memcached_getResultCode, ZEND_ACC_PUBLIC)
-+ ZEND_ME(Memcached, getResultMessage, arginfo_class_Memcached_getResultMessage, ZEND_ACC_PUBLIC)
-+ ZEND_ME(Memcached, get, arginfo_class_Memcached_get, ZEND_ACC_PUBLIC)
-+ ZEND_ME(Memcached, getByKey, arginfo_class_Memcached_getByKey, ZEND_ACC_PUBLIC)
-+ ZEND_ME(Memcached, getMulti, arginfo_class_Memcached_getMulti, ZEND_ACC_PUBLIC)
-+ ZEND_ME(Memcached, getMultiByKey, arginfo_class_Memcached_getMultiByKey, ZEND_ACC_PUBLIC)
-+ ZEND_ME(Memcached, getDelayed, arginfo_class_Memcached_getDelayed, ZEND_ACC_PUBLIC)
-+ ZEND_ME(Memcached, getDelayedByKey, arginfo_class_Memcached_getDelayedByKey, ZEND_ACC_PUBLIC)
-+ ZEND_ME(Memcached, fetch, arginfo_class_Memcached_fetch, ZEND_ACC_PUBLIC)
-+ ZEND_ME(Memcached, fetchAll, arginfo_class_Memcached_fetchAll, ZEND_ACC_PUBLIC)
-+ ZEND_ME(Memcached, set, arginfo_class_Memcached_set, ZEND_ACC_PUBLIC)
-+ ZEND_ME(Memcached, setByKey, arginfo_class_Memcached_setByKey, ZEND_ACC_PUBLIC)
-+ ZEND_ME(Memcached, touch, arginfo_class_Memcached_touch, ZEND_ACC_PUBLIC)
-+ ZEND_ME(Memcached, touchByKey, arginfo_class_Memcached_touchByKey, ZEND_ACC_PUBLIC)
-+ ZEND_ME(Memcached, setMulti, arginfo_class_Memcached_setMulti, ZEND_ACC_PUBLIC)
-+ ZEND_ME(Memcached, setMultiByKey, arginfo_class_Memcached_setMultiByKey, ZEND_ACC_PUBLIC)
-+ ZEND_ME(Memcached, cas, arginfo_class_Memcached_cas, ZEND_ACC_PUBLIC)
-+ ZEND_ME(Memcached, casByKey, arginfo_class_Memcached_casByKey, ZEND_ACC_PUBLIC)
-+ ZEND_ME(Memcached, add, arginfo_class_Memcached_add, ZEND_ACC_PUBLIC)
-+ ZEND_ME(Memcached, addByKey, arginfo_class_Memcached_addByKey, ZEND_ACC_PUBLIC)
-+ ZEND_ME(Memcached, append, arginfo_class_Memcached_append, ZEND_ACC_PUBLIC)
-+ ZEND_ME(Memcached, appendByKey, arginfo_class_Memcached_appendByKey, ZEND_ACC_PUBLIC)
-+ ZEND_ME(Memcached, prepend, arginfo_class_Memcached_prepend, ZEND_ACC_PUBLIC)
-+ ZEND_ME(Memcached, prependByKey, arginfo_class_Memcached_prependByKey, ZEND_ACC_PUBLIC)
-+ ZEND_ME(Memcached, replace, arginfo_class_Memcached_replace, ZEND_ACC_PUBLIC)
-+ ZEND_ME(Memcached, replaceByKey, arginfo_class_Memcached_replaceByKey, ZEND_ACC_PUBLIC)
-+ ZEND_ME(Memcached, delete, arginfo_class_Memcached_delete, ZEND_ACC_PUBLIC)
-+ ZEND_ME(Memcached, deleteMulti, arginfo_class_Memcached_deleteMulti, ZEND_ACC_PUBLIC)
-+ ZEND_ME(Memcached, deleteByKey, arginfo_class_Memcached_deleteByKey, ZEND_ACC_PUBLIC)
-+ ZEND_ME(Memcached, deleteMultiByKey, arginfo_class_Memcached_deleteMultiByKey, ZEND_ACC_PUBLIC)
-+ ZEND_ME(Memcached, increment, arginfo_class_Memcached_increment, ZEND_ACC_PUBLIC)
-+ ZEND_ME(Memcached, decrement, arginfo_class_Memcached_decrement, ZEND_ACC_PUBLIC)
-+ ZEND_ME(Memcached, incrementByKey, arginfo_class_Memcached_incrementByKey, ZEND_ACC_PUBLIC)
-+ ZEND_ME(Memcached, decrementByKey, arginfo_class_Memcached_decrementByKey, ZEND_ACC_PUBLIC)
-+ ZEND_ME(Memcached, addServer, arginfo_class_Memcached_addServer, ZEND_ACC_PUBLIC)
-+ ZEND_ME(Memcached, addServers, arginfo_class_Memcached_addServers, ZEND_ACC_PUBLIC)
-+ ZEND_ME(Memcached, getServerList, arginfo_class_Memcached_getServerList, ZEND_ACC_PUBLIC)
-+ ZEND_ME(Memcached, getServerByKey, arginfo_class_Memcached_getServerByKey, ZEND_ACC_PUBLIC)
-+ ZEND_ME(Memcached, resetServerList, arginfo_class_Memcached_resetServerList, ZEND_ACC_PUBLIC)
-+ ZEND_ME(Memcached, quit, arginfo_class_Memcached_quit, ZEND_ACC_PUBLIC)
-+ ZEND_ME(Memcached, flushBuffers, arginfo_class_Memcached_flushBuffers, ZEND_ACC_PUBLIC)
-+ ZEND_ME(Memcached, getLastErrorMessage, arginfo_class_Memcached_getLastErrorMessage, ZEND_ACC_PUBLIC)
-+ ZEND_ME(Memcached, getLastErrorCode, arginfo_class_Memcached_getLastErrorCode, ZEND_ACC_PUBLIC)
-+ ZEND_ME(Memcached, getLastErrorErrno, arginfo_class_Memcached_getLastErrorErrno, ZEND_ACC_PUBLIC)
-+ ZEND_ME(Memcached, getLastDisconnectedServer, arginfo_class_Memcached_getLastDisconnectedServer, ZEND_ACC_PUBLIC)
-+ ZEND_ME(Memcached, getStats, arginfo_class_Memcached_getStats, ZEND_ACC_PUBLIC)
-+ ZEND_ME(Memcached, getVersion, arginfo_class_Memcached_getVersion, ZEND_ACC_PUBLIC)
-+ ZEND_ME(Memcached, getAllKeys, arginfo_class_Memcached_getAllKeys, ZEND_ACC_PUBLIC)
-+ ZEND_ME(Memcached, flush, arginfo_class_Memcached_flush, ZEND_ACC_PUBLIC)
-+ ZEND_ME(Memcached, getOption, arginfo_class_Memcached_getOption, ZEND_ACC_PUBLIC)
-+ ZEND_ME(Memcached, setOption, arginfo_class_Memcached_setOption, ZEND_ACC_PUBLIC)
-+ ZEND_ME(Memcached, setOptions, arginfo_class_Memcached_setOptions, ZEND_ACC_PUBLIC)
-+ ZEND_ME(Memcached, setBucket, arginfo_class_Memcached_setBucket, ZEND_ACC_PUBLIC)
-+#if defined(HAVE_MEMCACHED_SASL)
-+ ZEND_ME(Memcached, setSaslAuthData, arginfo_class_Memcached_setSaslAuthData, ZEND_ACC_PUBLIC)
-+#endif
-+#if defined(HAVE_MEMCACHED_SET_ENCODING_KEY)
-+ ZEND_ME(Memcached, setEncodingKey, arginfo_class_Memcached_setEncodingKey, ZEND_ACC_PUBLIC)
-+#endif
-+ ZEND_ME(Memcached, isPersistent, arginfo_class_Memcached_isPersistent, ZEND_ACC_PUBLIC)
-+ ZEND_ME(Memcached, isPristine, arginfo_class_Memcached_isPristine, ZEND_ACC_PUBLIC)
-+ ZEND_FE_END
-+};
-+
-+
-+static const zend_function_entry class_MemcachedServer_methods[] = {
-+#if defined(HAVE_MEMCACHED_PROTOCOL)
-+ ZEND_ME(MemcachedServer, run, arginfo_class_MemcachedServer_run, ZEND_ACC_PUBLIC)
-+#endif
-+#if defined(HAVE_MEMCACHED_PROTOCOL)
-+ ZEND_ME(MemcachedServer, on, arginfo_class_MemcachedServer_on, ZEND_ACC_PUBLIC)
-+#endif
-+ ZEND_FE_END
-+};
-diff --git a/tests/bad_construct.phpt b/tests/bad_construct.phpt
-index 0b740e0..0c27879 100644
---- a/tests/bad_construct.phpt
-+++ b/tests/bad_construct.phpt
-@@ -1,7 +1,10 @@
- --TEST--
- Memcached construct with bad arguments
- --SKIPIF--
--<?php include "skipif.inc";?>
-+<?php
-+include "skipif.inc";
-+if (PHP_VERSION_ID >= 80000) die("skip PHP 7 only");
-+?>
- --FILE--
- <?php
-
-diff --git a/tests/bad_construct_8.phpt b/tests/bad_construct_8.phpt
-new file mode 100644
-index 0000000..81daa5a
---- /dev/null
-+++ b/tests/bad_construct_8.phpt
-@@ -0,0 +1,34 @@
-+--TEST--
-+Memcached construct with bad arguments
-+--SKIPIF--
-+<?php
-+include "skipif.inc";
-+if (PHP_VERSION_ID < 80000) die("skip PHP 8 only");
-+?>
-+--FILE--
-+<?php
-+
-+try {
-+ $m = new Memcached((object)array());
-+} catch (TypeError $e) {
-+ echo $e->getMessage() . PHP_EOL;
-+}
-+
-+class extended extends Memcached {
-+ public function __construct () {
-+ }
-+}
-+
-+error_reporting(E_ALL);
-+$extended = new extended ();
-+var_dump ($extended->setOption (Memcached::OPT_BINARY_PROTOCOL, true));
-+
-+echo "OK" . PHP_EOL;
-+
-+--EXPECTF--
-+Memcached::__construct(): Argument #1 ($persistent_id) must be of type ?string, stdClass given
-+
-+Warning: Memcached::setOption(): Memcached constructor was not called in %s
-+NULL
-+OK
-+
-diff --git a/tests/expire.phpt b/tests/expire.phpt
-index eac0240..4fb49c5 100644
---- a/tests/expire.phpt
-+++ b/tests/expire.phpt
-@@ -7,6 +7,7 @@ https://code.google.com/p/memcached/issues/detail?id=275
- $min_version = "1.4.8";
- include dirname(__FILE__) . "/skipif.inc";
- if (!method_exists("memcached", "touch")) die ("skip memcached::touch is not available");
-+if (getenv("SKIP_SLOW_TESTS")) die('skip slow test');
- ?>
- --FILE--
- <?php
-diff --git a/tests/undefined_set.phpt b/tests/undefined_set.phpt
-index 2e8b1c1..caeda19 100644
---- a/tests/undefined_set.phpt
-+++ b/tests/undefined_set.phpt
-@@ -24,16 +24,16 @@ $rv = $m->set($key, $value, $no_time);
- var_dump($rv);
- ?>
- --EXPECTF--
--Notice: Undefined variable: no_key in %s
-+%s: Undefined variable%sno_key in %s
- bool(false)
-
--Notice: Undefined variable: no_value in %s
-+%s: Undefined variable%sno_value in %s
- bool(true)
-
--Notice: Undefined variable: no_key in %s
-+%s: Undefined variable%sno_key in %s
-
--Notice: Undefined variable: no_value in %s
-+%s: Undefined variable%sno_value in %s
- bool(false)
-
--Notice: Undefined variable: no_time in %s
-+%s: Undefined variable%sno_time in %s
- bool(true)
-diff --git a/tests/vbucket.phpt b/tests/vbucket.phpt
-index f17eb94..a691680 100644
---- a/tests/vbucket.phpt
-+++ b/tests/vbucket.phpt
-@@ -18,14 +18,6 @@ var_dump ($m->setBucket (array (1,2,2), array (1,2,2), 2));
-
- var_dump ($m->setBucket (array ('a', 'b', 'c'), null, 2));
-
--var_dump ($m->setBucket (array (), null, 2));
--
--var_dump ($m->setBucket (array (), array (), -1));
--
--var_dump ($m->setBucket (null, array (), -1));
--
--var_dump ($m->setBucket (array (-1), array (-1), 1));
--
- echo "OK\n";
-
- ?>
-@@ -33,16 +25,4 @@ echo "OK\n";
- bool(true)
- bool(true)
- bool(true)
--
--Warning: Memcached::setBucket(): server map cannot be empty in %s on line %d
--bool(false)
--
--Warning: Memcached::setBucket(): server map cannot be empty in %s on line %d
--bool(false)
--
--Warning: Memcached::setBucket() expects parameter 1 to be array, null given in %s on line %d
--NULL
--
--Warning: Memcached::setBucket(): the map must contain positive integers in %s on line %d
--bool(false)
- OK
-diff --git a/tests/vbucket_error_7.phpt b/tests/vbucket_error_7.phpt
-new file mode 100644
-index 0000000..286534a
---- /dev/null
-+++ b/tests/vbucket_error_7.phpt
-@@ -0,0 +1,40 @@
-+--TEST--
-+Memcached virtual buckets
-+--SKIPIF--
-+<?php
-+include dirname(__FILE__) . "/skipif.inc";
-+if (!defined("Memcached::DISTRIBUTION_VIRTUAL_BUCKET")) die ("skip DISTRIBUTION_VIRTUAL_BUCKET not defined");
-+if (PHP_VERSION_ID >= 80000) die("skip PHP 7 only");
-+?>
-+--FILE--
-+<?php
-+include dirname (__FILE__) . '/config.inc';
-+$m = memc_get_instance (array (
-+ Memcached::OPT_DISTRIBUTION => Memcached::DISTRIBUTION_VIRTUAL_BUCKET
-+ ));
-+
-+var_dump ($m->setBucket (array (), null, 2));
-+
-+var_dump ($m->setBucket (array (), array (), -1));
-+
-+var_dump ($m->setBucket (null, array (), -1));
-+
-+var_dump ($m->setBucket (array (-1), array (-1), 1));
-+
-+echo "OK\n";
-+
-+?>
-+--EXPECTF--
-+
-+Warning: Memcached::setBucket(): server map cannot be empty in %s on line %d
-+bool(false)
-+
-+Warning: Memcached::setBucket(): server map cannot be empty in %s on line %d
-+bool(false)
-+
-+Warning: Memcached::setBucket() expects parameter 1 to be array, null given in %s on line %d
-+NULL
-+
-+Warning: Memcached::setBucket(): the map must contain positive integers in %s on line %d
-+bool(false)
-+OK
-diff --git a/tests/vbucket_error_8.phpt b/tests/vbucket_error_8.phpt
-new file mode 100644
-index 0000000..c8af231
---- /dev/null
-+++ b/tests/vbucket_error_8.phpt
-@@ -0,0 +1,41 @@
-+--TEST--
-+Memcached virtual buckets
-+--SKIPIF--
-+<?php
-+include dirname(__FILE__) . "/skipif.inc";
-+if (!defined("Memcached::DISTRIBUTION_VIRTUAL_BUCKET")) die ("skip DISTRIBUTION_VIRTUAL_BUCKET not defined");
-+if (PHP_VERSION_ID < 80000) die("skip PHP 8 only");
-+?>
-+--FILE--
-+<?php
-+include dirname (__FILE__) . '/config.inc';
-+$m = memc_get_instance (array (
-+ Memcached::OPT_DISTRIBUTION => Memcached::DISTRIBUTION_VIRTUAL_BUCKET
-+ ));
-+
-+var_dump ($m->setBucket (array (), null, 2));
-+
-+var_dump ($m->setBucket (array (), array (), -1));
-+
-+try {
-+ var_dump ($m->setBucket (null, array (), -1));
-+} catch (TypeError $e) {
-+ echo $e->getMessage() . PHP_EOL;
-+}
-+
-+var_dump ($m->setBucket (array (-1), array (-1), 1));
-+
-+echo "OK\n";
-+
-+?>
-+--EXPECTF--
-+Warning: Memcached::setBucket(): server map cannot be empty in %s on line %d
-+bool(false)
-+
-+Warning: Memcached::setBucket(): server map cannot be empty in %s on line %d
-+bool(false)
-+Memcached::setBucket(): Argument #1 ($host_map) must be of type array, null given
-+
-+Warning: Memcached::setBucket(): the map must contain positive integers in %s on line %d
-+bool(false)
-+OK
-
-
-From baa6bfda6fbf4c1c75b5a7492db4cc40e6aa81f3 Mon Sep 17 00:00:00 2001
-From: Remi Collet <remi@remirepo.net>
-Date: Thu, 8 Oct 2020 13:45:49 +0200
-Subject: [PATCH] cleanup HAVE_SPL, removed in 8 as always there
-
----
- php_memcached.c | 13 ++++---------
- 1 file changed, 4 insertions(+), 9 deletions(-)
-
-diff --git a/php_memcached.c b/php_memcached.c
-index 147cb4a..8d9040e 100644
---- a/php_memcached.c
-+++ b/php_memcached.c
-@@ -55,6 +55,8 @@
- # include "ext/msgpack/php_msgpack.h"
- #endif
-
-+# include "ext/spl/spl_exceptions.h"
-+
- static int le_memc;
-
- static int php_memc_list_entry(void) {
-@@ -251,10 +253,6 @@ static zend_class_entry *memcached_ce = NULL;
- static zend_class_entry *memcached_exception_ce = NULL;
- static zend_object_handlers memcached_object_handlers;
-
--#ifdef HAVE_SPL
--static zend_class_entry *spl_ce_RuntimeException = NULL;
--#endif
--
- ZEND_DECLARE_MODULE_GLOBALS(php_memcached)
-
- #ifdef COMPILE_DL_MEMCACHED
-@@ -3764,7 +3762,6 @@ zend_class_entry *php_memc_get_exception(void)
- PHP_MEMCACHED_API
- zend_class_entry *php_memc_get_exception_base(int root)
- {
--#ifdef HAVE_SPL
- if (!root) {
- if (!spl_ce_RuntimeException) {
- zend_class_entry *pce;
-@@ -3781,7 +3778,7 @@ zend_class_entry *php_memc_get_exception_base(int root)
- return spl_ce_RuntimeException;
- }
- }
--#endif
-+
- return zend_exception_get_default();
- }
-
-@@ -3877,10 +3874,8 @@ static const zend_module_dep memcached_deps[] = {
- #ifdef HAVE_MEMCACHED_MSGPACK
- ZEND_MOD_REQUIRED("msgpack")
- #endif
--#ifdef HAVE_SPL
- ZEND_MOD_REQUIRED("spl")
--#endif
-- {NULL, NULL, NULL}
-+ ZEND_MOD_END
- };
- #endif
-
diff --git a/465.patch b/465.patch
deleted file mode 100644
index 7738012..0000000
--- a/465.patch
+++ /dev/null
@@ -1,67 +0,0 @@
-From 5b525dafa6aa759801832c5fd10c3734c5dde808 Mon Sep 17 00:00:00 2001
-From: Remi Collet <remi@remirepo.net>
-Date: Tue, 20 Oct 2020 09:42:14 +0200
-Subject: [PATCH] promote error "Memcached constructor was not called" to
- exception with PHP 8
-
----
- php_memcached.c | 11 +++++++++++
- tests/bad_construct_8.phpt | 12 +++++++-----
- 2 files changed, 18 insertions(+), 5 deletions(-)
-
-diff --git a/php_memcached.c b/php_memcached.c
-index d49b7d5..1e218a0 100644
---- a/php_memcached.c
-+++ b/php_memcached.c
-@@ -195,6 +195,7 @@ static inline php_memc_object_t *php_memc_fetch_object(zend_object *obj) {
- php_memc_object_t* intern = NULL; \
- php_memc_user_data_t* memc_user_data = NULL;
-
-+#if PHP_VERSION_ID < 80000
- #define MEMC_METHOD_FETCH_OBJECT \
- intern = Z_MEMC_OBJ_P(object); \
- if (!intern->memc) { \
-@@ -203,6 +204,16 @@ static inline php_memc_object_t *php_memc_fetch_object(zend_object *obj) {
- } \
- memc_user_data = (php_memc_user_data_t *) memcached_get_user_data(intern->memc); \
- (void)memc_user_data; /* avoid unused variable warning */
-+#else
-+#define MEMC_METHOD_FETCH_OBJECT \
-+ intern = Z_MEMC_OBJ_P(object); \
-+ if (!intern->memc) { \
-+ zend_throw_error(NULL, "Memcached constructor was not called"); \
-+ RETURN_THROWS(); \
-+ } \
-+ memc_user_data = (php_memc_user_data_t *) memcached_get_user_data(intern->memc); \
-+ (void)memc_user_data; /* avoid unused variable warning */
-+#endif
-
- static
- zend_bool s_memc_valid_key_binary(zend_string *key)
-diff --git a/tests/bad_construct_8.phpt b/tests/bad_construct_8.phpt
-index 81daa5a..10928cf 100644
---- a/tests/bad_construct_8.phpt
-+++ b/tests/bad_construct_8.phpt
-@@ -20,15 +20,17 @@ class extended extends Memcached {
- }
-
- error_reporting(E_ALL);
--$extended = new extended ();
--var_dump ($extended->setOption (Memcached::OPT_BINARY_PROTOCOL, true));
-+try {
-+ $extended = new extended ();
-+ var_dump ($extended->setOption (Memcached::OPT_BINARY_PROTOCOL, true));
-+} catch (Error $e) {
-+ echo $e->getMessage() . PHP_EOL;
-+}
-
- echo "OK" . PHP_EOL;
-
- --EXPECTF--
- Memcached::__construct(): Argument #1 ($persistent_id) must be of type ?string, stdClass given
--
--Warning: Memcached::setOption(): Memcached constructor was not called in %s
--NULL
-+Memcached constructor was not called
- OK
-
diff --git a/467.patch b/467.patch
deleted file mode 100644
index 15c6621..0000000
--- a/467.patch
+++ /dev/null
@@ -1,162 +0,0 @@
-From 5f345d140294c3619791f0980090df3683ad805e Mon Sep 17 00:00:00 2001
-From: Michael Wallner <mike@php.net>
-Date: Mon, 30 Nov 2020 13:50:36 +0100
-Subject: [PATCH] fix php8 arginfo
-
----
- php_memcached.stub.php | 14 +++++++-------
- php_memcached_arginfo.h | 28 ++++++++++++++--------------
- php_memcached_legacy_arginfo.h | 2 +-
- 3 files changed, 22 insertions(+), 22 deletions(-)
-
-diff --git a/php_memcached.stub.php b/php_memcached.stub.php
-index 4ba6d5b..e44ff4a 100644
---- a/php_memcached.stub.php
-+++ b/php_memcached.stub.php
-@@ -35,16 +35,16 @@ public function cas(string $cas_token, string $key, mixed $value, int $expiratio
- public function casByKey(string $cas_token, string $server_key, string $key, mixed $value, int $expiration=0): bool {}
- public function add(string $key, mixed $value, int $expiration=0): bool {}
- public function addByKey(string $server_key, string $key, mixed $value, int $expiration=0): bool {}
-- public function append(string $key, string $value): bool {}
-- public function appendByKey(string $server_key, string $key, string $value): bool {}
-- public function prepend(string $key, string $value): bool {}
-- public function prependByKey(string $server_key, string $key, string $value): bool {}
-+ public function append(string $key, string $value): ?bool {}
-+ public function appendByKey(string $server_key, string $key, string $value): ?bool {}
-+ public function prepend(string $key, string $value): ?bool {}
-+ public function prependByKey(string $server_key, string $key, string $value): ?bool {}
- public function replace(string $key, mixed $value, int $expiration=0): bool {}
- public function replaceByKey(string $server_key, string $key, mixed $value, int $expiration=0): bool {}
- public function delete(string $key, int $time=0): bool {}
-- public function deleteMulti(array $keys, int $time=0): bool {}
-+ public function deleteMulti(array $keys, int $time=0): array {}
- public function deleteByKey(string $server_key, string $key, int $time=0): bool {}
-- public function deleteMultiByKey(string $server_key, array $keys, int $time=0): bool {}
-+ public function deleteMultiByKey(string $server_key, array $keys, int $time=0): array {}
-
- public function increment(string $key, int $offset=1, int $initial_value=0, int $expiry=0): false|int {}
- public function decrement(string $key, int $offset=1, int $initial_value=0, int $expiry=0): false|int {}
-@@ -73,7 +73,7 @@ public function flush(int $delay=0): bool {}
- public function getOption(int $option): mixed {}
- public function setOption(int $option, mixed $value): bool {}
- public function setOptions(array $options): bool {}
-- public function setBucket(array $host_map, array $forward_map, int $replicas): bool {}
-+ public function setBucket(array $host_map, ?array $forward_map, int $replicas): bool {}
- #ifdef HAVE_MEMCACHED_SASL
- public function setSaslAuthData(string $username, string $password): bool {}
- #endif
-diff --git a/php_memcached_arginfo.h b/php_memcached_arginfo.h
-index 6729dd3..18b17cc 100644
---- a/php_memcached_arginfo.h
-+++ b/php_memcached_arginfo.h
-@@ -1,10 +1,10 @@
- /* This is a generated file, edit the .stub.php file instead.
-- * Stub hash: a33d23c6659922e98d3704879eb4bc820e1819df */
-+ * Stub hash: 3e5af769d67ce91bd713bb11b325a9ccaabbfb7a */
-
- ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Memcached___construct, 0, 0, 0)
-- ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, persistent_id, IS_STRING, 0, "NULL")
-- ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, callback, IS_CALLABLE, 0, "NULL")
-- ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, connection_str, IS_STRING, 0, "NULL")
-+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, persistent_id, IS_STRING, 1, "NULL")
-+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, callback, IS_CALLABLE, 1, "NULL")
-+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, connection_str, IS_STRING, 1, "NULL")
- ZEND_END_ARG_INFO()
-
- ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Memcached_getResultCode, 0, 0, IS_LONG, 0)
-@@ -15,14 +15,14 @@ ZEND_END_ARG_INFO()
-
- ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Memcached_get, 0, 1, IS_MIXED, 0)
- ZEND_ARG_TYPE_INFO(0, key, IS_STRING, 0)
-- ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, cache_cb, IS_CALLABLE, 0, "NULL")
-+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, cache_cb, IS_CALLABLE, 1, "NULL")
- ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, get_flags, IS_LONG, 0, "0")
- ZEND_END_ARG_INFO()
-
- ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Memcached_getByKey, 0, 2, IS_MIXED, 0)
- ZEND_ARG_TYPE_INFO(0, server_key, IS_STRING, 0)
- ZEND_ARG_TYPE_INFO(0, key, IS_STRING, 0)
-- ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, cache_cb, IS_CALLABLE, 0, "NULL")
-+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, cache_cb, IS_CALLABLE, 1, "NULL")
- ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, get_flags, IS_LONG, 0, "0")
- ZEND_END_ARG_INFO()
-
-@@ -40,14 +40,14 @@ ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Memcached_getDelayed, 0, 1, _IS_BOOL, 0)
- ZEND_ARG_TYPE_INFO(0, keys, IS_ARRAY, 0)
- ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, with_cas, _IS_BOOL, 0, "0")
-- ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, value_cb, IS_CALLABLE, 0, "NULL")
-+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, value_cb, IS_CALLABLE, 1, "NULL")
- ZEND_END_ARG_INFO()
-
- ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Memcached_getDelayedByKey, 0, 2, _IS_BOOL, 0)
- ZEND_ARG_TYPE_INFO(0, server_key, IS_STRING, 0)
- ZEND_ARG_TYPE_INFO(0, keys, IS_ARRAY, 0)
- ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, with_cas, _IS_BOOL, 0, "0")
-- ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, value_cb, IS_CALLABLE, 0, "NULL")
-+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, value_cb, IS_CALLABLE, 1, "NULL")
- ZEND_END_ARG_INFO()
-
- ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_class_Memcached_fetch, 0, 0, MAY_BE_FALSE|MAY_BE_ARRAY)
-@@ -109,12 +109,12 @@ ZEND_END_ARG_INFO()
-
- #define arginfo_class_Memcached_addByKey arginfo_class_Memcached_setByKey
-
--ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Memcached_append, 0, 2, _IS_BOOL, 0)
-+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Memcached_append, 0, 2, _IS_BOOL, 1)
- ZEND_ARG_TYPE_INFO(0, key, IS_STRING, 0)
- ZEND_ARG_TYPE_INFO(0, value, IS_STRING, 0)
- ZEND_END_ARG_INFO()
-
--ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Memcached_appendByKey, 0, 3, _IS_BOOL, 0)
-+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Memcached_appendByKey, 0, 3, _IS_BOOL, 1)
- ZEND_ARG_TYPE_INFO(0, server_key, IS_STRING, 0)
- ZEND_ARG_TYPE_INFO(0, key, IS_STRING, 0)
- ZEND_ARG_TYPE_INFO(0, value, IS_STRING, 0)
-@@ -133,7 +133,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Memcached_delete, 0, 1, _I
- ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, time, IS_LONG, 0, "0")
- ZEND_END_ARG_INFO()
-
--ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Memcached_deleteMulti, 0, 1, _IS_BOOL, 0)
-+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Memcached_deleteMulti, 0, 1, IS_ARRAY, 0)
- ZEND_ARG_TYPE_INFO(0, keys, IS_ARRAY, 0)
- ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, time, IS_LONG, 0, "0")
- ZEND_END_ARG_INFO()
-@@ -144,7 +144,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Memcached_deleteByKey, 0,
- ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, time, IS_LONG, 0, "0")
- ZEND_END_ARG_INFO()
-
--ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Memcached_deleteMultiByKey, 0, 2, _IS_BOOL, 0)
-+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Memcached_deleteMultiByKey, 0, 2, IS_ARRAY, 0)
- ZEND_ARG_TYPE_INFO(0, server_key, IS_STRING, 0)
- ZEND_ARG_TYPE_INFO(0, keys, IS_ARRAY, 0)
- ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, time, IS_LONG, 0, "0")
-@@ -202,7 +202,7 @@ ZEND_END_ARG_INFO()
- #define arginfo_class_Memcached_getLastDisconnectedServer arginfo_class_Memcached_fetch
-
- ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_class_Memcached_getStats, 0, 0, MAY_BE_FALSE|MAY_BE_ARRAY)
-- ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, type, IS_STRING, 0, "NULL")
-+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, type, IS_STRING, 1, "NULL")
- ZEND_END_ARG_INFO()
-
- #define arginfo_class_Memcached_getVersion arginfo_class_Memcached_fetch
-@@ -228,7 +228,7 @@ ZEND_END_ARG_INFO()
-
- ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Memcached_setBucket, 0, 3, _IS_BOOL, 0)
- ZEND_ARG_TYPE_INFO(0, host_map, IS_ARRAY, 0)
-- ZEND_ARG_TYPE_INFO(0, forward_map, IS_ARRAY, 0)
-+ ZEND_ARG_TYPE_INFO(0, forward_map, IS_ARRAY, 1)
- ZEND_ARG_TYPE_INFO(0, replicas, IS_LONG, 0)
- ZEND_END_ARG_INFO()
-
-diff --git a/php_memcached_legacy_arginfo.h b/php_memcached_legacy_arginfo.h
-index 6f21d2a..2c0b2de 100644
---- a/php_memcached_legacy_arginfo.h
-+++ b/php_memcached_legacy_arginfo.h
-@@ -1,5 +1,5 @@
- /* This is a generated file, edit the .stub.php file instead.
-- * Stub hash: a33d23c6659922e98d3704879eb4bc820e1819df */
-+ * Stub hash: 3e5af769d67ce91bd713bb11b325a9ccaabbfb7a */
-
- ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Memcached___construct, 0, 0, 0)
- ZEND_ARG_INFO(0, persistent_id)
diff --git a/468.patch b/468.patch
deleted file mode 100644
index 1b52707..0000000
--- a/468.patch
+++ /dev/null
@@ -1,70 +0,0 @@
-From d5b084479c74c33e054612fc6e7f969b6bab359e Mon Sep 17 00:00:00 2001
-From: Graham Campbell <GrahamCampbell@users.noreply.github.com>
-Date: Thu, 17 Dec 2020 17:20:08 +0000
-Subject: [PATCH 1/3] Fixed ParseError in stub file
-
----
- php_memcached.stub.php | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/php_memcached.stub.php b/php_memcached.stub.php
-index e44ff4a..e813ae7 100644
---- a/php_memcached.stub.php
-+++ b/php_memcached.stub.php
-@@ -17,7 +17,7 @@ public function get(string $key, callable $cache_cb=NULL, int $get_flags=0): mix
- public function getByKey(string $server_key, string $key, callable $cache_cb=NULL, int $get_flags=0): mixed {}
- public function getMulti(array $keys, int $get_flags=0): false|array {}
- public function getMultiByKey(string $server_key, array $keys, int $get_flags=0): false|array {}
-- public function getDelayed(array $keys, bool $with_cas=0, callable $value_cb=NULL): bool {}
-+ public function getDelayed(array $keys, bool $with_cas=FALSE, callable $value_cb=NULL): bool {}
- public function getDelayedByKey(string $server_key, array $keys, bool $with_cas=0, callable $value_cb=NULL): bool {}
- public function fetch(): false|array {}
- public function fetchAll(): false|array {}
-
-From 015d7c6705a2b0b26d539939cf792b4ef99c431a Mon Sep 17 00:00:00 2001
-From: Graham Campbell <GrahamCampbell@users.noreply.github.com>
-Date: Thu, 17 Dec 2020 17:22:33 +0000
-Subject: [PATCH 2/3] Update php_memcached.stub.php
-
----
- php_memcached.stub.php | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/php_memcached.stub.php b/php_memcached.stub.php
-index e813ae7..836dff7 100644
---- a/php_memcached.stub.php
-+++ b/php_memcached.stub.php
-@@ -18,7 +18,7 @@ public function getByKey(string $server_key, string $key, callable $cache_cb=NUL
- public function getMulti(array $keys, int $get_flags=0): false|array {}
- public function getMultiByKey(string $server_key, array $keys, int $get_flags=0): false|array {}
- public function getDelayed(array $keys, bool $with_cas=FALSE, callable $value_cb=NULL): bool {}
-- public function getDelayedByKey(string $server_key, array $keys, bool $with_cas=0, callable $value_cb=NULL): bool {}
-+ public function getDelayedByKey(string $server_key, array $keys, bool $with_cas=FALSE, callable $value_cb=NULL): bool {}
- public function fetch(): false|array {}
- public function fetchAll(): false|array {}
-
-
-From fafaf7fc6533cc5d48d784d0d2661338ab81b4c0 Mon Sep 17 00:00:00 2001
-From: Graham Campbell <graham@alt-three.com>
-Date: Thu, 17 Dec 2020 17:24:51 +0000
-Subject: [PATCH 3/3] Match PHP 7 version of the file
-
----
- php_memcached.stub.php | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/php_memcached.stub.php b/php_memcached.stub.php
-index 836dff7..6b84c5b 100644
---- a/php_memcached.stub.php
-+++ b/php_memcached.stub.php
-@@ -17,8 +17,8 @@ public function get(string $key, callable $cache_cb=NULL, int $get_flags=0): mix
- public function getByKey(string $server_key, string $key, callable $cache_cb=NULL, int $get_flags=0): mixed {}
- public function getMulti(array $keys, int $get_flags=0): false|array {}
- public function getMultiByKey(string $server_key, array $keys, int $get_flags=0): false|array {}
-- public function getDelayed(array $keys, bool $with_cas=FALSE, callable $value_cb=NULL): bool {}
-- public function getDelayedByKey(string $server_key, array $keys, bool $with_cas=FALSE, callable $value_cb=NULL): bool {}
-+ public function getDelayed(array $keys, bool $with_cas=NULL, callable $value_cb=NULL): bool {}
-+ public function getDelayedByKey(string $server_key, array $keys, bool $with_cas=NULL, callable $value_cb=NULL): bool {}
- public function fetch(): false|array {}
- public function fetchAll(): false|array {}
-
diff --git a/469.patch b/469.patch
deleted file mode 100644
index 9644ab5..0000000
--- a/469.patch
+++ /dev/null
@@ -1,86 +0,0 @@
-From 034d6e89121de79fd022bfef0ed2c273588fbfcf Mon Sep 17 00:00:00 2001
-From: Graham Campbell <graham@alt-three.com>
-Date: Fri, 18 Dec 2020 19:25:59 +0000
-Subject: [PATCH] Re-generated .h files after stubs were modified
-
----
- php_memcached_arginfo.h | 22 +++++++++++-----------
- php_memcached_legacy_arginfo.h | 2 +-
- 2 files changed, 12 insertions(+), 12 deletions(-)
-
-diff --git a/php_memcached_arginfo.h b/php_memcached_arginfo.h
-index 18b17cc..6b05cf4 100644
---- a/php_memcached_arginfo.h
-+++ b/php_memcached_arginfo.h
-@@ -1,10 +1,10 @@
- /* This is a generated file, edit the .stub.php file instead.
-- * Stub hash: 3e5af769d67ce91bd713bb11b325a9ccaabbfb7a */
-+ * Stub hash: 8ce11ff45ccb2b1c765e5f313305f539ca3fa4f6 */
-
- ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Memcached___construct, 0, 0, 0)
-- ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, persistent_id, IS_STRING, 1, "NULL")
-- ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, callback, IS_CALLABLE, 1, "NULL")
-- ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, connection_str, IS_STRING, 1, "NULL")
-+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, persistent_id, IS_STRING, 0, "NULL")
-+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, callback, IS_CALLABLE, 0, "NULL")
-+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, connection_str, IS_STRING, 0, "NULL")
- ZEND_END_ARG_INFO()
-
- ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Memcached_getResultCode, 0, 0, IS_LONG, 0)
-@@ -15,14 +15,14 @@ ZEND_END_ARG_INFO()
-
- ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Memcached_get, 0, 1, IS_MIXED, 0)
- ZEND_ARG_TYPE_INFO(0, key, IS_STRING, 0)
-- ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, cache_cb, IS_CALLABLE, 1, "NULL")
-+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, cache_cb, IS_CALLABLE, 0, "NULL")
- ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, get_flags, IS_LONG, 0, "0")
- ZEND_END_ARG_INFO()
-
- ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Memcached_getByKey, 0, 2, IS_MIXED, 0)
- ZEND_ARG_TYPE_INFO(0, server_key, IS_STRING, 0)
- ZEND_ARG_TYPE_INFO(0, key, IS_STRING, 0)
-- ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, cache_cb, IS_CALLABLE, 1, "NULL")
-+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, cache_cb, IS_CALLABLE, 0, "NULL")
- ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, get_flags, IS_LONG, 0, "0")
- ZEND_END_ARG_INFO()
-
-@@ -39,15 +39,15 @@ ZEND_END_ARG_INFO()
-
- ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Memcached_getDelayed, 0, 1, _IS_BOOL, 0)
- ZEND_ARG_TYPE_INFO(0, keys, IS_ARRAY, 0)
-- ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, with_cas, _IS_BOOL, 0, "0")
-- ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, value_cb, IS_CALLABLE, 1, "NULL")
-+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, with_cas, _IS_BOOL, 0, "NULL")
-+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, value_cb, IS_CALLABLE, 0, "NULL")
- ZEND_END_ARG_INFO()
-
- ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Memcached_getDelayedByKey, 0, 2, _IS_BOOL, 0)
- ZEND_ARG_TYPE_INFO(0, server_key, IS_STRING, 0)
- ZEND_ARG_TYPE_INFO(0, keys, IS_ARRAY, 0)
-- ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, with_cas, _IS_BOOL, 0, "0")
-- ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, value_cb, IS_CALLABLE, 1, "NULL")
-+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, with_cas, _IS_BOOL, 0, "NULL")
-+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, value_cb, IS_CALLABLE, 0, "NULL")
- ZEND_END_ARG_INFO()
-
- ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_class_Memcached_fetch, 0, 0, MAY_BE_FALSE|MAY_BE_ARRAY)
-@@ -202,7 +202,7 @@ ZEND_END_ARG_INFO()
- #define arginfo_class_Memcached_getLastDisconnectedServer arginfo_class_Memcached_fetch
-
- ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_class_Memcached_getStats, 0, 0, MAY_BE_FALSE|MAY_BE_ARRAY)
-- ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, type, IS_STRING, 1, "NULL")
-+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, type, IS_STRING, 0, "NULL")
- ZEND_END_ARG_INFO()
-
- #define arginfo_class_Memcached_getVersion arginfo_class_Memcached_fetch
-diff --git a/php_memcached_legacy_arginfo.h b/php_memcached_legacy_arginfo.h
-index 2c0b2de..c942616 100644
---- a/php_memcached_legacy_arginfo.h
-+++ b/php_memcached_legacy_arginfo.h
-@@ -1,5 +1,5 @@
- /* This is a generated file, edit the .stub.php file instead.
-- * Stub hash: 3e5af769d67ce91bd713bb11b325a9ccaabbfb7a */
-+ * Stub hash: 8ce11ff45ccb2b1c765e5f313305f539ca3fa4f6 */
-
- ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Memcached___construct, 0, 0, 0)
- ZEND_ARG_INFO(0, persistent_id)
diff --git a/472.patch b/472.patch
deleted file mode 100644
index 78afdf4..0000000
--- a/472.patch
+++ /dev/null
@@ -1,123 +0,0 @@
-From a92bf68eeed33392f0a117aec9750ad4c7b4358c Mon Sep 17 00:00:00 2001
-From: Michael Wallner <mike@php.net>
-Date: Mon, 18 Jan 2021 14:24:28 +0100
-Subject: [PATCH] fix php8 arginfo
-
----
- php_memcached.stub.php | 12 ++++++------
- php_memcached_arginfo.h | 22 +++++++++++-----------
- php_memcached_legacy_arginfo.h | 2 +-
- 3 files changed, 18 insertions(+), 18 deletions(-)
-
-diff --git a/php_memcached.stub.php b/php_memcached.stub.php
-index 6b84c5b..5a735b5 100644
---- a/php_memcached.stub.php
-+++ b/php_memcached.stub.php
-@@ -8,17 +8,17 @@
-
- class Memcached {
-
-- public function __construct(string $persistent_id=NULL, callable $callback=NULL, string $connection_str=NULL) {}
-+ public function __construct(string $persistent_id=null, callable $callback=null, string $connection_str=null) {}
-
- public function getResultCode(): int {}
- public function getResultMessage(): string {}
-
-- public function get(string $key, callable $cache_cb=NULL, int $get_flags=0): mixed {}
-- public function getByKey(string $server_key, string $key, callable $cache_cb=NULL, int $get_flags=0): mixed {}
-+ public function get(string $key, callable $cache_cb=null, int $get_flags=0): mixed {}
-+ public function getByKey(string $server_key, string $key, callable $cache_cb=null, int $get_flags=0): mixed {}
- public function getMulti(array $keys, int $get_flags=0): false|array {}
- public function getMultiByKey(string $server_key, array $keys, int $get_flags=0): false|array {}
-- public function getDelayed(array $keys, bool $with_cas=NULL, callable $value_cb=NULL): bool {}
-- public function getDelayedByKey(string $server_key, array $keys, bool $with_cas=NULL, callable $value_cb=NULL): bool {}
-+ public function getDelayed(array $keys, bool $with_cas=false, callable $value_cb=null): bool {}
-+ public function getDelayedByKey(string $server_key, array $keys, bool $with_cas=false, callable $value_cb=null): bool {}
- public function fetch(): false|array {}
- public function fetchAll(): false|array {}
-
-@@ -64,7 +64,7 @@ public function getLastErrorCode(): int {}
- public function getLastErrorErrno(): int {}
- public function getLastDisconnectedServer(): false|array {}
-
-- public function getStats(string $type=NULL): false|array {}
-+ public function getStats(string $type=null): false|array {}
- public function getVersion(): false|array {}
- public function getAllKeys(): false|array {}
-
-diff --git a/php_memcached_arginfo.h b/php_memcached_arginfo.h
-index 6b05cf4..4c8a684 100644
---- a/php_memcached_arginfo.h
-+++ b/php_memcached_arginfo.h
-@@ -1,10 +1,10 @@
- /* This is a generated file, edit the .stub.php file instead.
-- * Stub hash: 8ce11ff45ccb2b1c765e5f313305f539ca3fa4f6 */
-+ * Stub hash: 573d35c5c6b6c397943e0f8ab9c505e2f4ce9e34 */
-
- ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Memcached___construct, 0, 0, 0)
-- ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, persistent_id, IS_STRING, 0, "NULL")
-- ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, callback, IS_CALLABLE, 0, "NULL")
-- ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, connection_str, IS_STRING, 0, "NULL")
-+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, persistent_id, IS_STRING, 1, "null")
-+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, callback, IS_CALLABLE, 1, "null")
-+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, connection_str, IS_STRING, 1, "null")
- ZEND_END_ARG_INFO()
-
- ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Memcached_getResultCode, 0, 0, IS_LONG, 0)
-@@ -15,14 +15,14 @@ ZEND_END_ARG_INFO()
-
- ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Memcached_get, 0, 1, IS_MIXED, 0)
- ZEND_ARG_TYPE_INFO(0, key, IS_STRING, 0)
-- ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, cache_cb, IS_CALLABLE, 0, "NULL")
-+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, cache_cb, IS_CALLABLE, 1, "null")
- ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, get_flags, IS_LONG, 0, "0")
- ZEND_END_ARG_INFO()
-
- ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Memcached_getByKey, 0, 2, IS_MIXED, 0)
- ZEND_ARG_TYPE_INFO(0, server_key, IS_STRING, 0)
- ZEND_ARG_TYPE_INFO(0, key, IS_STRING, 0)
-- ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, cache_cb, IS_CALLABLE, 0, "NULL")
-+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, cache_cb, IS_CALLABLE, 1, "null")
- ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, get_flags, IS_LONG, 0, "0")
- ZEND_END_ARG_INFO()
-
-@@ -39,15 +39,15 @@ ZEND_END_ARG_INFO()
-
- ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Memcached_getDelayed, 0, 1, _IS_BOOL, 0)
- ZEND_ARG_TYPE_INFO(0, keys, IS_ARRAY, 0)
-- ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, with_cas, _IS_BOOL, 0, "NULL")
-- ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, value_cb, IS_CALLABLE, 0, "NULL")
-+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, with_cas, _IS_BOOL, 0, "false")
-+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, value_cb, IS_CALLABLE, 1, "null")
- ZEND_END_ARG_INFO()
-
- ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Memcached_getDelayedByKey, 0, 2, _IS_BOOL, 0)
- ZEND_ARG_TYPE_INFO(0, server_key, IS_STRING, 0)
- ZEND_ARG_TYPE_INFO(0, keys, IS_ARRAY, 0)
-- ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, with_cas, _IS_BOOL, 0, "NULL")
-- ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, value_cb, IS_CALLABLE, 0, "NULL")
-+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, with_cas, _IS_BOOL, 0, "false")
-+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, value_cb, IS_CALLABLE, 1, "null")
- ZEND_END_ARG_INFO()
-
- ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_class_Memcached_fetch, 0, 0, MAY_BE_FALSE|MAY_BE_ARRAY)
-@@ -202,7 +202,7 @@ ZEND_END_ARG_INFO()
- #define arginfo_class_Memcached_getLastDisconnectedServer arginfo_class_Memcached_fetch
-
- ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_class_Memcached_getStats, 0, 0, MAY_BE_FALSE|MAY_BE_ARRAY)
-- ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, type, IS_STRING, 0, "NULL")
-+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, type, IS_STRING, 1, "null")
- ZEND_END_ARG_INFO()
-
- #define arginfo_class_Memcached_getVersion arginfo_class_Memcached_fetch
-diff --git a/php_memcached_legacy_arginfo.h b/php_memcached_legacy_arginfo.h
-index c942616..a615e3a 100644
---- a/php_memcached_legacy_arginfo.h
-+++ b/php_memcached_legacy_arginfo.h
-@@ -1,5 +1,5 @@
- /* This is a generated file, edit the .stub.php file instead.
-- * Stub hash: 8ce11ff45ccb2b1c765e5f313305f539ca3fa4f6 */
-+ * Stub hash: 573d35c5c6b6c397943e0f8ab9c505e2f4ce9e34 */
-
- ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Memcached___construct, 0, 0, 0)
- ZEND_ARG_INFO(0, persistent_id)
diff --git a/473.patch b/473.patch
deleted file mode 100644
index d018942..0000000
--- a/473.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From 74c0e38fa5eb8d37e7789f46b8f9cf4ed37cd375 Mon Sep 17 00:00:00 2001
-From: Remi Collet <remi@remirepo.net>
-Date: Mon, 18 Jan 2021 16:34:40 +0100
-Subject: [PATCH] missing header for inet_ntoa
-
----
- config.m4 | 2 ++
- php_memcached_server.c | 3 +++
- 2 files changed, 5 insertions(+)
-
-diff --git a/config.m4 b/config.m4
-index c7a15f1..b54a12d 100644
---- a/config.m4
-+++ b/config.m4
-@@ -392,6 +392,8 @@ if test "$PHP_MEMCACHED" != "no"; then
-
- CFLAGS="$ORIG_CFLAGS"
-
-+ AC_CHECK_HEADERS([arpa/inet.h])
-+
- export PKG_CONFIG_PATH="$ORIG_PKG_CONFIG_PATH"
- PHP_SUBST(MEMCACHED_SHARED_LIBADD)
-
-diff --git a/php_memcached_server.c b/php_memcached_server.c
-index 870209c..83bd15e 100644
---- a/php_memcached_server.c
-+++ b/php_memcached_server.c
-@@ -17,6 +17,9 @@
- #include "php_memcached.h"
- #include "php_memcached_private.h"
- #include "php_memcached_server.h"
-+#if HAVE_ARPA_INET_H
-+#include <arpa/inet.h>
-+#endif
-
- #include <event2/listener.h>
-
diff --git a/486.patch b/486.patch
deleted file mode 100644
index d98d572..0000000
--- a/486.patch
+++ /dev/null
@@ -1,105 +0,0 @@
-From b473c220a367360e821c23434456d4011909ba8d Mon Sep 17 00:00:00 2001
-From: Remi Collet <remi@remirepo.net>
-Date: Wed, 9 Jun 2021 14:29:34 +0200
-Subject: [PATCH 1/2] fix parameter count
-
----
- php_memcached.c | 12 ++++++------
- 1 file changed, 6 insertions(+), 6 deletions(-)
-
-diff --git a/php_memcached.c b/php_memcached.c
-index 1e218a00..ba2459c0 100644
---- a/php_memcached.c
-+++ b/php_memcached.c
-@@ -1875,16 +1875,16 @@ static void php_memc_setMulti_impl(INTERNAL_FUNCTION_PARAMETERS, zend_bool by_ke
- MEMC_METHOD_INIT_VARS;
-
- if (by_key) {
-- /* "Sa|ll" */
-- ZEND_PARSE_PARAMETERS_START(2, 4)
-+ /* "Sa|l" */
-+ ZEND_PARSE_PARAMETERS_START(2, 3)
- Z_PARAM_STR(server_key)
- Z_PARAM_ARRAY(entries)
- Z_PARAM_OPTIONAL
- Z_PARAM_LONG(expiration)
- ZEND_PARSE_PARAMETERS_END();
- } else {
-- /* "a|ll" */
-- ZEND_PARSE_PARAMETERS_START(1, 3)
-+ /* "a|l" */
-+ ZEND_PARSE_PARAMETERS_START(1, 2)
- Z_PARAM_ARRAY(entries)
- Z_PARAM_OPTIONAL
- Z_PARAM_LONG(expiration)
-@@ -2090,7 +2090,7 @@ static void php_memc_cas_impl(INTERNAL_FUNCTION_PARAMETERS, zend_bool by_key)
-
- if (by_key) {
- /* "zSSz|ll" */
-- ZEND_PARSE_PARAMETERS_START(4, 6)
-+ ZEND_PARSE_PARAMETERS_START(4, 4)
- Z_PARAM_ZVAL(zv_cas)
- Z_PARAM_STR(server_key)
- Z_PARAM_STR(key)
-@@ -2100,7 +2100,7 @@ static void php_memc_cas_impl(INTERNAL_FUNCTION_PARAMETERS, zend_bool by_key)
- ZEND_PARSE_PARAMETERS_END();
- } else {
- /* "zSz|ll" */
-- ZEND_PARSE_PARAMETERS_START(3, 5)
-+ ZEND_PARSE_PARAMETERS_START(3, 4)
- Z_PARAM_ZVAL(zv_cas)
- Z_PARAM_STR(key)
- Z_PARAM_ZVAL(value)
-
-From 6971eea88a6b9c0797d70c0dd4b0491acbb825eb Mon Sep 17 00:00:00 2001
-From: Remi Collet <remi@remirepo.net>
-Date: Wed, 9 Jun 2021 14:30:12 +0200
-Subject: [PATCH 2/2] fix test for PHP 8.1
-
----
- tests/undefined_set.phpt | 21 ++++++++-------------
- 1 file changed, 8 insertions(+), 13 deletions(-)
-
-diff --git a/tests/undefined_set.phpt b/tests/undefined_set.phpt
-index caeda19d..581c9406 100644
---- a/tests/undefined_set.phpt
-+++ b/tests/undefined_set.phpt
-@@ -10,30 +10,25 @@ $m = memc_get_instance ();
- $key = 'foobarbazDEADC0DE';
- $value = array('foo' => 'bar');
-
--$rv = $m->set($no_key, $value, 360);
-+// silent to hide:
-+// Warning: Undefined variable
-+// Deprecated: Memcached::set(): Passing null to parameter (PHP 8.1)
-+
-+$rv = @$m->set($no_key, $value, 360);
- var_dump($rv);
-
-
--$rv = $m->set($key, $no_value, 360);
-+$rv = @$m->set($key, $no_value, 360);
- var_dump($rv);
-
--$rv = $m->set($no_key, $no_value, 360);
-+$rv = @$m->set($no_key, $no_value, 360);
- var_dump($rv);
-
--$rv = $m->set($key, $value, $no_time);
-+$rv = @$m->set($key, $value, $no_time);
- var_dump($rv);
- ?>
- --EXPECTF--
--%s: Undefined variable%sno_key in %s
- bool(false)
--
--%s: Undefined variable%sno_value in %s
- bool(true)
--
--%s: Undefined variable%sno_key in %s
--
--%s: Undefined variable%sno_value in %s
- bool(false)
--
--%s: Undefined variable%sno_time in %s
- bool(true)
diff --git a/487.patch b/487.patch
deleted file mode 100644
index 97761f4..0000000
--- a/487.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 70ec7c2717deeeb03c8ca49fa36860b7f2476eb3 Mon Sep 17 00:00:00 2001
-From: Remi Collet <remi@remirepo.net>
-Date: Fri, 23 Jul 2021 12:00:19 +0200
-Subject: [PATCH] fix zend_dtoa API change in 8.1.0beta1
-
----
- g_fmt.c | 9 +++++++--
- 1 file changed, 7 insertions(+), 2 deletions(-)
-
-diff --git a/g_fmt.c b/g_fmt.c
-index 73f82fd0..f456790c 100644
---- a/g_fmt.c
-+++ b/g_fmt.c
-@@ -27,12 +27,17 @@
- * // Teddy Grenman <teddy.grenman@iki.fi>, 2010-05-18.
- */
-
--#include <zend_operators.h>
-+#include <php.h>
-
- char *php_memcached_g_fmt(register char *b, double x) {
- register int i, k;
- register char *s;
-- int decpt, j, sign;
-+ int decpt, j;
-+#if PHP_VERSION_ID < 80100
-+ int sign;
-+#else
-+ bool sign;
-+#endif
- char *b0, *s0, *se;
-
- b0 = b;
diff --git a/PHPINFO b/PHPINFO
index 3f944ce..116427c 100644
--- a/PHPINFO
+++ b/PHPINFO
@@ -2,8 +2,9 @@
memcached
memcached support => enabled
-Version => 3.1.5
-libmemcached-awesome version => 1.1.0
+Version => 3.2.0
+libmemcached-awesome headers version => 1.1.2
+libmemcached-awesome library version => 1.1.4
SASL support => yes
Session support => yes
igbinary support => yes
@@ -34,7 +35,7 @@ memcached.compression_type => fastlz => fastlz
memcached.compression_factor => 1.3 => 1.3
memcached.compression_threshold => 2000 => 2000
memcached.serializer => igbinary => igbinary
-memcached.store_retry_count => 2 => 2
+memcached.store_retry_count => 0 => 0
memcached.default_consistent_hash => Off => Off
memcached.default_binary_protocol => Off => Off
memcached.default_connect_timeout => 0 => 0
diff --git a/REFLECTION b/REFLECTION
index 86e8a82..e3efdf0 100644
--- a/REFLECTION
+++ b/REFLECTION
@@ -1,9 +1,10 @@
-Extension [ <persistent> extension #116 memcached version 3.1.5 ] {
+Extension [ <persistent> extension #72 memcached version 3.2.0 ] {
- Dependencies {
Dependency [ session (Required) ]
Dependency [ igbinary (Required) ]
Dependency [ msgpack (Required) ]
+ Dependency [ spl (Required) ]
}
- INI {
@@ -77,7 +78,7 @@ Extension [ <persistent> extension #116 memcached version 3.1.5 ] {
Current = 'igbinary'
}
Entry [ memcached.store_retry_count <ALL> ]
- Current = '2'
+ Current = '0'
}
Entry [ memcached.default_consistent_hash <ALL> ]
Current = '0'
@@ -93,8 +94,8 @@ Extension [ <persistent> extension #116 memcached version 3.1.5 ] {
- Classes [3] {
Class [ <internal:memcached> class Memcached ] {
- - Constants [133] {
- Constant [ public int LIBMEMCACHED_VERSION_HEX ] { 16781312 }
+ - Constants [146] {
+ Constant [ public int LIBMEMCACHED_VERSION_HEX ] { 16781314 }
Constant [ public int OPT_COMPRESSION ] { -1001 }
Constant [ public int OPT_COMPRESSION_TYPE ] { -1004 }
Constant [ public int OPT_PREFIX_KEY ] { -1002 }
@@ -151,31 +152,44 @@ Extension [ <persistent> extension #116 memcached version 3.1.5 ] {
Constant [ public int RES_SUCCESS ] { 0 }
Constant [ public int RES_FAILURE ] { 1 }
Constant [ public int RES_HOST_LOOKUP_FAILURE ] { 2 }
+ Constant [ public int RES_CONNECTION_FAILURE ] { 3 }
+ Constant [ public int RES_CONNECTION_BIND_FAILURE ] { 4 }
+ Constant [ public int RES_WRITE_FAILURE ] { 5 }
+ Constant [ public int RES_READ_FAILURE ] { 6 }
Constant [ public int RES_UNKNOWN_READ_FAILURE ] { 7 }
Constant [ public int RES_PROTOCOL_ERROR ] { 8 }
Constant [ public int RES_CLIENT_ERROR ] { 9 }
Constant [ public int RES_SERVER_ERROR ] { 10 }
- Constant [ public int RES_WRITE_FAILURE ] { 5 }
Constant [ public int RES_DATA_EXISTS ] { 12 }
+ Constant [ public int RES_DATA_DOES_NOT_EXIST ] { 13 }
Constant [ public int RES_NOTSTORED ] { 14 }
+ Constant [ public int RES_STORED ] { 15 }
Constant [ public int RES_NOTFOUND ] { 16 }
Constant [ public int RES_PARTIAL_READ ] { 18 }
Constant [ public int RES_SOME_ERRORS ] { 19 }
Constant [ public int RES_NO_SERVERS ] { 20 }
Constant [ public int RES_END ] { 21 }
- Constant [ public int RES_ERRNO ] { 26 }
- Constant [ public int RES_BUFFERED ] { 32 }
- Constant [ public int RES_TIMEOUT ] { 31 }
- Constant [ public int RES_BAD_KEY_PROVIDED ] { 33 }
- Constant [ public int RES_STORED ] { 15 }
Constant [ public int RES_DELETED ] { 22 }
+ Constant [ public int RES_VALUE ] { 23 }
Constant [ public int RES_STAT ] { 24 }
Constant [ public int RES_ITEM ] { 25 }
+ Constant [ public int RES_ERRNO ] { 26 }
+ Constant [ public int RES_FAIL_UNIX_SOCKET ] { 27 }
Constant [ public int RES_NOT_SUPPORTED ] { 28 }
+ Constant [ public int RES_NO_KEY_PROVIDED ] { 29 }
Constant [ public int RES_FETCH_NOTFINISHED ] { 30 }
+ Constant [ public int RES_TIMEOUT ] { 31 }
+ Constant [ public int RES_BUFFERED ] { 32 }
+ Constant [ public int RES_BAD_KEY_PROVIDED ] { 33 }
+ Constant [ public int RES_INVALID_HOST_PROTOCOL ] { 34 }
Constant [ public int RES_SERVER_MARKED_DEAD ] { 35 }
Constant [ public int RES_UNKNOWN_STAT_KEY ] { 36 }
- Constant [ public int RES_INVALID_HOST_PROTOCOL ] { 34 }
+ Constant [ public int RES_INVALID_ARGUMENTS ] { 38 }
+ Constant [ public int RES_PARSE_ERROR ] { 43 }
+ Constant [ public int RES_PARSE_USER_ERROR ] { 44 }
+ Constant [ public int RES_DEPRECATED ] { 45 }
+ Constant [ public int RES_IN_PROGRESS ] { 46 }
+ Constant [ public int RES_MAXIMUM_RETURN ] { 49 }
Constant [ public int RES_MEMORY_ALLOCATION_FAILURE ] { 17 }
Constant [ public int RES_CONNECTION_SOCKET_CREATE_FAILURE ] { 11 }
Constant [ public int RES_E2BIG ] { 37 }
@@ -238,12 +252,13 @@ Extension [ <persistent> extension #116 memcached version 3.1.5 ] {
- Properties [0] {
}
- - Methods [58] {
+ - Methods [59] {
Method [ <internal:memcached, ctor> public method __construct ] {
- - Parameters [2] {
- Parameter #0 [ <optional> $persistent_id ]
- Parameter #1 [ <optional> $callback ]
+ - Parameters [3] {
+ Parameter #0 [ <optional> ?string $persistent_id = null ]
+ Parameter #1 [ <optional> ?callable $callback = null ]
+ Parameter #2 [ <optional> ?string $connection_str = null ]
}
}
@@ -251,310 +266,345 @@ Extension [ <persistent> extension #116 memcached version 3.1.5 ] {
- Parameters [0] {
}
+ - Return [ int ]
}
Method [ <internal:memcached> public method getResultMessage ] {
- Parameters [0] {
}
+ - Return [ string ]
}
Method [ <internal:memcached> public method get ] {
- Parameters [3] {
- Parameter #0 [ <required> $key ]
- Parameter #1 [ <optional> $cache_cb ]
- Parameter #2 [ <optional> $get_flags ]
+ Parameter #0 [ <required> string $key ]
+ Parameter #1 [ <optional> ?callable $cache_cb = null ]
+ Parameter #2 [ <optional> int $get_flags = 0 ]
}
+ - Return [ mixed ]
}
Method [ <internal:memcached> public method getByKey ] {
- Parameters [4] {
- Parameter #0 [ <required> $server_key ]
- Parameter #1 [ <required> $key ]
- Parameter #2 [ <optional> $cache_cb ]
- Parameter #3 [ <optional> $get_flags ]
+ Parameter #0 [ <required> string $server_key ]
+ Parameter #1 [ <required> string $key ]
+ Parameter #2 [ <optional> ?callable $cache_cb = null ]
+ Parameter #3 [ <optional> int $get_flags = 0 ]
}
+ - Return [ mixed ]
}
Method [ <internal:memcached> public method getMulti ] {
- Parameters [2] {
Parameter #0 [ <required> array $keys ]
- Parameter #1 [ <optional> $get_flags ]
+ Parameter #1 [ <optional> int $get_flags = 0 ]
}
+ - Return [ array|false ]
}
Method [ <internal:memcached> public method getMultiByKey ] {
- Parameters [3] {
- Parameter #0 [ <required> $server_key ]
+ Parameter #0 [ <required> string $server_key ]
Parameter #1 [ <required> array $keys ]
- Parameter #2 [ <optional> $get_flags ]
+ Parameter #2 [ <optional> int $get_flags = 0 ]
}
+ - Return [ array|false ]
}
Method [ <internal:memcached> public method getDelayed ] {
- Parameters [3] {
Parameter #0 [ <required> array $keys ]
- Parameter #1 [ <optional> $with_cas ]
- Parameter #2 [ <optional> $value_cb ]
+ Parameter #1 [ <optional> bool $with_cas = false ]
+ Parameter #2 [ <optional> ?callable $value_cb = null ]
}
+ - Return [ bool ]
}
Method [ <internal:memcached> public method getDelayedByKey ] {
- Parameters [4] {
- Parameter #0 [ <required> $server_key ]
+ Parameter #0 [ <required> string $server_key ]
Parameter #1 [ <required> array $keys ]
- Parameter #2 [ <optional> $with_cas ]
- Parameter #3 [ <optional> $value_cb ]
+ Parameter #2 [ <optional> bool $with_cas = false ]
+ Parameter #3 [ <optional> ?callable $value_cb = null ]
}
+ - Return [ bool ]
}
Method [ <internal:memcached> public method fetch ] {
- Parameters [0] {
}
+ - Return [ array|false ]
}
Method [ <internal:memcached> public method fetchAll ] {
- Parameters [0] {
}
+ - Return [ array|false ]
}
Method [ <internal:memcached> public method set ] {
- Parameters [3] {
- Parameter #0 [ <required> $key ]
- Parameter #1 [ <required> $value ]
- Parameter #2 [ <optional> $expiration ]
+ Parameter #0 [ <required> string $key ]
+ Parameter #1 [ <required> mixed $value ]
+ Parameter #2 [ <optional> int $expiration = 0 ]
}
+ - Return [ bool ]
}
Method [ <internal:memcached> public method setByKey ] {
- Parameters [4] {
- Parameter #0 [ <required> $server_key ]
- Parameter #1 [ <required> $key ]
- Parameter #2 [ <required> $value ]
- Parameter #3 [ <optional> $expiration ]
+ Parameter #0 [ <required> string $server_key ]
+ Parameter #1 [ <required> string $key ]
+ Parameter #2 [ <required> mixed $value ]
+ Parameter #3 [ <optional> int $expiration = 0 ]
}
+ - Return [ bool ]
}
Method [ <internal:memcached> public method touch ] {
- Parameters [2] {
- Parameter #0 [ <required> $key ]
- Parameter #1 [ <required> $expiration ]
+ Parameter #0 [ <required> string $key ]
+ Parameter #1 [ <optional> int $expiration = 0 ]
}
+ - Return [ bool ]
}
Method [ <internal:memcached> public method touchByKey ] {
- Parameters [3] {
- Parameter #0 [ <required> $server_key ]
- Parameter #1 [ <required> $key ]
- Parameter #2 [ <required> $expiration ]
+ Parameter #0 [ <required> string $server_key ]
+ Parameter #1 [ <required> string $key ]
+ Parameter #2 [ <optional> int $expiration = 0 ]
}
+ - Return [ bool ]
}
Method [ <internal:memcached> public method setMulti ] {
- Parameters [2] {
Parameter #0 [ <required> array $items ]
- Parameter #1 [ <optional> $expiration ]
+ Parameter #1 [ <optional> int $expiration = 0 ]
}
+ - Return [ bool ]
}
Method [ <internal:memcached> public method setMultiByKey ] {
- Parameters [3] {
- Parameter #0 [ <required> $server_key ]
+ Parameter #0 [ <required> string $server_key ]
Parameter #1 [ <required> array $items ]
- Parameter #2 [ <optional> $expiration ]
+ Parameter #2 [ <optional> int $expiration = 0 ]
}
+ - Return [ bool ]
}
Method [ <internal:memcached> public method cas ] {
- Parameters [4] {
- Parameter #0 [ <required> $cas_token ]
- Parameter #1 [ <required> $key ]
- Parameter #2 [ <required> $value ]
- Parameter #3 [ <optional> $expiration ]
+ Parameter #0 [ <required> string $cas_token ]
+ Parameter #1 [ <required> string $key ]
+ Parameter #2 [ <required> mixed $value ]
+ Parameter #3 [ <optional> int $expiration = 0 ]
}
+ - Return [ bool ]
}
Method [ <internal:memcached> public method casByKey ] {
- Parameters [5] {
- Parameter #0 [ <required> $cas_token ]
- Parameter #1 [ <required> $server_key ]
- Parameter #2 [ <required> $key ]
- Parameter #3 [ <required> $value ]
- Parameter #4 [ <optional> $expiration ]
+ Parameter #0 [ <required> string $cas_token ]
+ Parameter #1 [ <required> string $server_key ]
+ Parameter #2 [ <required> string $key ]
+ Parameter #3 [ <required> mixed $value ]
+ Parameter #4 [ <optional> int $expiration = 0 ]
}
+ - Return [ bool ]
}
Method [ <internal:memcached> public method add ] {
- Parameters [3] {
- Parameter #0 [ <required> $key ]
- Parameter #1 [ <required> $value ]
- Parameter #2 [ <optional> $expiration ]
+ Parameter #0 [ <required> string $key ]
+ Parameter #1 [ <required> mixed $value ]
+ Parameter #2 [ <optional> int $expiration = 0 ]
}
+ - Return [ bool ]
}
Method [ <internal:memcached> public method addByKey ] {
- Parameters [4] {
- Parameter #0 [ <required> $server_key ]
- Parameter #1 [ <required> $key ]
- Parameter #2 [ <required> $value ]
- Parameter #3 [ <optional> $expiration ]
+ Parameter #0 [ <required> string $server_key ]
+ Parameter #1 [ <required> string $key ]
+ Parameter #2 [ <required> mixed $value ]
+ Parameter #3 [ <optional> int $expiration = 0 ]
}
+ - Return [ bool ]
}
Method [ <internal:memcached> public method append ] {
- Parameters [2] {
- Parameter #0 [ <required> $key ]
- Parameter #1 [ <required> $value ]
+ Parameter #0 [ <required> string $key ]
+ Parameter #1 [ <required> string $value ]
}
+ - Return [ ?bool ]
}
Method [ <internal:memcached> public method appendByKey ] {
- Parameters [3] {
- Parameter #0 [ <required> $server_key ]
- Parameter #1 [ <required> $key ]
- Parameter #2 [ <required> $value ]
+ Parameter #0 [ <required> string $server_key ]
+ Parameter #1 [ <required> string $key ]
+ Parameter #2 [ <required> string $value ]
}
+ - Return [ ?bool ]
}
Method [ <internal:memcached> public method prepend ] {
- Parameters [2] {
- Parameter #0 [ <required> $key ]
- Parameter #1 [ <required> $value ]
+ Parameter #0 [ <required> string $key ]
+ Parameter #1 [ <required> string $value ]
}
+ - Return [ ?bool ]
}
Method [ <internal:memcached> public method prependByKey ] {
- Parameters [3] {
- Parameter #0 [ <required> $server_key ]
- Parameter #1 [ <required> $key ]
- Parameter #2 [ <required> $value ]
+ Parameter #0 [ <required> string $server_key ]
+ Parameter #1 [ <required> string $key ]
+ Parameter #2 [ <required> string $value ]
}
+ - Return [ ?bool ]
}
Method [ <internal:memcached> public method replace ] {
- Parameters [3] {
- Parameter #0 [ <required> $key ]
- Parameter #1 [ <required> $value ]
- Parameter #2 [ <optional> $expiration ]
+ Parameter #0 [ <required> string $key ]
+ Parameter #1 [ <required> mixed $value ]
+ Parameter #2 [ <optional> int $expiration = 0 ]
}
+ - Return [ bool ]
}
Method [ <internal:memcached> public method replaceByKey ] {
- Parameters [4] {
- Parameter #0 [ <required> $server_key ]
- Parameter #1 [ <required> $key ]
- Parameter #2 [ <required> $value ]
- Parameter #3 [ <optional> $expiration ]
+ Parameter #0 [ <required> string $server_key ]
+ Parameter #1 [ <required> string $key ]
+ Parameter #2 [ <required> mixed $value ]
+ Parameter #3 [ <optional> int $expiration = 0 ]
}
+ - Return [ bool ]
}
Method [ <internal:memcached> public method delete ] {
- Parameters [2] {
- Parameter #0 [ <required> $key ]
- Parameter #1 [ <optional> $time ]
+ Parameter #0 [ <required> string $key ]
+ Parameter #1 [ <optional> int $time = 0 ]
}
+ - Return [ bool ]
}
Method [ <internal:memcached> public method deleteMulti ] {
- Parameters [2] {
- Parameter #0 [ <required> $keys ]
- Parameter #1 [ <optional> $time ]
+ Parameter #0 [ <required> array $keys ]
+ Parameter #1 [ <optional> int $time = 0 ]
}
+ - Return [ array ]
}
Method [ <internal:memcached> public method deleteByKey ] {
- Parameters [3] {
- Parameter #0 [ <required> $server_key ]
- Parameter #1 [ <required> $key ]
- Parameter #2 [ <optional> $time ]
+ Parameter #0 [ <required> string $server_key ]
+ Parameter #1 [ <required> string $key ]
+ Parameter #2 [ <optional> int $time = 0 ]
}
+ - Return [ bool ]
}
Method [ <internal:memcached> public method deleteMultiByKey ] {
- Parameters [3] {
- Parameter #0 [ <required> $server_key ]
- Parameter #1 [ <required> $keys ]
- Parameter #2 [ <optional> $time ]
+ Parameter #0 [ <required> string $server_key ]
+ Parameter #1 [ <required> array $keys ]
+ Parameter #2 [ <optional> int $time = 0 ]
}
+ - Return [ array ]
}
Method [ <internal:memcached> public method increment ] {
- Parameters [4] {
- Parameter #0 [ <required> $key ]
- Parameter #1 [ <optional> $offset ]
- Parameter #2 [ <optional> $initial_value ]
- Parameter #3 [ <optional> $expiry ]
+ Parameter #0 [ <required> string $key ]
+ Parameter #1 [ <optional> int $offset = 1 ]
+ Parameter #2 [ <optional> int $initial_value = 0 ]
+ Parameter #3 [ <optional> int $expiry = 0 ]
}
+ - Return [ int|false ]
}
Method [ <internal:memcached> public method decrement ] {
- Parameters [4] {
- Parameter #0 [ <required> $key ]
- Parameter #1 [ <optional> $offset ]
- Parameter #2 [ <optional> $initial_value ]
- Parameter #3 [ <optional> $expiry ]
+ Parameter #0 [ <required> string $key ]
+ Parameter #1 [ <optional> int $offset = 1 ]
+ Parameter #2 [ <optional> int $initial_value = 0 ]
+ Parameter #3 [ <optional> int $expiry = 0 ]
}
+ - Return [ int|false ]
}
Method [ <internal:memcached> public method incrementByKey ] {
- Parameters [5] {
- Parameter #0 [ <required> $server_key ]
- Parameter #1 [ <required> $key ]
- Parameter #2 [ <optional> $offset ]
- Parameter #3 [ <optional> $initial_value ]
- Parameter #4 [ <optional> $expiry ]
+ Parameter #0 [ <required> string $server_key ]
+ Parameter #1 [ <required> string $key ]
+ Parameter #2 [ <optional> int $offset = 1 ]
+ Parameter #3 [ <optional> int $initial_value = 0 ]
+ Parameter #4 [ <optional> int $expiry = 0 ]
}
+ - Return [ int|false ]
}
Method [ <internal:memcached> public method decrementByKey ] {
- Parameters [5] {
- Parameter #0 [ <required> $server_key ]
- Parameter #1 [ <required> $key ]
- Parameter #2 [ <optional> $offset ]
- Parameter #3 [ <optional> $initial_value ]
- Parameter #4 [ <optional> $expiry ]
+ Parameter #0 [ <required> string $server_key ]
+ Parameter #1 [ <required> string $key ]
+ Parameter #2 [ <optional> int $offset = 1 ]
+ Parameter #3 [ <optional> int $initial_value = 0 ]
+ Parameter #4 [ <optional> int $expiry = 0 ]
}
+ - Return [ int|false ]
}
Method [ <internal:memcached> public method addServer ] {
- Parameters [3] {
- Parameter #0 [ <required> $host ]
- Parameter #1 [ <required> $port ]
- Parameter #2 [ <optional> $weight ]
+ Parameter #0 [ <required> string $host ]
+ Parameter #1 [ <required> int $port ]
+ Parameter #2 [ <optional> int $weight = 0 ]
}
+ - Return [ bool ]
}
Method [ <internal:memcached> public method addServers ] {
@@ -562,145 +612,175 @@ Extension [ <persistent> extension #116 memcached version 3.1.5 ] {
- Parameters [1] {
Parameter #0 [ <required> array $servers ]
}
+ - Return [ bool ]
}
Method [ <internal:memcached> public method getServerList ] {
- Parameters [0] {
}
+ - Return [ array ]
}
Method [ <internal:memcached> public method getServerByKey ] {
- Parameters [1] {
- Parameter #0 [ <required> $server_key ]
+ Parameter #0 [ <required> string $server_key ]
}
+ - Return [ array|false ]
}
Method [ <internal:memcached> public method resetServerList ] {
- Parameters [0] {
}
+ - Return [ bool ]
}
Method [ <internal:memcached> public method quit ] {
- Parameters [0] {
}
+ - Return [ bool ]
}
Method [ <internal:memcached> public method flushBuffers ] {
- Parameters [0] {
}
+ - Return [ bool ]
}
Method [ <internal:memcached> public method getLastErrorMessage ] {
- Parameters [0] {
}
+ - Return [ string ]
}
Method [ <internal:memcached> public method getLastErrorCode ] {
- Parameters [0] {
}
+ - Return [ int ]
}
Method [ <internal:memcached> public method getLastErrorErrno ] {
- Parameters [0] {
}
+ - Return [ int ]
}
Method [ <internal:memcached> public method getLastDisconnectedServer ] {
- Parameters [0] {
}
+ - Return [ array|false ]
}
Method [ <internal:memcached> public method getStats ] {
- Parameters [1] {
- Parameter #0 [ <optional> $type ]
+ Parameter #0 [ <optional> ?string $type = null ]
}
+ - Return [ array|false ]
}
Method [ <internal:memcached> public method getVersion ] {
- Parameters [0] {
}
+ - Return [ array|false ]
}
Method [ <internal:memcached> public method getAllKeys ] {
- Parameters [0] {
}
+ - Return [ array|false ]
}
Method [ <internal:memcached> public method flush ] {
- Parameters [1] {
- Parameter #0 [ <optional> $delay ]
+ Parameter #0 [ <optional> int $delay = 0 ]
}
+ - Return [ bool ]
}
Method [ <internal:memcached> public method getOption ] {
- Parameters [1] {
- Parameter #0 [ <required> $option ]
+ Parameter #0 [ <required> int $option ]
}
+ - Return [ mixed ]
}
Method [ <internal:memcached> public method setOption ] {
- Parameters [2] {
- Parameter #0 [ <required> $option ]
- Parameter #1 [ <required> $value ]
+ Parameter #0 [ <required> int $option ]
+ Parameter #1 [ <required> mixed $value ]
}
+ - Return [ bool ]
}
Method [ <internal:memcached> public method setOptions ] {
- Parameters [1] {
- Parameter #0 [ <required> $options ]
+ Parameter #0 [ <required> array $options ]
}
+ - Return [ bool ]
}
Method [ <internal:memcached> public method setBucket ] {
- Parameters [3] {
- Parameter #0 [ <required> $host_map ]
- Parameter #1 [ <required> $forward_map ]
- Parameter #2 [ <required> $replicas ]
+ Parameter #0 [ <required> array $host_map ]
+ Parameter #1 [ <required> ?array $forward_map ]
+ Parameter #2 [ <required> int $replicas ]
}
+ - Return [ bool ]
}
Method [ <internal:memcached> public method setSaslAuthData ] {
- Parameters [2] {
- Parameter #0 [ <required> $username ]
- Parameter #1 [ <required> $password ]
+ Parameter #0 [ <required> string $username ]
+ Parameter #1 [ <required> string $password ]
}
+ - Return [ bool ]
}
Method [ <internal:memcached> public method setEncodingKey ] {
- Parameters [1] {
- Parameter #0 [ <required> $key ]
+ Parameter #0 [ <required> string $key ]
}
+ - Return [ bool ]
}
Method [ <internal:memcached> public method isPersistent ] {
- Parameters [0] {
}
+ - Return [ bool ]
}
Method [ <internal:memcached> public method isPristine ] {
- Parameters [0] {
}
+ - Return [ bool ]
+ }
+
+ Method [ <internal:memcached> public method checkKey ] {
+
+ - Parameters [1] {
+ Parameter #0 [ <required> string $key ]
+ }
+ - Return [ bool ]
}
}
}
@@ -721,14 +801,25 @@ Extension [ <persistent> extension #116 memcached version 3.1.5 ] {
- Methods [2] {
Method [ <internal:memcached> public method run ] {
+
+ - Parameters [1] {
+ Parameter #0 [ <required> string $address ]
+ }
+ - Return [ bool ]
}
Method [ <internal:memcached> public method on ] {
+
+ - Parameters [2] {
+ Parameter #0 [ <required> int $event ]
+ Parameter #1 [ <required> callable $callback ]
+ }
+ - Return [ bool ]
}
}
}
- Class [ <internal:memcached> class MemcachedException extends Exception implements Throwable ] {
+ Class [ <internal:memcached> class MemcachedException extends RuntimeException implements Stringable, Throwable ] {
- Constants [0] {
}
@@ -740,47 +831,82 @@ Extension [ <persistent> extension #116 memcached version 3.1.5 ] {
}
- Properties [4] {
- Property [ <default> protected $message ]
- Property [ <default> protected $code ]
- Property [ <default> protected $file ]
- Property [ <default> protected $line ]
+ Property [ protected $message = '' ]
+ Property [ protected $code = 0 ]
+ Property [ protected string $file = '' ]
+ Property [ protected int $line = 0 ]
}
- Methods [10] {
Method [ <internal:Core, inherits Exception, ctor> public method __construct ] {
- Parameters [3] {
- Parameter #0 [ <optional> $message ]
- Parameter #1 [ <optional> $code ]
- Parameter #2 [ <optional> $previous ]
+ Parameter #0 [ <optional> string $message = "" ]
+ Parameter #1 [ <optional> int $code = 0 ]
+ Parameter #2 [ <optional> ?Throwable $previous = null ]
}
}
Method [ <internal:Core, inherits Exception> public method __wakeup ] {
+
+ - Parameters [0] {
+ }
+ - Tentative return [ void ]
}
Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getMessage ] {
+
+ - Parameters [0] {
+ }
+ - Return [ string ]
}
Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getCode ] {
+
+ - Parameters [0] {
+ }
}
Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getFile ] {
+
+ - Parameters [0] {
+ }
+ - Return [ string ]
}
Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getLine ] {
+
+ - Parameters [0] {
+ }
+ - Return [ int ]
}
Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getTrace ] {
+
+ - Parameters [0] {
+ }
+ - Return [ array ]
}
Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getPrevious ] {
+
+ - Parameters [0] {
+ }
+ - Return [ ?Throwable ]
}
Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getTraceAsString ] {
+
+ - Parameters [0] {
+ }
+ - Return [ string ]
}
- Method [ <internal:Core, inherits Exception, prototype Throwable> public method __toString ] {
+ Method [ <internal:Core, inherits Exception, prototype Stringable> public method __toString ] {
+
+ - Parameters [0] {
+ }
+ - Return [ string ]
}
}
}
diff --git a/memcached-build.patch b/memcached-build.patch
new file mode 100644
index 0000000..2ce2cba
--- /dev/null
+++ b/memcached-build.patch
@@ -0,0 +1,41 @@
+Adapted for 3.7.0 from:
+
+From d226ee7d45538a853160d6e2264a56c121700775 Mon Sep 17 00:00:00 2001
+From: Remi Collet <remi@remirepo.net>
+Date: Tue, 30 Jan 2024 09:44:48 +0100
+Subject: [PATCH] Fix incompatible pointer types
+
+---
+ php_memcached.c | 10 +++++++---
+ 1 file changed, 7 insertions(+), 3 deletions(-)
+
+diff --git a/php_memcached.c b/php_memcached.c
+index 00d5e3d4..c3ef16e8 100644
+--- a/php_memcached.c
++++ b/php_memcached.c
+@@ -899,10 +899,11 @@ zend_bool s_compress_value (php_memc_com
+
+ case COMPRESSION_TYPE_ZLIB:
+ {
+- compressed_size = buffer_size;
+- int status = compress((Bytef *) buffer, &compressed_size, (Bytef *) ZSTR_VAL(payload), ZSTR_LEN(payload));
++ unsigned long cs = compressed_size = buffer_size;
++ int status = compress((Bytef *) buffer, &cs, (Bytef *) ZSTR_VAL(payload), ZSTR_LEN(payload));
+
+ if (status == Z_OK) {
++ compressed_size = cs;
+ compress_status = 1;
+ compression_type_flag = MEMC_VAL_COMPRESSION_ZLIB;
+ }
+@@ -3633,7 +3634,10 @@ zend_string *s_decompress_value (const c
+ decompress_status = ((length = fastlz_decompress(payload, payload_len, &buffer->val, buffer->len)) > 0);
+ }
+ else if (is_zlib) {
+- decompress_status = (uncompress((Bytef *) buffer->val, &buffer->len, (Bytef *)payload, payload_len) == Z_OK);
++ unsigned long ds = buffer->len;
++
++ decompress_status = (uncompress((Bytef *) buffer->val, &ds, (Bytef *)payload, payload_len) == Z_OK);
++ buffer->len = ds;
+ }
+
+ ZSTR_VAL(buffer)[stored_length] = '\0';
diff --git a/memcached-upstream.patch b/memcached-upstream.patch
new file mode 100644
index 0000000..302c007
--- /dev/null
+++ b/memcached-upstream.patch
@@ -0,0 +1,254 @@
+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 1/3] 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 7b058d7..407fcf9 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 a2277b4..3d02b24 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
+--
+2.35.3
+
+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 2/3] 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 382c177..059ec74 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;
+ }
+ }
+
+--
+2.35.3
+
+From ce2dfa5e649e01e4b4df925ebaef95ca75a3f353 Mon Sep 17 00:00:00 2001
+From: Remi Collet <remi@remirepo.net>
+Date: Thu, 28 Jul 2022 09:28:33 +0200
+Subject: [PATCH 3/3] mark password as a sensitive param for 8.2 (#516)
+
+* mark password as a sensitive param for 8.2
+---
+ php_memcached.c | 7 +++----
+ php_memcached.stub.php | 6 +++---
+ php_memcached_arginfo.h | 37 +++++++++++++++++++++++++++++-----
+ php_memcached_legacy_arginfo.h | 30 ++++++++++++++++++++++-----
+ 4 files changed, 63 insertions(+), 17 deletions(-)
+
+diff --git a/php_memcached.c b/php_memcached.c
+index 73deaf6..7ccc9b5 100644
+--- a/php_memcached.c
++++ b/php_memcached.c
+@@ -3898,6 +3898,7 @@ PHP_METHOD(MemcachedServer, on)
+ #if PHP_VERSION_ID < 80000
+ #include "php_memcached_legacy_arginfo.h"
+ #else
++#include "zend_attributes.h"
+ #include "php_memcached_arginfo.h"
+ #endif
+
+@@ -4254,8 +4255,7 @@ PHP_MINIT_FUNCTION(memcached)
+
+ le_memc = zend_register_list_destructors_ex(NULL, php_memc_dtor, "Memcached persistent connection", module_number);
+
+- INIT_CLASS_ENTRY(ce, "Memcached", class_Memcached_methods);
+- memcached_ce = zend_register_internal_class(&ce);
++ memcached_ce = register_class_Memcached();
+ memcached_ce->create_object = php_memc_object_new;
+
+ #ifdef HAVE_MEMCACHED_PROTOCOL
+@@ -4264,8 +4264,7 @@ PHP_MINIT_FUNCTION(memcached)
+ memcached_server_object_handlers.clone_obj = NULL;
+ memcached_server_object_handlers.free_obj = php_memc_server_free_storage;
+
+- INIT_CLASS_ENTRY(ce, "MemcachedServer", class_MemcachedServer_methods);
+- memcached_server_ce = zend_register_internal_class(&ce);
++ memcached_server_ce = register_class_MemcachedServer();
+ memcached_server_ce->create_object = php_memc_server_new;
+ #endif
+
+diff --git a/php_memcached.stub.php b/php_memcached.stub.php
+index 819186f..a44b180 100644
+--- a/php_memcached.stub.php
++++ b/php_memcached.stub.php
+@@ -3,9 +3,9 @@
+ /**
+ * @generate-function-entries
+ * @generate-legacy-arginfo
++ * @generate-class-entries
+ */
+
+-
+ class Memcached {
+
+ public function __construct(?string $persistent_id=null, ?callable $callback=null, ?string $connection_str=null) {}
+@@ -75,7 +75,7 @@ class Memcached {
+ public function setOptions(array $options): bool {}
+ public function setBucket(array $host_map, ?array $forward_map, int $replicas): bool {}
+ #ifdef HAVE_MEMCACHED_SASL
+- public function setSaslAuthData(string $username, string $password): bool {}
++ public function setSaslAuthData(string $username, #[\SensitiveParameter] string $password): bool {}
+ #endif
+
+ #ifdef HAVE_MEMCACHED_SET_ENCODING_KEY
+@@ -86,7 +86,7 @@ class Memcached {
+ public function checkKey(string $key): bool {}
+ }
+
+-#ifdef HAVE_MEMCACHED_PROTOCOL
++#if defined(HAVE_MEMCACHED_PROTOCOL)
+ class MemcachedServer {
+
+ public function run(string $address): bool {}
+diff --git a/php_memcached_arginfo.h b/php_memcached_arginfo.h
+index 3373624..3108e39 100644
+--- a/php_memcached_arginfo.h
++++ b/php_memcached_arginfo.h
+@@ -1,5 +1,5 @@
+ /* This is a generated file, edit the .stub.php file instead.
+- * Stub hash: 3f4694d4e1f3d1647a832acd8539b056b2ab5e7a */
++ * Stub hash: 0964c9bfee903e59b63e5a16bd8b6611d827b151 */
+
+ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Memcached___construct, 0, 0, 0)
+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, persistent_id, IS_STRING, 1, "null")
+@@ -406,12 +406,39 @@ static const zend_function_entry class_Memcached_methods[] = {
+ };
+
+
+-static const zend_function_entry class_MemcachedServer_methods[] = {
+ #if defined(HAVE_MEMCACHED_PROTOCOL)
++static const zend_function_entry class_MemcachedServer_methods[] = {
+ ZEND_ME(MemcachedServer, run, arginfo_class_MemcachedServer_run, ZEND_ACC_PUBLIC)
+-#endif
+-#if defined(HAVE_MEMCACHED_PROTOCOL)
+ ZEND_ME(MemcachedServer, on, arginfo_class_MemcachedServer_on, ZEND_ACC_PUBLIC)
+-#endif
+ ZEND_FE_END
+ };
++#endif
++
++static zend_class_entry *register_class_Memcached(void)
++{
++ zend_class_entry ce, *class_entry;
++
++ INIT_CLASS_ENTRY(ce, "Memcached", class_Memcached_methods);
++ class_entry = zend_register_internal_class_ex(&ce, NULL);
++#if (PHP_VERSION_ID >= 80200)
++
++#if defined(HAVE_MEMCACHED_SASL)
++
++ zend_add_parameter_attribute(zend_hash_str_find_ptr(&class_entry->function_table, "setsaslauthdata", sizeof("setsaslauthdata") - 1), 1, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0);
++#endif
++#endif
++
++ return class_entry;
++}
++
++#if defined(HAVE_MEMCACHED_PROTOCOL)
++static zend_class_entry *register_class_MemcachedServer(void)
++{
++ zend_class_entry ce, *class_entry;
++
++ INIT_CLASS_ENTRY(ce, "MemcachedServer", class_MemcachedServer_methods);
++ class_entry = zend_register_internal_class_ex(&ce, NULL);
++
++ return class_entry;
++}
++#endif
+diff --git a/php_memcached_legacy_arginfo.h b/php_memcached_legacy_arginfo.h
+index ad6d656..6bb8e2d 100644
+--- a/php_memcached_legacy_arginfo.h
++++ b/php_memcached_legacy_arginfo.h
+@@ -1,5 +1,5 @@
+ /* This is a generated file, edit the .stub.php file instead.
+- * Stub hash: 3f4694d4e1f3d1647a832acd8539b056b2ab5e7a */
++ * Stub hash: 0964c9bfee903e59b63e5a16bd8b6611d827b151 */
+
+ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Memcached___construct, 0, 0, 0)
+ ZEND_ARG_INFO(0, persistent_id)
+@@ -402,12 +402,32 @@ static const zend_function_entry class_Memcached_methods[] = {
+ };
+
+
+-static const zend_function_entry class_MemcachedServer_methods[] = {
+ #if defined(HAVE_MEMCACHED_PROTOCOL)
++static const zend_function_entry class_MemcachedServer_methods[] = {
+ ZEND_ME(MemcachedServer, run, arginfo_class_MemcachedServer_run, ZEND_ACC_PUBLIC)
+-#endif
+-#if defined(HAVE_MEMCACHED_PROTOCOL)
+ ZEND_ME(MemcachedServer, on, arginfo_class_MemcachedServer_on, ZEND_ACC_PUBLIC)
+-#endif
+ ZEND_FE_END
+ };
++#endif
++
++static zend_class_entry *register_class_Memcached(void)
++{
++ zend_class_entry ce, *class_entry;
++
++ INIT_CLASS_ENTRY(ce, "Memcached", class_Memcached_methods);
++ class_entry = zend_register_internal_class_ex(&ce, NULL);
++
++ return class_entry;
++}
++
++#if defined(HAVE_MEMCACHED_PROTOCOL)
++static zend_class_entry *register_class_MemcachedServer(void)
++{
++ zend_class_entry ce, *class_entry;
++
++ INIT_CLASS_ENTRY(ce, "MemcachedServer", class_MemcachedServer_methods);
++ class_entry = zend_register_internal_class_ex(&ce, NULL);
++
++ return class_entry;
++}
++#endif
+--
+2.35.3
+
diff --git a/php-pecl-memcached.spec b/php-pecl-memcached.spec
index 1f830c4..6d01272 100644
--- a/php-pecl-memcached.spec
+++ b/php-pecl-memcached.spec
@@ -3,16 +3,13 @@
#
# Fedora spec file for php-pecl-memcached
#
-# Copyright (c) 2009-2021 Remi Collet
-# License: CC-BY-SA
+# Copyright (c) 2009-2024 Remi Collet
+# License: CC-BY-SA-4.0
# http://creativecommons.org/licenses/by-sa/4.0/
#
# Please, preserve the changelog entries
#
-# we don't want -z defs linker flag
-%undefine _strict_symbol_defs_build
-
%if 0%{?scl:1}
%global sub_prefix %{scl_prefix}
%scl_package php-pecl-memcached
@@ -30,36 +27,37 @@
# After 40-igbinary, 40-json, 40-msgpack
%global ini_name 50-%{pecl_name}.ini
+%global upstream_version 3.2.0
+#global upstream_prever RC2
+# upstream use dev => alpha => beta => RC
+# make RPM happy DEV => alpha => beta => rc
+#global upstream_lower rc2
+%global sources %{pecl_name}-%{upstream_version}%{?upstream_prever}
+%global _configure ../%{sources}/configure
+
+
Summary: Extension to work with the Memcached caching daemon
-Name: %{?sub_prefix}php-pecl-memcached
-Version: 3.1.5
-Release: 10%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
-License: PHP
+Name: %{?scl_prefix}php-pecl-memcached
+Version: %{upstream_version}%{?upstream_prever:~%{upstream_lower}}
+Release: 9%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
+License: PHP-3.01
URL: https://pecl.php.net/package/%{pecl_name}
-Source0: https://pecl.php.net/get/%{pecl_name}-%{version}.tgz
+Source0: https://pecl.php.net/get/%{sources}.tgz
-Patch0: https://patch-diff.githubusercontent.com/raw/php-memcached-dev/php-memcached/pull/461.patch
-Patch1: https://patch-diff.githubusercontent.com/raw/php-memcached-dev/php-memcached/pull/463.patch
-Patch2: https://patch-diff.githubusercontent.com/raw/php-memcached-dev/php-memcached/pull/465.patch
-Patch3: https://patch-diff.githubusercontent.com/raw/php-memcached-dev/php-memcached/pull/467.patch
-Patch4: https://patch-diff.githubusercontent.com/raw/php-memcached-dev/php-memcached/pull/468.patch
-Patch5: https://patch-diff.githubusercontent.com/raw/php-memcached-dev/php-memcached/pull/469.patch
-Patch6: https://patch-diff.githubusercontent.com/raw/php-memcached-dev/php-memcached/pull/472.patch
-Patch7: https://patch-diff.githubusercontent.com/raw/php-memcached-dev/php-memcached/pull/473.patch
-Patch8: https://patch-diff.githubusercontent.com/raw/php-memcached-dev/php-memcached/pull/486.patch
-Patch9: https://patch-diff.githubusercontent.com/raw/php-memcached-dev/php-memcached/pull/487.patch
-Patch10: https://patch-diff.githubusercontent.com/raw/php-memcached-dev/php-memcached/pull/488.patch
+# upstream patch for PHP 8.2
+Patch0: %{pecl_name}-upstream.patch
+Patch1: %{pecl_name}-build.patch
BuildRequires: %{?dtsprefix}gcc
-BuildRequires: %{?scl_prefix}php-devel >= 7
+BuildRequires: %{?scl_prefix}php-devel >= 7.0
BuildRequires: %{?scl_prefix}php-pear
BuildRequires: %{?scl_prefix}php-json
%if %{with igbinary}
-BuildRequires: %{?sub_prefix}php-pecl-igbinary-devel
+BuildRequires: %{?scl_prefix}php-pecl-igbinary-devel
%endif
%if %{with msgpack}
-BuildRequires: %{?sub_prefix}php-pecl-msgpack-devel
+BuildRequires: %{?scl_prefix}php-pecl-msgpack-devel
%endif
BuildRequires: zlib-devel
BuildRequires: cyrus-sasl-devel
@@ -71,7 +69,7 @@ BuildRequires: memcached
%endif
BuildRequires: pkgconfig(libevent) >= 2.0.2
-%if 0%{?rhel} == 7 || 0%{?rhel} == 8
+%if 0%{?rhel}
%global move_to_opt 1
BuildRequires: %{?vendeur:%{vendeur}-}libmemcached-awesome-devel >= 1.1
Requires: libevent%{?_isa}
@@ -88,23 +86,18 @@ Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api}
Requires: %{?scl_prefix}php(api) = %{php_core_api}
Requires: %{?scl_prefix}php-json%{?_isa}
%if %{with igbinary}
-Requires: %{?sub_prefix}php-igbinary%{?_isa}
+Requires: %{?scl_prefix}php-igbinary%{?_isa}
%endif
%if %{with msgpack}
-Requires: %{?sub_prefix}php-msgpack%{?_isa}
+Requires: %{?scl_prefix}php-msgpack%{?_isa}
%endif
-%{?_sclreq:Requires: %{?scl_prefix}runtime%{?_sclreq}%{?_isa}}
Provides: %{?scl_prefix}php-%{pecl_name} = %{version}
Provides: %{?scl_prefix}php-%{pecl_name}%{?_isa} = %{version}
Provides: %{?scl_prefix}php-pecl(%{pecl_name}) = %{version}
Provides: %{?scl_prefix}php-pecl(%{pecl_name})%{?_isa} = %{version}
-%if "%{?scl_prefix}" != "%{?sub_prefix}"
-Provides: %{?scl_prefix}php-pecl-%{pecl_name} = %{version}-%{release}
-Provides: %{?scl_prefix}php-pecl-%{pecl_name}%{?_isa} = %{version}-%{release}
-%endif
-%if "%{?packager}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel}
+%if "%{?packager}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel} == 7
# Other third party repo stuff
Obsoletes: php53-pecl-%{pecl_name} <= %{version}
Obsoletes: php53u-pecl-%{pecl_name} <= %{version}
@@ -131,12 +124,6 @@ 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}
-%endif
-%if "%{php_version}" > "8.1"
-Obsoletes: php81-pecl-%{pecl_name} <= %{version}
-%endif
%endif
%if %{move_to_opt}
@@ -160,27 +147,15 @@ Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSIO
%prep
%setup -c -q
-mv %{pecl_name}-%{version} NTS
# Don't install/register tests
sed -e 's/role="test"/role="src"/' \
%{?_licensedir:-e '/LICENSE/s/role="doc"/role="src"/' } \
-i package.xml
-cd NTS
-%if "%{php_version}" > "8.0"
-%patch0 -p1 -b .pr461
-%patch1 -p1 -b .pr463
-%patch2 -p1 -b .pr465
-%patch3 -p1 -b .pr467
-%patch4 -p1 -b .pr468
-%patch5 -p1 -b .pr469
-%patch6 -p1 -b .pr472
-%patch7 -p1 -b .pr473
-%patch8 -p1 -b .pr486
-%patch9 -p1 -b .pr486
-%endif
-%patch10 -p1 -b .pr488
+cd %{sources}
+%patch -P0 -p1 -b .up
+%patch -P1 -p1 -b .pr555
%if %{with fastlz}
rm -r fastlz
@@ -189,9 +164,9 @@ sed -e '/name=.fastlz/d' -i ../package.xml
# Check version as upstream often forget to update this
extver=$(sed -n '/#define PHP_MEMCACHED_VERSION/{s/.* "//;s/".*$//;p}' php_memcached.h)
-if test "x${extver}" != "x%{version}%{?gh_date:-dev}%{?intver}"; then
- : Error: Upstream HTTP version is now ${extver}, expecting %{version}%{?prever}%{?gh_date:-dev}.
- : Update the pdover macro and rebuild.
+if test "x${extver}" != "x%{upstream_version}%{?upstream_prever:%{upstream_prever}}"; then
+ : Error: Upstream extension version is ${extver}, expecting %{upstream_version}%{?upstream_prever:%{upstream_prever}}.
+ : Update the macro and rebuild.
exit 1
fi
cd ..
@@ -217,10 +192,11 @@ extension=%{pecl_name}.so
EOF
# default options with description from upstream
-cat NTS/memcached.ini >>%{ini_name}
+cat %{sources}/memcached.ini >>%{ini_name}
+mkdir NTS
%if %{with_zts}
-cp -r NTS ZTS
+mkdir ZTS
%endif
@@ -251,15 +227,16 @@ peclconf() {
%endif
--with-php-config=$1
}
-cd NTS
-%{_bindir}/phpize
-peclconf %{_bindir}/php-config
+cd %{sources}
+%{__phpize}
+
+cd ../NTS
+peclconf %{__phpconfig}
make %{?_smp_mflags}
%if %{with_zts}
cd ../ZTS
-%{_bindir}/zts-phpize
-peclconf %{_bindir}/zts-php-config
+peclconf %{__ztsphpconfig}
make %{?_smp_mflags}
%endif
@@ -284,7 +261,7 @@ install -D -m 644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name}
%endif
# Documentation
-cd NTS
+cd %{sources}
for i in $(grep 'role="doc"' ../package.xml | sed -e 's/^.*name="//;s/".*$//')
do install -Dpm 644 $i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i
done
@@ -319,41 +296,45 @@ OPT="-n"
: Minimal load test for NTS extension
%{__php} $OPT \
-d extension=%{buildroot}%{php_extdir}/%{pecl_name}.so \
- --modules | grep %{pecl_name}
+ --modules | grep '^%{pecl_name}$'
%if %{with_zts}
: Minimal load test for ZTS extension
%{__ztsphp} $OPT \
-d extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so \
- --modules | grep %{pecl_name}
+ --modules | grep '^%{pecl_name}$'
%endif
%if %{with tests}
+cd %{sources}
ret=0
+%if "%{php_version}" < "7.3"
+# ::1:50770 vs [::1]:%s
+rm tests/memcachedserver6.phpt
+%endif
+
: Launch the Memcached service
port=$(%{__php} -r 'echo 10000 + PHP_MAJOR_VERSION*100 + PHP_MINOR_VERSION*10 + PHP_INT_SIZE + 0%{?scl:1};')
memcached -p $port -U $port -d -P $PWD/memcached.pid
-sed -e "s/11211/$port/" -i ?TS/tests/*
+sed -e "s/11211/$port/" -i tests/*
+
+: Port for MemcachedServer
+port=$(%{__php} -r 'echo 11000 + PHP_MAJOR_VERSION*100 + PHP_MINOR_VERSION*10 + PHP_INT_SIZE + 0%{?scl:1};')
+sed -e "s/3434/$port/" -i tests/*
: Run the upstream test Suite for NTS extension
-pushd NTS
TEST_PHP_EXECUTABLE=%{__php} \
-TEST_PHP_ARGS="$OPT -d extension=$PWD/modules/%{pecl_name}.so" \
-NO_INTERACTION=1 \
+TEST_PHP_ARGS="$OPT -d extension=$PWD/../NTS/modules/%{pecl_name}.so" \
REPORT_EXIT_STATUS=1 \
-%{__php} -n run-tests.php -x --show-diff || ret=1
-popd
+%{__php} -n run-tests.php -q -x --show-diff || ret=1
%if %{with_zts}
: Run the upstream test Suite for ZTS extension
-pushd ZTS
TEST_PHP_EXECUTABLE=%{__ztsphp} \
-TEST_PHP_ARGS="$OPT -d extension=$PWD/modules/%{pecl_name}.so" \
-NO_INTERACTION=1 \
+TEST_PHP_ARGS="$OPT -d extension=$PWD/../ZTS/modules/%{pecl_name}.so" \
REPORT_EXIT_STATUS=1 \
-%{__ztsphp} -n run-tests.php -x --show-diff || ret=1
-popd
+%{__ztsphp} -n run-tests.php -q -x --show-diff || ret=1
%endif
# Cleanup
@@ -367,7 +348,7 @@ exit $ret
%files
-%{?_licensedir:%license NTS/LICENSE}
+%{?_licensedir:%license %{sources}/LICENSE}
%doc %{pecl_docdir}/%{pecl_name}
%{pecl_xmldir}/%{name}.xml
@@ -381,6 +362,50 @@ exit $ret
%changelog
+* Tue Jan 30 2024 Remi Collet <remi@remirepo.net> - 3.2.0-9
+- fix incompatible pointer types using patch from
+ https://github.com/php-memcached-dev/php-memcached/pull/555
+
+* Wed Aug 30 2023 Remi Collet <remi@remirepo.net> - 3.2.0-7
+- rebuild for PHP 8.3.0RC1
+
+* Wed Jul 12 2023 Remi Collet <remi@remirepo.net> - 3.2.0-6
+- build out of sources tree
+
+* Fri Sep 9 2022 Remi Collet <remi@remirepo.net> - 3.2.0-5
+- rebuild for PHP 8.2 with msgpack and igbinary
+
+* Thu Sep 1 2022 Remi Collet <remi@remirepo.net> - 3.2.0-4
+- rebuild for PHP 8.2.0RC1
+
+* Thu Jul 28 2022 Remi Collet <remi@remirepo.net> - 3.2.0-3
+- more upstream patches for PHP 8.2
+
+* Fri Jun 3 2022 Remi Collet <remi@remirepo.net> - 3.2.0-2
+- add upstream patches for PHP 8.2
+
+* Thu Mar 24 2022 Remi Collet <remi@remirepo.net> - 3.2.0-1
+- update to 3.2.0
+
+* Wed Mar 9 2022 Remi Collet <remi@remirepo.net> - 3.2.0~rc2-1
+- update to 3.2.0RC2
+
+* Mon Mar 7 2022 Remi Collet <remi@remirepo.net> - 3.2.0~rc1-1
+- update to 3.2.0RC1
+
+* Thu Mar 3 2022 Remi Collet <remi@remirepo.net> - 3.1.6~DEV-1
+- update to 3.1.6-dev (2022-03-02)
+
+* Fri Feb 25 2022 Remi Collet <remi@remirepo.net> - 3.1.5-13
+- rebuild using remi-libmemcached-awesome
+
+* Fri Nov 5 2021 Remi Collet <remi@remirepo.net> - 3.1.5-12
+- add patch for MemcachedServer from
+ https://github.com/php-memcached-dev/php-memcached/pull/474
+
+* Wed Sep 01 2021 Remi Collet <remi@remirepo.net> - 3.1.5-11
+- rebuild for 8.1.0RC1
+
* Tue Jul 27 2021 Remi Collet <remi@remirepo.net> - 3.1.5-10
- add patch to report about libmemcached-awesome from
https://github.com/php-memcached-dev/php-memcached/pull/488