Skip to content

Commit d91c958

Browse files
committed
Fix #523 Incorrect PHP reflection type for Memcached::cas $cas_token
1 parent aa4868d commit d91c958

File tree

3 files changed

+12
-6
lines changed

3 files changed

+12
-6
lines changed

Diff for: php_memcached.stub.php

+8-2
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,14 @@ public function touchByKey(string $server_key, string $key, int $expiration=0):
3131
public function setMulti(array $items, int $expiration=0): bool {}
3232
public function setMultiByKey(string $server_key, array $items, int $expiration=0): bool {}
3333

34-
public function cas(string $cas_token, string $key, mixed $value, int $expiration=0): bool {}
35-
public function casByKey(string $cas_token, string $server_key, string $key, mixed $value, int $expiration=0): bool {}
34+
/**
35+
* @param string|int|float $cas_token
36+
*/
37+
public function cas($cas_token, string $key, mixed $value, int $expiration=0): bool {}
38+
/**
39+
* @param string|int|float $cas_token
40+
*/
41+
public function casByKey($cas_token, string $server_key, string $key, mixed $value, int $expiration=0): bool {}
3642
public function add(string $key, mixed $value, int $expiration=0): bool {}
3743
public function addByKey(string $server_key, string $key, mixed $value, int $expiration=0): bool {}
3844
public function append(string $key, string $value): ?bool {}

Diff for: php_memcached_arginfo.h

+3-3
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: 8cb8a18e8e09c6bfc62a51fc31d60171038500ef */
2+
* Stub hash: 95bbd37829c87980e3a770df1e2a805e93025fbd */
33

44
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Memcached___construct, 0, 0, 0)
55
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, persistent_id, IS_STRING, 1, "null")
@@ -91,14 +91,14 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Memcached_setMultiByKey, 0
9191
ZEND_END_ARG_INFO()
9292

9393
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Memcached_cas, 0, 3, _IS_BOOL, 0)
94-
ZEND_ARG_TYPE_INFO(0, cas_token, IS_STRING, 0)
94+
ZEND_ARG_INFO(0, cas_token)
9595
ZEND_ARG_TYPE_INFO(0, key, IS_STRING, 0)
9696
ZEND_ARG_TYPE_INFO(0, value, IS_MIXED, 0)
9797
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, expiration, IS_LONG, 0, "0")
9898
ZEND_END_ARG_INFO()
9999

100100
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Memcached_casByKey, 0, 4, _IS_BOOL, 0)
101-
ZEND_ARG_TYPE_INFO(0, cas_token, IS_STRING, 0)
101+
ZEND_ARG_INFO(0, cas_token)
102102
ZEND_ARG_TYPE_INFO(0, server_key, IS_STRING, 0)
103103
ZEND_ARG_TYPE_INFO(0, key, IS_STRING, 0)
104104
ZEND_ARG_TYPE_INFO(0, value, IS_MIXED, 0)

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: 8cb8a18e8e09c6bfc62a51fc31d60171038500ef */
2+
* Stub hash: 95bbd37829c87980e3a770df1e2a805e93025fbd */
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)