From d91c958b13589ef4ae6a0ac78c17b6f0411ebb5a Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 14 Nov 2022 08:43:03 +0100 Subject: [PATCH] Fix #523 Incorrect PHP reflection type for Memcached::cas $cas_token --- php_memcached.stub.php | 10 ++++++++-- php_memcached_arginfo.h | 6 +++--- php_memcached_legacy_arginfo.h | 2 +- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/php_memcached.stub.php b/php_memcached.stub.php index 80cd44ca..3830bd3d 100644 --- a/php_memcached.stub.php +++ b/php_memcached.stub.php @@ -31,8 +31,14 @@ public function touchByKey(string $server_key, string $key, int $expiration=0): 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 {} + /** + * @param string|int|float $cas_token + */ + public function cas($cas_token, string $key, mixed $value, int $expiration=0): bool {} + /** + * @param string|int|float $cas_token + */ + public function casByKey($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 {} diff --git a/php_memcached_arginfo.h b/php_memcached_arginfo.h index 2b6ef282..8142a1d3 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: 8cb8a18e8e09c6bfc62a51fc31d60171038500ef */ + * Stub hash: 95bbd37829c87980e3a770df1e2a805e93025fbd */ 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") @@ -91,14 +91,14 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Memcached_setMultiByKey, 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_INFO(0, cas_token) 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_INFO(0, cas_token) 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) diff --git a/php_memcached_legacy_arginfo.h b/php_memcached_legacy_arginfo.h index 81edffa0..15f8e2ec 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: 8cb8a18e8e09c6bfc62a51fc31d60171038500ef */ + * Stub hash: 95bbd37829c87980e3a770df1e2a805e93025fbd */ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Memcached___construct, 0, 0, 0) ZEND_ARG_INFO(0, persistent_id)