1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
|
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)
|