Skip to content

Commit 1214731

Browse files
committed
Fix php-memcached-dev#523 Incorrect PHP reflection type for Memcached::cas $cas_token
1 parent aa4868d commit 1214731

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

php_memcached.stub.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ 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+
public function cas(string|int|float $cas_token, string $key, mixed $value, int $expiration=0): bool {}
35+
public function casByKey(string|int|float $cas_token, string $server_key, string $key, mixed $value, int $expiration=0): bool {}
3636
public function add(string $key, mixed $value, int $expiration=0): bool {}
3737
public function addByKey(string $server_key, string $key, mixed $value, int $expiration=0): bool {}
3838
public function append(string $key, string $value): ?bool {}

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: 75604abd7f58655a9ebda6f0ea579840311c1f08 */
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_TYPE_MASK(0, cas_token, MAY_BE_STRING|MAY_BE_LONG|MAY_BE_DOUBLE, NULL)
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_TYPE_MASK(0, cas_token, MAY_BE_STRING|MAY_BE_LONG|MAY_BE_DOUBLE, NULL)
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)

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: 75604abd7f58655a9ebda6f0ea579840311c1f08 */
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)