Skip to content

Commit c8f9376

Browse files
authored
fix php8 arginfo (#472)
1 parent bfb0a66 commit c8f9376

File tree

3 files changed

+18
-18
lines changed

3 files changed

+18
-18
lines changed

Diff for: php_memcached.stub.php

+6-6
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,17 @@
88

99
class Memcached {
1010

11-
public function __construct(string $persistent_id=NULL, callable $callback=NULL, string $connection_str=NULL) {}
11+
public function __construct(string $persistent_id=null, callable $callback=null, string $connection_str=null) {}
1212

1313
public function getResultCode(): int {}
1414
public function getResultMessage(): string {}
1515

16-
public function get(string $key, callable $cache_cb=NULL, int $get_flags=0): mixed {}
17-
public function getByKey(string $server_key, string $key, callable $cache_cb=NULL, int $get_flags=0): mixed {}
16+
public function get(string $key, callable $cache_cb=null, int $get_flags=0): mixed {}
17+
public function getByKey(string $server_key, string $key, callable $cache_cb=null, int $get_flags=0): mixed {}
1818
public function getMulti(array $keys, int $get_flags=0): false|array {}
1919
public function getMultiByKey(string $server_key, array $keys, int $get_flags=0): false|array {}
20-
public function getDelayed(array $keys, bool $with_cas=NULL, callable $value_cb=NULL): bool {}
21-
public function getDelayedByKey(string $server_key, array $keys, bool $with_cas=NULL, callable $value_cb=NULL): bool {}
20+
public function getDelayed(array $keys, bool $with_cas=false, callable $value_cb=null): bool {}
21+
public function getDelayedByKey(string $server_key, array $keys, bool $with_cas=false, callable $value_cb=null): bool {}
2222
public function fetch(): false|array {}
2323
public function fetchAll(): false|array {}
2424

@@ -64,7 +64,7 @@ public function getLastErrorCode(): int {}
6464
public function getLastErrorErrno(): int {}
6565
public function getLastDisconnectedServer(): false|array {}
6666

67-
public function getStats(string $type=NULL): false|array {}
67+
public function getStats(string $type=null): false|array {}
6868
public function getVersion(): false|array {}
6969
public function getAllKeys(): false|array {}
7070

Diff for: php_memcached_arginfo.h

+11-11
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
/* This is a generated file, edit the .stub.php file instead.
2-
* Stub hash: 8ce11ff45ccb2b1c765e5f313305f539ca3fa4f6 */
2+
* Stub hash: 573d35c5c6b6c397943e0f8ab9c505e2f4ce9e34 */
33

44
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Memcached___construct, 0, 0, 0)
5-
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, persistent_id, IS_STRING, 0, "NULL")
6-
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, callback, IS_CALLABLE, 0, "NULL")
7-
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, connection_str, IS_STRING, 0, "NULL")
5+
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, persistent_id, IS_STRING, 1, "null")
6+
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, callback, IS_CALLABLE, 1, "null")
7+
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, connection_str, IS_STRING, 1, "null")
88
ZEND_END_ARG_INFO()
99

1010
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()
1515

1616
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Memcached_get, 0, 1, IS_MIXED, 0)
1717
ZEND_ARG_TYPE_INFO(0, key, IS_STRING, 0)
18-
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, cache_cb, IS_CALLABLE, 0, "NULL")
18+
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, cache_cb, IS_CALLABLE, 1, "null")
1919
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, get_flags, IS_LONG, 0, "0")
2020
ZEND_END_ARG_INFO()
2121

2222
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Memcached_getByKey, 0, 2, IS_MIXED, 0)
2323
ZEND_ARG_TYPE_INFO(0, server_key, IS_STRING, 0)
2424
ZEND_ARG_TYPE_INFO(0, key, IS_STRING, 0)
25-
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, cache_cb, IS_CALLABLE, 0, "NULL")
25+
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, cache_cb, IS_CALLABLE, 1, "null")
2626
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, get_flags, IS_LONG, 0, "0")
2727
ZEND_END_ARG_INFO()
2828

@@ -39,15 +39,15 @@ ZEND_END_ARG_INFO()
3939

4040
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Memcached_getDelayed, 0, 1, _IS_BOOL, 0)
4141
ZEND_ARG_TYPE_INFO(0, keys, IS_ARRAY, 0)
42-
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, with_cas, _IS_BOOL, 0, "NULL")
43-
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, value_cb, IS_CALLABLE, 0, "NULL")
42+
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, with_cas, _IS_BOOL, 0, "false")
43+
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, value_cb, IS_CALLABLE, 1, "null")
4444
ZEND_END_ARG_INFO()
4545

4646
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Memcached_getDelayedByKey, 0, 2, _IS_BOOL, 0)
4747
ZEND_ARG_TYPE_INFO(0, server_key, IS_STRING, 0)
4848
ZEND_ARG_TYPE_INFO(0, keys, IS_ARRAY, 0)
49-
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, with_cas, _IS_BOOL, 0, "NULL")
50-
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, value_cb, IS_CALLABLE, 0, "NULL")
49+
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, with_cas, _IS_BOOL, 0, "false")
50+
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, value_cb, IS_CALLABLE, 1, "null")
5151
ZEND_END_ARG_INFO()
5252

5353
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()
202202
#define arginfo_class_Memcached_getLastDisconnectedServer arginfo_class_Memcached_fetch
203203

204204
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_class_Memcached_getStats, 0, 0, MAY_BE_FALSE|MAY_BE_ARRAY)
205-
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, type, IS_STRING, 0, "NULL")
205+
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, type, IS_STRING, 1, "null")
206206
ZEND_END_ARG_INFO()
207207

208208
#define arginfo_class_Memcached_getVersion arginfo_class_Memcached_fetch

Diff for: php_memcached_legacy_arginfo.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* This is a generated file, edit the .stub.php file instead.
2-
* Stub hash: 8ce11ff45ccb2b1c765e5f313305f539ca3fa4f6 */
2+
* Stub hash: 573d35c5c6b6c397943e0f8ab9c505e2f4ce9e34 */
33

44
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Memcached___construct, 0, 0, 0)
55
ZEND_ARG_INFO(0, persistent_id)

0 commit comments

Comments
 (0)