Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/phpredis/phpredis.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPavlo Yatsukhnenko <yatsukhnenko@users.noreply.github.com>2022-07-30 14:33:40 +0300
committerGitHub <noreply@github.com>2022-07-30 14:33:40 +0300
commit8159048b589376d7661fd6aaff283a93e877f4c0 (patch)
tree118ed1da656acbe101f8594f51c83c4f1991129e
parent0f1ca0ccf815352d79e716dac49b854491ecc994 (diff)
parent584f6b172e8e8334ef0c15e6ea6c9fb81ece29b0 (diff)
Merge pull request #2127 from phpredis/php82-sensitive-param
mark auth param as sensitive for PHP 8.2
-rw-r--r--redis.c48
-rw-r--r--redis.stub.php5
-rw-r--r--redis_arginfo.h32
-rw-r--r--redis_array.c9
-rw-r--r--redis_array.h6
-rw-r--r--redis_array.stub.php1
-rw-r--r--redis_array_arginfo.h12
-rw-r--r--redis_array_legacy_arginfo.h12
-rw-r--r--redis_cluster.c11
-rw-r--r--redis_cluster.h12
-rw-r--r--redis_cluster.stub.php5
-rw-r--r--redis_cluster_arginfo.h32
-rw-r--r--redis_cluster_legacy_arginfo.h27
-rw-r--r--redis_legacy_arginfo.h27
-rw-r--r--redis_sentinel.c9
-rw-r--r--redis_sentinel.h3
-rw-r--r--redis_sentinel.stub.php3
-rw-r--r--redis_sentinel_arginfo.h17
-rw-r--r--redis_sentinel_legacy_arginfo.h12
19 files changed, 214 insertions, 69 deletions
diff --git a/redis.c b/redis.c
index bfa72b88..8c4cada6 100644
--- a/redis.c
+++ b/redis.c
@@ -28,6 +28,7 @@
#include "redis_commands.h"
#include "redis_sentinel.h"
#include <standard/php_random.h>
+#include <ext/spl/spl_exceptions.h>
#include <zend_exceptions.h>
#include <ext/standard/info.h>
#include <ext/hash/php_hash.h>
@@ -52,17 +53,13 @@ extern ps_module ps_mod_redis;
extern ps_module ps_mod_redis_cluster;
#endif
-extern zend_class_entry *redis_array_ce;
-extern zend_class_entry *redis_cluster_ce;
-extern zend_class_entry *redis_cluster_exception_ce;
-extern zend_class_entry *redis_sentinel_ce;
-
zend_class_entry *redis_ce;
zend_class_entry *redis_exception_ce;
#if PHP_VERSION_ID < 80000
#include "redis_legacy_arginfo.h"
#else
+#include "zend_attributes.h"
#include "redis_arginfo.h"
#endif
@@ -441,15 +438,6 @@ PHP_MINIT_FUNCTION(redis)
{
struct timeval tv;
- zend_class_entry redis_class_entry;
- zend_class_entry redis_array_class_entry;
- zend_class_entry redis_cluster_class_entry;
- zend_class_entry redis_sentinel_class_entry;
- zend_class_entry redis_exception_class_entry;
- zend_class_entry redis_cluster_exception_class_entry;
-
- zend_class_entry *exception_ce = NULL;
-
/* Seed random generator (for RedisCluster failover) */
gettimeofday(&tv, NULL);
srand(tv.tv_usec * tv.tv_sec);
@@ -457,47 +445,25 @@ PHP_MINIT_FUNCTION(redis)
REGISTER_INI_ENTRIES();
/* Redis class */
- INIT_CLASS_ENTRY(redis_class_entry, "Redis", redis_get_methods());
- redis_ce = zend_register_internal_class(&redis_class_entry);
+ redis_ce = register_class_Redis();
redis_ce->create_object = create_redis_object;
/* RedisArray class */
- INIT_CLASS_ENTRY(redis_array_class_entry, "RedisArray", redis_array_get_methods());
- redis_array_ce = zend_register_internal_class(&redis_array_class_entry);
- redis_array_ce->create_object = create_redis_array_object;
+ ZEND_MINIT(redis_array)(INIT_FUNC_ARGS_PASSTHRU);
/* RedisCluster class */
- INIT_CLASS_ENTRY(redis_cluster_class_entry, "RedisCluster", redis_cluster_get_methods());
- redis_cluster_ce = zend_register_internal_class(&redis_cluster_class_entry);
- redis_cluster_ce->create_object = create_cluster_context;
+ ZEND_MINIT(redis_cluster)(INIT_FUNC_ARGS_PASSTHRU);
/* RedisSentinel class */
- INIT_CLASS_ENTRY(redis_sentinel_class_entry, "RedisSentinel", redis_sentinel_get_methods());
- redis_sentinel_ce = zend_register_internal_class(&redis_sentinel_class_entry);
- redis_sentinel_ce->create_object = create_sentinel_object;
+ ZEND_MINIT(redis_sentinel)(INIT_FUNC_ARGS_PASSTHRU);
/* Register our cluster cache list item */
le_cluster_slot_cache = zend_register_list_destructors_ex(NULL, cluster_cache_dtor,
"Redis cluster slot cache",
module_number);
- /* Base Exception class */
- exception_ce = zend_hash_str_find_ptr(CG(class_table), "RuntimeException", sizeof("RuntimeException") - 1);
- if (exception_ce == NULL) {
- exception_ce = zend_exception_get_default();
- }
-
/* RedisException class */
- INIT_CLASS_ENTRY(redis_exception_class_entry, "RedisException", NULL);
- redis_exception_ce = zend_register_internal_class_ex(
- &redis_exception_class_entry,
- exception_ce);
-
- /* RedisClusterException class */
- INIT_CLASS_ENTRY(redis_cluster_exception_class_entry,
- "RedisClusterException", NULL);
- redis_cluster_exception_ce = zend_register_internal_class_ex(
- &redis_cluster_exception_class_entry, exception_ce);
+ redis_exception_ce = register_class_RedisException(spl_ce_RuntimeException);
/* Add shared class constants to Redis and RedisCluster objects */
add_class_constants(redis_ce, 0);
diff --git a/redis.stub.php b/redis.stub.php
index 93dd2730..0b7e1776 100644
--- a/redis.stub.php
+++ b/redis.stub.php
@@ -3,6 +3,7 @@
/**
* @generate-function-entries
* @generate-legacy-arginfo
+ * @generate-class-entries
*/
class Redis {
@@ -34,7 +35,7 @@ class Redis {
/** @return int|Redis */
public function append(string $key, mixed $value);
- public function auth(mixed $credentials): bool;
+ public function auth(#[\SensitiveParameter] mixed $credentials): bool;
public function bgSave(): bool;
@@ -553,3 +554,5 @@ public function persist(string $key): bool;
public function zunionstore(string $dst, array $keys, array $weights = null, string $aggregate = null): int;
}
+
+class RedisException extends RuntimeException {}
diff --git a/redis_arginfo.h b/redis_arginfo.h
index ea660631..74cde5dc 100644
--- a/redis_arginfo.h
+++ b/redis_arginfo.h
@@ -1,5 +1,5 @@
/* This is a generated file, edit the .stub.php file instead.
- * Stub hash: efcda1ed028d65d0b4848d32133dc0e32f17871f */
+ * Stub hash: 954ed131a20d6939f9653dbc384e6244a0862b6e */
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Redis___construct, 0, 0, 0)
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "null")
@@ -1436,3 +1436,33 @@ static const zend_function_entry class_Redis_methods[] = {
ZEND_ME(Redis, zunionstore, arginfo_class_Redis_zunionstore, ZEND_ACC_PUBLIC)
ZEND_FE_END
};
+
+
+static const zend_function_entry class_RedisException_methods[] = {
+ ZEND_FE_END
+};
+
+static zend_class_entry *register_class_Redis(void)
+{
+ zend_class_entry ce, *class_entry;
+
+ INIT_CLASS_ENTRY(ce, "Redis", class_Redis_methods);
+ class_entry = zend_register_internal_class_ex(&ce, NULL);
+#if (PHP_VERSION_ID >= 80200)
+
+
+ zend_add_parameter_attribute(zend_hash_str_find_ptr(&class_entry->function_table, "auth", sizeof("auth") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0);
+#endif
+
+ return class_entry;
+}
+
+static zend_class_entry *register_class_RedisException(zend_class_entry *class_entry_RuntimeException)
+{
+ zend_class_entry ce, *class_entry;
+
+ INIT_CLASS_ENTRY(ce, "RedisException", class_RedisException_methods);
+ class_entry = zend_register_internal_class_ex(&ce, class_entry_RuntimeException);
+
+ return class_entry;
+}
diff --git a/redis_array.c b/redis_array.c
index 1c5f0970..53ad4eb2 100644
--- a/redis_array.c
+++ b/redis_array.c
@@ -40,12 +40,17 @@ zend_class_entry *redis_array_ce;
#if PHP_VERSION_ID < 80000
#include "redis_array_legacy_arginfo.h"
#else
+#include "zend_attributes.h"
#include "redis_array_arginfo.h"
#endif
-extern const zend_function_entry *redis_array_get_methods(void)
+PHP_MINIT_FUNCTION(redis_array)
{
- return class_RedisArray_methods;
+ /* RedisSentinel class */
+ redis_array_ce = register_class_RedisArray();
+ redis_array_ce->create_object = create_redis_array_object;
+
+ return SUCCESS;
}
static void
diff --git a/redis_array.h b/redis_array.h
index 1e70be33..4dea35a6 100644
--- a/redis_array.h
+++ b/redis_array.h
@@ -36,8 +36,8 @@ typedef struct RedisArray_ {
struct RedisArray_ *prev;
} RedisArray;
-extern const zend_function_entry *redis_array_get_methods(void);
-zend_object *create_redis_array_object(zend_class_entry *ce);
-void free_redis_array_object(zend_object *object);
+extern zend_class_entry *redis_array_ce;
+extern PHP_MINIT_FUNCTION(redis_array);
+extern zend_object *create_redis_array_object(zend_class_entry *ce);
#endif
diff --git a/redis_array.stub.php b/redis_array.stub.php
index cab4ffc9..8fca8ab9 100644
--- a/redis_array.stub.php
+++ b/redis_array.stub.php
@@ -3,6 +3,7 @@
/**
* @generate-function-entries
* @generate-legacy-arginfo
+ * @generate-class-entries
*/
class RedisArray {
diff --git a/redis_array_arginfo.h b/redis_array_arginfo.h
index 3b426b36..bfacd086 100644
--- a/redis_array_arginfo.h
+++ b/redis_array_arginfo.h
@@ -1,5 +1,5 @@
/* This is a generated file, edit the .stub.php file instead.
- * Stub hash: db47879ea03ea74832fe777fcc5d834ea554bb4a */
+ * Stub hash: fb17c785beccf1dbeedaa48afb4aa7d48fd8b655 */
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_RedisArray___call, 0, 2, IS_MIXED, 0)
ZEND_ARG_TYPE_INFO(0, function_name, IS_STRING, 0)
@@ -176,3 +176,13 @@ static const zend_function_entry class_RedisArray_methods[] = {
ZEND_ME(RedisArray, zscan, arginfo_class_RedisArray_zscan, ZEND_ACC_PUBLIC)
ZEND_FE_END
};
+
+static zend_class_entry *register_class_RedisArray(void)
+{
+ zend_class_entry ce, *class_entry;
+
+ INIT_CLASS_ENTRY(ce, "RedisArray", class_RedisArray_methods);
+ class_entry = zend_register_internal_class_ex(&ce, NULL);
+
+ return class_entry;
+}
diff --git a/redis_array_legacy_arginfo.h b/redis_array_legacy_arginfo.h
index 9c62aac5..1f2174ef 100644
--- a/redis_array_legacy_arginfo.h
+++ b/redis_array_legacy_arginfo.h
@@ -1,5 +1,5 @@
/* This is a generated file, edit the .stub.php file instead.
- * Stub hash: db47879ea03ea74832fe777fcc5d834ea554bb4a */
+ * Stub hash: fb17c785beccf1dbeedaa48afb4aa7d48fd8b655 */
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_RedisArray___call, 0, 0, 2)
ZEND_ARG_INFO(0, function_name)
@@ -173,3 +173,13 @@ static const zend_function_entry class_RedisArray_methods[] = {
ZEND_ME(RedisArray, zscan, arginfo_class_RedisArray_zscan, ZEND_ACC_PUBLIC)
ZEND_FE_END
};
+
+static zend_class_entry *register_class_RedisArray(void)
+{
+ zend_class_entry ce, *class_entry;
+
+ INIT_CLASS_ENTRY(ce, "RedisArray", class_RedisArray_methods);
+ class_entry = zend_register_internal_class_ex(&ce, NULL);
+
+ return class_entry;
+}
diff --git a/redis_cluster.c b/redis_cluster.c
index 5634560f..f163158a 100644
--- a/redis_cluster.c
+++ b/redis_cluster.c
@@ -25,6 +25,7 @@
#include "crc16.h"
#include "redis_cluster.h"
#include "redis_commands.h"
+#include <ext/spl/spl_exceptions.h>
#include <zend_exceptions.h>
#include "library.h"
#include <php_variables.h>
@@ -38,12 +39,18 @@ zend_class_entry *redis_cluster_exception_ce;
#if PHP_VERSION_ID < 80000
#include "redis_cluster_legacy_arginfo.h"
#else
+#include "zend_attributes.h"
#include "redis_cluster_arginfo.h"
#endif
-extern const zend_function_entry *redis_cluster_get_methods(void)
+PHP_MINIT_FUNCTION(redis_cluster)
{
- return class_RedisCluster_methods;
+ redis_cluster_ce = register_class_RedisCluster();
+ redis_cluster_ce->create_object = create_cluster_context;
+
+ redis_cluster_exception_ce = register_class_RedisClusterException(spl_ce_RuntimeException);
+
+ return SUCCESS;
}
/* Handlers for RedisCluster */
diff --git a/redis_cluster.h b/redis_cluster.h
index d8e62e7f..ebef9218 100644
--- a/redis_cluster.h
+++ b/redis_cluster.h
@@ -91,12 +91,10 @@
} \
resp_func(INTERNAL_FUNCTION_PARAM_PASSTHRU, c, ctx);
-extern const zend_function_entry *redis_cluster_get_methods(void);
-
-/* Create cluster context */
-zend_object *create_cluster_context(zend_class_entry *class_type);
-
-/* Free cluster context struct */
-void free_cluster_context(zend_object *object);
+extern zend_class_entry *redis_cluster_ce;
+extern zend_class_entry *redis_cluster_exception_ce;
+extern PHP_MINIT_FUNCTION(redis_cluster);
+extern zend_object * create_cluster_context(zend_class_entry *class_type);
+extern void free_cluster_context(zend_object *object);
#endif
diff --git a/redis_cluster.stub.php b/redis_cluster.stub.php
index 2fe512fd..80461abc 100644
--- a/redis_cluster.stub.php
+++ b/redis_cluster.stub.php
@@ -3,11 +3,12 @@
/**
* @generate-function-entries
* @generate-legacy-arginfo
+ * @generate-class-entries
*/
class RedisCluster {
- public function __construct(string|null $name, array $seeds = NULL, int|float $timeout = 0, int|float $read_timeout = 0, bool $persistant = false, mixed $auth = NULL, array $context = NULL);
+ public function __construct(string|null $name, array $seeds = NULL, int|float $timeout = 0, int|float $read_timeout = 0, bool $persistant = false, #[\SensitiveParameter] mixed $auth = NULL, array $context = NULL);
public function _compress(string $value): string;
@@ -389,3 +390,5 @@ class RedisCluster {
public function zunionstore(string $key, array $keys, array $weights = null, string $aggregate = null): int;
}
+
+class RedisClusterException extends RuntimeException {}
diff --git a/redis_cluster_arginfo.h b/redis_cluster_arginfo.h
index 95945fc3..189ff765 100644
--- a/redis_cluster_arginfo.h
+++ b/redis_cluster_arginfo.h
@@ -1,5 +1,5 @@
/* This is a generated file, edit the .stub.php file instead.
- * Stub hash: 8029a0d6df2bbd9cf5d140ff8d9efcc4de2a5bcc */
+ * Stub hash: 7ff59229ef9ab94d3bb918d666610b70a5676030 */
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_RedisCluster___construct, 0, 0, 1)
ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 1)
@@ -1226,3 +1226,33 @@ static const zend_function_entry class_RedisCluster_methods[] = {
ZEND_ME(RedisCluster, zunionstore, arginfo_class_RedisCluster_zunionstore, ZEND_ACC_PUBLIC)
ZEND_FE_END
};
+
+
+static const zend_function_entry class_RedisClusterException_methods[] = {
+ ZEND_FE_END
+};
+
+static zend_class_entry *register_class_RedisCluster(void)
+{
+ zend_class_entry ce, *class_entry;
+
+ INIT_CLASS_ENTRY(ce, "RedisCluster", class_RedisCluster_methods);
+ class_entry = zend_register_internal_class_ex(&ce, NULL);
+#if (PHP_VERSION_ID >= 80200)
+
+
+ zend_add_parameter_attribute(zend_hash_str_find_ptr(&class_entry->function_table, "__construct", sizeof("__construct") - 1), 5, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0);
+#endif
+
+ return class_entry;
+}
+
+static zend_class_entry *register_class_RedisClusterException(zend_class_entry *class_entry_RuntimeException)
+{
+ zend_class_entry ce, *class_entry;
+
+ INIT_CLASS_ENTRY(ce, "RedisClusterException", class_RedisClusterException_methods);
+ class_entry = zend_register_internal_class_ex(&ce, class_entry_RuntimeException);
+
+ return class_entry;
+}
diff --git a/redis_cluster_legacy_arginfo.h b/redis_cluster_legacy_arginfo.h
index bc07b117..0a5d4daa 100644
--- a/redis_cluster_legacy_arginfo.h
+++ b/redis_cluster_legacy_arginfo.h
@@ -1,5 +1,5 @@
/* This is a generated file, edit the .stub.php file instead.
- * Stub hash: 8029a0d6df2bbd9cf5d140ff8d9efcc4de2a5bcc */
+ * Stub hash: 7ff59229ef9ab94d3bb918d666610b70a5676030 */
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_RedisCluster___construct, 0, 0, 1)
ZEND_ARG_INFO(0, name)
@@ -1114,3 +1114,28 @@ static const zend_function_entry class_RedisCluster_methods[] = {
ZEND_ME(RedisCluster, zunionstore, arginfo_class_RedisCluster_zunionstore, ZEND_ACC_PUBLIC)
ZEND_FE_END
};
+
+
+static const zend_function_entry class_RedisClusterException_methods[] = {
+ ZEND_FE_END
+};
+
+static zend_class_entry *register_class_RedisCluster(void)
+{
+ zend_class_entry ce, *class_entry;
+
+ INIT_CLASS_ENTRY(ce, "RedisCluster", class_RedisCluster_methods);
+ class_entry = zend_register_internal_class_ex(&ce, NULL);
+
+ return class_entry;
+}
+
+static zend_class_entry *register_class_RedisClusterException(zend_class_entry *class_entry_RuntimeException)
+{
+ zend_class_entry ce, *class_entry;
+
+ INIT_CLASS_ENTRY(ce, "RedisClusterException", class_RedisClusterException_methods);
+ class_entry = zend_register_internal_class_ex(&ce, class_entry_RuntimeException);
+
+ return class_entry;
+}
diff --git a/redis_legacy_arginfo.h b/redis_legacy_arginfo.h
index 622d61cb..05645b02 100644
--- a/redis_legacy_arginfo.h
+++ b/redis_legacy_arginfo.h
@@ -1,5 +1,5 @@
/* This is a generated file, edit the .stub.php file instead.
- * Stub hash: efcda1ed028d65d0b4848d32133dc0e32f17871f */
+ * Stub hash: 954ed131a20d6939f9653dbc384e6244a0862b6e */
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Redis___construct, 0, 0, 0)
ZEND_ARG_INFO(0, options)
@@ -1332,3 +1332,28 @@ static const zend_function_entry class_Redis_methods[] = {
ZEND_ME(Redis, zunionstore, arginfo_class_Redis_zunionstore, ZEND_ACC_PUBLIC)
ZEND_FE_END
};
+
+
+static const zend_function_entry class_RedisException_methods[] = {
+ ZEND_FE_END
+};
+
+static zend_class_entry *register_class_Redis(void)
+{
+ zend_class_entry ce, *class_entry;
+
+ INIT_CLASS_ENTRY(ce, "Redis", class_Redis_methods);
+ class_entry = zend_register_internal_class_ex(&ce, NULL);
+
+ return class_entry;
+}
+
+static zend_class_entry *register_class_RedisException(zend_class_entry *class_entry_RuntimeException)
+{
+ zend_class_entry ce, *class_entry;
+
+ INIT_CLASS_ENTRY(ce, "RedisException", class_RedisException_methods);
+ class_entry = zend_register_internal_class_ex(&ce, class_entry_RuntimeException);
+
+ return class_entry;
+}
diff --git a/redis_sentinel.c b/redis_sentinel.c
index 632975cd..5aa44420 100644
--- a/redis_sentinel.c
+++ b/redis_sentinel.c
@@ -26,12 +26,17 @@ extern zend_class_entry *redis_exception_ce;
#if PHP_VERSION_ID < 80000
#include "redis_sentinel_legacy_arginfo.h"
#else
+#include "zend_attributes.h"
#include "redis_sentinel_arginfo.h"
#endif
-extern const zend_function_entry *redis_sentinel_get_methods(void)
+PHP_MINIT_FUNCTION(redis_sentinel)
{
- return class_RedisSentinel_methods;
+ /* RedisSentinel class */
+ redis_sentinel_ce = register_class_RedisSentinel();
+ redis_sentinel_ce->create_object = create_sentinel_object;
+
+ return SUCCESS;
}
PHP_METHOD(RedisSentinel, __construct)
diff --git a/redis_sentinel.h b/redis_sentinel.h
index a24c5c0b..0878b62d 100644
--- a/redis_sentinel.h
+++ b/redis_sentinel.h
@@ -5,6 +5,7 @@
#define PHP_REDIS_SENTINEL_VERSION "0.1"
-extern const zend_function_entry *redis_sentinel_get_methods(void);
+extern zend_class_entry *redis_sentinel_ce;
+extern PHP_MINIT_FUNCTION(redis_sentinel);
#endif /* REDIS_SENTINEL_H */
diff --git a/redis_sentinel.stub.php b/redis_sentinel.stub.php
index 58df4838..c3fc5a9e 100644
--- a/redis_sentinel.stub.php
+++ b/redis_sentinel.stub.php
@@ -3,11 +3,12 @@
/**
* @generate-function-entries
* @generate-legacy-arginfo
+ * @generate-class-entries
*/
class RedisSentinel {
- public function __construct(string $host, int $port = 26379, float $timeout = 0, mixed $persistent = NULL, int $retry_interval = 0, float $read_timeout = 0, mixed $auth = NULL);
+ public function __construct(string $host, int $port = 26379, float $timeout = 0, mixed $persistent = NULL, int $retry_interval = 0, float $read_timeout = 0, #[\SensitiveParameter] mixed $auth = NULL);
/** @return bool|RedisSentinel */
public function ckquorum(string $master);
diff --git a/redis_sentinel_arginfo.h b/redis_sentinel_arginfo.h
index 2afdd4e1..58a5bc4c 100644
--- a/redis_sentinel_arginfo.h
+++ b/redis_sentinel_arginfo.h
@@ -1,5 +1,5 @@
/* This is a generated file, edit the .stub.php file instead.
- * Stub hash: deae7b4a55435fb2ab39f314544064a34c56d218 */
+ * Stub hash: 946942bc5a7612650fc0416902778452f6860d13 */
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_RedisSentinel___construct, 0, 0, 1)
ZEND_ARG_TYPE_INFO(0, host, IS_STRING, 0)
@@ -69,3 +69,18 @@ static const zend_function_entry class_RedisSentinel_methods[] = {
ZEND_ME(RedisSentinel, slaves, arginfo_class_RedisSentinel_slaves, ZEND_ACC_PUBLIC)
ZEND_FE_END
};
+
+static zend_class_entry *register_class_RedisSentinel(void)
+{
+ zend_class_entry ce, *class_entry;
+
+ INIT_CLASS_ENTRY(ce, "RedisSentinel", class_RedisSentinel_methods);
+ class_entry = zend_register_internal_class_ex(&ce, NULL);
+#if (PHP_VERSION_ID >= 80200)
+
+
+ zend_add_parameter_attribute(zend_hash_str_find_ptr(&class_entry->function_table, "__construct", sizeof("__construct") - 1), 6, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0);
+#endif
+
+ return class_entry;
+}
diff --git a/redis_sentinel_legacy_arginfo.h b/redis_sentinel_legacy_arginfo.h
index 8f35e6c1..30b58dff 100644
--- a/redis_sentinel_legacy_arginfo.h
+++ b/redis_sentinel_legacy_arginfo.h
@@ -1,5 +1,5 @@
/* This is a generated file, edit the .stub.php file instead.
- * Stub hash: deae7b4a55435fb2ab39f314544064a34c56d218 */
+ * Stub hash: 946942bc5a7612650fc0416902778452f6860d13 */
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_RedisSentinel___construct, 0, 0, 1)
ZEND_ARG_INFO(0, host)
@@ -68,3 +68,13 @@ static const zend_function_entry class_RedisSentinel_methods[] = {
ZEND_ME(RedisSentinel, slaves, arginfo_class_RedisSentinel_slaves, ZEND_ACC_PUBLIC)
ZEND_FE_END
};
+
+static zend_class_entry *register_class_RedisSentinel(void)
+{
+ zend_class_entry ce, *class_entry;
+
+ INIT_CLASS_ENTRY(ce, "RedisSentinel", class_RedisSentinel_methods);
+ class_entry = zend_register_internal_class_ex(&ce, NULL);
+
+ return class_entry;
+}