From 24fe646c4e64fa3f6b45272802895c8f91e9b9b6 Mon Sep 17 00:00:00 2001 From: Adam Saponara Date: Tue, 28 Jun 2022 23:49:12 -0400 Subject: [PATCH] php: Deprecate `forget_*` functions in PHP 8+ These functions don't work with PHP 8+ and also don't seem to be necessary anymore when reloading scripts. --- src/plugins/php/weechat-php-api.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/plugins/php/weechat-php-api.c b/src/plugins/php/weechat-php-api.c index f365bfa1e..6d47fbea6 100644 --- a/src/plugins/php/weechat-php-api.c +++ b/src/plugins/php/weechat-php-api.c @@ -5446,6 +5446,9 @@ API_FUNC(upgrade_close) static void forget_hash_entry (HashTable *ht, INTERNAL_FUNCTION_PARAMETERS) { +#if PHP_VERSION_ID >= 80000 + RETURN_FALSE; +#else zend_string *class_name; zend_string *lc_name; int re; @@ -5469,6 +5472,7 @@ forget_hash_entry (HashTable *ht, INTERNAL_FUNCTION_PARAMETERS) RETURN_TRUE; } RETURN_FALSE; +#endif } PHP_FUNCTION(forget_class)