diff --git a/Zend/tests/bug69802_2.phpt b/Zend/tests/bug69802_2.phpt index 63346f0afcb5c..0a5a4f960eb5b 100644 --- a/Zend/tests/bug69802_2.phpt +++ b/Zend/tests/bug69802_2.phpt @@ -7,7 +7,7 @@ $r = new ReflectionMethod($f, '__invoke'); var_dump($r->getParameters()[0]->getClass()); ?> --EXPECTF-- -Deprecated: Method ReflectionParameter::getClass() is deprecated in %s on line %d +Deprecated: Method ReflectionParameter::getClass() is deprecated, use ReflectionParameter::getType() instead in %s on line %d object(ReflectionClass)#4 (1) { ["name"]=> string(11) "Traversable" diff --git a/Zend/tests/type_declarations/callable_002.phpt b/Zend/tests/type_declarations/callable_002.phpt index ba47cf9ae5c39..5a1fa5ec1c009 100644 --- a/Zend/tests/type_declarations/callable_002.phpt +++ b/Zend/tests/type_declarations/callable_002.phpt @@ -21,11 +21,11 @@ var_dump($rc->getParameters()[0]->isCallable()); ?> --EXPECTF-- -Deprecated: Method ReflectionParameter::isCallable() is deprecated in %s on line %d +Deprecated: Method ReflectionParameter::isCallable() is deprecated, use ReflectionParameter::getType() instead in %s on line %d bool(true) -Deprecated: Method ReflectionParameter::isCallable() is deprecated in %s on line %d +Deprecated: Method ReflectionParameter::isCallable() is deprecated, use ReflectionParameter::getType() instead in %s on line %d bool(true) -Deprecated: Method ReflectionParameter::isCallable() is deprecated in %s on line %d +Deprecated: Method ReflectionParameter::isCallable() is deprecated, use ReflectionParameter::getType() instead in %s on line %d bool(true) diff --git a/ext/date/php_date.c b/ext/date/php_date.c index 0702f635230d4..da4606a93c1d9 100644 --- a/ext/date/php_date.c +++ b/ext/date/php_date.c @@ -20,6 +20,7 @@ #include "ext/standard/info.h" #include "ext/standard/php_versioning.h" #include "php_date.h" +#include "zend_attributes.h" #include "zend_interfaces.h" #include "zend_exceptions.h" #include "lib/timelib.h" diff --git a/ext/date/php_date.stub.php b/ext/date/php_date.stub.php index ec501be531b2a..91d53351cb2b6 100644 --- a/ext/date/php_date.stub.php +++ b/ext/date/php_date.stub.php @@ -120,14 +120,14 @@ function checkdate(int $month, int $day, int $year): bool {} /** * @refcount 1 - * @deprecated */ +#[\Deprecated] function strftime(string $format, ?int $timestamp = null): string|false {} /** * @refcount 1 - * @deprecated */ +#[\Deprecated] function gmstrftime(string $format, ?int $timestamp = null): string|false {} function time(): int {} @@ -260,8 +260,8 @@ function date_default_timezone_get(): string {} /** * @refcount 1 - * @deprecated */ +#[\Deprecated] function date_sunrise( int $timestamp, int $returnFormat = SUNFUNCS_RET_STRING, ?float $latitude = null, ?float $longitude = null, ?float $zenith = null, @@ -269,8 +269,8 @@ function date_sunrise( /** * @refcount 1 - * @deprecated */ +#[\Deprecated] function date_sunset( int $timestamp, int $returnFormat = SUNFUNCS_RET_STRING, ?float $latitude = null, ?float $longitude = null, ?float $zenith = null, diff --git a/ext/date/php_date_arginfo.h b/ext/date/php_date_arginfo.h index e567239d140b2..c78c8cc9a7f3f 100644 --- a/ext/date/php_date_arginfo.h +++ b/ext/date/php_date_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 8a84ebfe7bfd3107a5b4c3add5a2ab7116e951c0 */ + * Stub hash: 6602bfd43942cfa82b1bf13196ccce31e1e25409 */ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_strtotime, 0, 1, MAY_BE_LONG|MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(0, datetime, IS_STRING, 0) @@ -847,6 +847,15 @@ static void register_php_date_symbols(int module_number) REGISTER_LONG_CONSTANT("SUNFUNCS_RET_TIMESTAMP", SUNFUNCS_RET_TIMESTAMP, CONST_PERSISTENT); REGISTER_LONG_CONSTANT("SUNFUNCS_RET_STRING", SUNFUNCS_RET_STRING, CONST_PERSISTENT); REGISTER_LONG_CONSTANT("SUNFUNCS_RET_DOUBLE", SUNFUNCS_RET_DOUBLE, CONST_PERSISTENT); + + + zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "strftime", sizeof("strftime") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED), 0); + + zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "gmstrftime", sizeof("gmstrftime") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED), 0); + + zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "date_sunrise", sizeof("date_sunrise") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED), 0); + + zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "date_sunset", sizeof("date_sunset") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED), 0); } static zend_class_entry *register_class_DateTimeInterface(void) diff --git a/ext/enchant/enchant.c b/ext/enchant/enchant.c index 847f7c466b79b..2c264a23039f8 100644 --- a/ext/enchant/enchant.c +++ b/ext/enchant/enchant.c @@ -22,6 +22,7 @@ #include "php.h" #include "php_ini.h" #include "ext/standard/info.h" +#include "Zend/zend_attributes.h" #include "Zend/zend_exceptions.h" #include #include "php_enchant.h" diff --git a/ext/enchant/enchant.stub.php b/ext/enchant/enchant.stub.php index 764f9e5c3a16a..33238e7760cf7 100644 --- a/ext/enchant/enchant.stub.php +++ b/ext/enchant/enchant.stub.php @@ -40,15 +40,15 @@ final class EnchantDictionary function enchant_broker_init(): EnchantBroker|false {} -/** @deprecated */ +#[\Deprecated(message: 'EnchantBroker object is freed automatically', since: '8.1')] function enchant_broker_free(EnchantBroker $broker): bool {} function enchant_broker_get_error(EnchantBroker $broker): string|false {} -/** @deprecated */ +#[\Deprecated(since: '8.1')] function enchant_broker_set_dict_path(EnchantBroker $broker, int $type, string $path): bool {} -/** @deprecated */ +#[\Deprecated(since: '8.1')] function enchant_broker_get_dict_path(EnchantBroker $broker, int $type): string|false {} /** @@ -61,7 +61,7 @@ function enchant_broker_request_dict(EnchantBroker $broker, string $tag): Enchan function enchant_broker_request_pwl_dict(EnchantBroker $broker, string $filename): EnchantDictionary|false {} -/** @deprecated */ +#[\Deprecated(message: 'EnchantDictionary object is freed automatically', since: '8.1')] function enchant_broker_free_dict(EnchantDictionary $dictionary): bool {} function enchant_broker_dict_exists(EnchantBroker $broker, string $tag): bool {} @@ -89,8 +89,8 @@ function enchant_dict_add(EnchantDictionary $dictionary, string $word): void {} /** * @alias enchant_dict_add -* @deprecated */ +#[\Deprecated(since: '8.1')] function enchant_dict_add_to_personal(EnchantDictionary $dictionary, string $word): void {} function enchant_dict_add_to_session(EnchantDictionary $dictionary, string $word): void {} @@ -99,8 +99,8 @@ function enchant_dict_is_added(EnchantDictionary $dictionary, string $word): boo /** * @alias enchant_dict_is_added -* @deprecated */ +#[\Deprecated(since: '8.1')] function enchant_dict_is_in_session(EnchantDictionary $dictionary, string $word): bool {} function enchant_dict_store_replacement(EnchantDictionary $dictionary, string $misspelled, string $correct): void {} diff --git a/ext/enchant/enchant_arginfo.h b/ext/enchant/enchant_arginfo.h index f67e0828881ca..b9828af536012 100644 --- a/ext/enchant/enchant_arginfo.h +++ b/ext/enchant/enchant_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 42bb5a4488d254e87d763c75ccff62e283e63335 */ + * Stub hash: 5eddb10cfd9588417278afc7b86179af7033d70a */ ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_enchant_broker_init, 0, 0, EnchantBroker, MAY_BE_FALSE) ZEND_END_ARG_INFO() @@ -161,6 +161,59 @@ static void register_enchant_symbols(int module_number) #if defined(HAVE_ENCHANT_GET_VERSION) REGISTER_STRING_CONSTANT("LIBENCHANT_VERSION", PHP_ENCHANT_GET_VERSION, CONST_PERSISTENT); #endif + + + zend_attribute *attribute_Deprecated_func_enchant_broker_free_0 = zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "enchant_broker_free", sizeof("enchant_broker_free") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED), 2); + zval attribute_Deprecated_func_enchant_broker_free_0_arg0; + zend_string *attribute_Deprecated_func_enchant_broker_free_0_arg0_str = zend_string_init("EnchantBroker object is freed automatically", strlen("EnchantBroker object is freed automatically"), 1); + ZVAL_STR(&attribute_Deprecated_func_enchant_broker_free_0_arg0, attribute_Deprecated_func_enchant_broker_free_0_arg0_str); + ZVAL_COPY_VALUE(&attribute_Deprecated_func_enchant_broker_free_0->args[0].value, &attribute_Deprecated_func_enchant_broker_free_0_arg0); + attribute_Deprecated_func_enchant_broker_free_0->args[0].name = ZSTR_KNOWN(ZEND_STR_MESSAGE); + zval attribute_Deprecated_func_enchant_broker_free_0_arg1; + zend_string *attribute_Deprecated_func_enchant_broker_free_0_arg1_str = zend_string_init("8.1", strlen("8.1"), 1); + ZVAL_STR(&attribute_Deprecated_func_enchant_broker_free_0_arg1, attribute_Deprecated_func_enchant_broker_free_0_arg1_str); + ZVAL_COPY_VALUE(&attribute_Deprecated_func_enchant_broker_free_0->args[1].value, &attribute_Deprecated_func_enchant_broker_free_0_arg1); + attribute_Deprecated_func_enchant_broker_free_0->args[1].name = ZSTR_KNOWN(ZEND_STR_SINCE); + + zend_attribute *attribute_Deprecated_func_enchant_broker_set_dict_path_0 = zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "enchant_broker_set_dict_path", sizeof("enchant_broker_set_dict_path") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED), 1); + zval attribute_Deprecated_func_enchant_broker_set_dict_path_0_arg0; + zend_string *attribute_Deprecated_func_enchant_broker_set_dict_path_0_arg0_str = zend_string_init("8.1", strlen("8.1"), 1); + ZVAL_STR(&attribute_Deprecated_func_enchant_broker_set_dict_path_0_arg0, attribute_Deprecated_func_enchant_broker_set_dict_path_0_arg0_str); + ZVAL_COPY_VALUE(&attribute_Deprecated_func_enchant_broker_set_dict_path_0->args[0].value, &attribute_Deprecated_func_enchant_broker_set_dict_path_0_arg0); + attribute_Deprecated_func_enchant_broker_set_dict_path_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE); + + zend_attribute *attribute_Deprecated_func_enchant_broker_get_dict_path_0 = zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "enchant_broker_get_dict_path", sizeof("enchant_broker_get_dict_path") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED), 1); + zval attribute_Deprecated_func_enchant_broker_get_dict_path_0_arg0; + zend_string *attribute_Deprecated_func_enchant_broker_get_dict_path_0_arg0_str = zend_string_init("8.1", strlen("8.1"), 1); + ZVAL_STR(&attribute_Deprecated_func_enchant_broker_get_dict_path_0_arg0, attribute_Deprecated_func_enchant_broker_get_dict_path_0_arg0_str); + ZVAL_COPY_VALUE(&attribute_Deprecated_func_enchant_broker_get_dict_path_0->args[0].value, &attribute_Deprecated_func_enchant_broker_get_dict_path_0_arg0); + attribute_Deprecated_func_enchant_broker_get_dict_path_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE); + + zend_attribute *attribute_Deprecated_func_enchant_broker_free_dict_0 = zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "enchant_broker_free_dict", sizeof("enchant_broker_free_dict") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED), 2); + zval attribute_Deprecated_func_enchant_broker_free_dict_0_arg0; + zend_string *attribute_Deprecated_func_enchant_broker_free_dict_0_arg0_str = zend_string_init("EnchantDictionary object is freed automatically", strlen("EnchantDictionary object is freed automatically"), 1); + ZVAL_STR(&attribute_Deprecated_func_enchant_broker_free_dict_0_arg0, attribute_Deprecated_func_enchant_broker_free_dict_0_arg0_str); + ZVAL_COPY_VALUE(&attribute_Deprecated_func_enchant_broker_free_dict_0->args[0].value, &attribute_Deprecated_func_enchant_broker_free_dict_0_arg0); + attribute_Deprecated_func_enchant_broker_free_dict_0->args[0].name = ZSTR_KNOWN(ZEND_STR_MESSAGE); + zval attribute_Deprecated_func_enchant_broker_free_dict_0_arg1; + zend_string *attribute_Deprecated_func_enchant_broker_free_dict_0_arg1_str = zend_string_init("8.1", strlen("8.1"), 1); + ZVAL_STR(&attribute_Deprecated_func_enchant_broker_free_dict_0_arg1, attribute_Deprecated_func_enchant_broker_free_dict_0_arg1_str); + ZVAL_COPY_VALUE(&attribute_Deprecated_func_enchant_broker_free_dict_0->args[1].value, &attribute_Deprecated_func_enchant_broker_free_dict_0_arg1); + attribute_Deprecated_func_enchant_broker_free_dict_0->args[1].name = ZSTR_KNOWN(ZEND_STR_SINCE); + + zend_attribute *attribute_Deprecated_func_enchant_dict_add_to_personal_0 = zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "enchant_dict_add_to_personal", sizeof("enchant_dict_add_to_personal") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED), 1); + zval attribute_Deprecated_func_enchant_dict_add_to_personal_0_arg0; + zend_string *attribute_Deprecated_func_enchant_dict_add_to_personal_0_arg0_str = zend_string_init("8.1", strlen("8.1"), 1); + ZVAL_STR(&attribute_Deprecated_func_enchant_dict_add_to_personal_0_arg0, attribute_Deprecated_func_enchant_dict_add_to_personal_0_arg0_str); + ZVAL_COPY_VALUE(&attribute_Deprecated_func_enchant_dict_add_to_personal_0->args[0].value, &attribute_Deprecated_func_enchant_dict_add_to_personal_0_arg0); + attribute_Deprecated_func_enchant_dict_add_to_personal_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE); + + zend_attribute *attribute_Deprecated_func_enchant_dict_is_in_session_0 = zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "enchant_dict_is_in_session", sizeof("enchant_dict_is_in_session") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED), 1); + zval attribute_Deprecated_func_enchant_dict_is_in_session_0_arg0; + zend_string *attribute_Deprecated_func_enchant_dict_is_in_session_0_arg0_str = zend_string_init("8.1", strlen("8.1"), 1); + ZVAL_STR(&attribute_Deprecated_func_enchant_dict_is_in_session_0_arg0, attribute_Deprecated_func_enchant_dict_is_in_session_0_arg0_str); + ZVAL_COPY_VALUE(&attribute_Deprecated_func_enchant_dict_is_in_session_0->args[0].value, &attribute_Deprecated_func_enchant_dict_is_in_session_0_arg0); + attribute_Deprecated_func_enchant_dict_is_in_session_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE); } static zend_class_entry *register_class_EnchantBroker(void) diff --git a/ext/enchant/tests/broker_free.phpt b/ext/enchant/tests/broker_free.phpt index 9ede2e07cfbdd..d863398629b90 100644 --- a/ext/enchant/tests/broker_free.phpt +++ b/ext/enchant/tests/broker_free.phpt @@ -23,5 +23,5 @@ echo "OK\n"; --EXPECTF-- OK -Deprecated: Function enchant_broker_free() is deprecated in %s +Deprecated: Function enchant_broker_free() is deprecated since 8.1, EnchantBroker object is freed automatically in %s OK diff --git a/ext/enchant/tests/broker_free_dict.phpt b/ext/enchant/tests/broker_free_dict.phpt index f10eddad1f574..3084bb3218b8b 100644 --- a/ext/enchant/tests/broker_free_dict.phpt +++ b/ext/enchant/tests/broker_free_dict.phpt @@ -50,6 +50,6 @@ OK OK NULL -Deprecated: Function enchant_broker_free_dict() is deprecated in %s +Deprecated: Function enchant_broker_free_dict() is deprecated since 8.1, EnchantDictionary object is freed automatically in %s OK OK diff --git a/ext/enchant/tests/bug53070.phpt b/ext/enchant/tests/bug53070.phpt index 64223c2fcb2c3..f7a1e11cb7559 100644 --- a/ext/enchant/tests/bug53070.phpt +++ b/ext/enchant/tests/bug53070.phpt @@ -16,14 +16,14 @@ var_dump(enchant_broker_get_dict_path($broker, ENCHANT_ISPELL)); --EXPECTF-- Deprecated: Constant ENCHANT_MYSPELL is deprecated in %s -Deprecated: Function enchant_broker_get_dict_path() is deprecated in %s +Deprecated: Function enchant_broker_get_dict_path() is deprecated since 8.1 in %s Warning: enchant_broker_get_dict_path(): dict_path not set in %s on line %d bool(false) Deprecated: Constant ENCHANT_ISPELL is deprecated in %s -Deprecated: Function enchant_broker_get_dict_path() is deprecated in %s +Deprecated: Function enchant_broker_get_dict_path() is deprecated since 8.1 in %s Warning: enchant_broker_get_dict_path(): dict_path not set in %s on line %d bool(false) diff --git a/ext/enchant/tests/enchant_broker_set_dict_path.phpt b/ext/enchant/tests/enchant_broker_set_dict_path.phpt index 901805e02838c..fa381592d1ea2 100644 --- a/ext/enchant/tests/enchant_broker_set_dict_path.phpt +++ b/ext/enchant/tests/enchant_broker_set_dict_path.phpt @@ -51,13 +51,13 @@ if (is_object($broker)) { --EXPECTF-- OK -Deprecated: Function enchant_broker_set_dict_path() is deprecated in %s +Deprecated: Function enchant_broker_set_dict_path() is deprecated since 8.1 in %s OK -Deprecated: Function enchant_broker_set_dict_path() is deprecated in %s +Deprecated: Function enchant_broker_set_dict_path() is deprecated since 8.1 in %s OK -Deprecated: Function enchant_broker_get_dict_path() is deprecated in %s +Deprecated: Function enchant_broker_get_dict_path() is deprecated since 8.1 in %s -Deprecated: Function enchant_broker_get_dict_path() is deprecated in %s +Deprecated: Function enchant_broker_get_dict_path() is deprecated since 8.1 in %s OK diff --git a/ext/hash/hash.stub.php b/ext/hash/hash.stub.php index fc88306237963..d65bad5ea005f 100644 --- a/ext/hash/hash.stub.php +++ b/ext/hash/hash.stub.php @@ -70,28 +70,28 @@ function hash_equals(#[\SensitiveParameter] string $known_string, #[\SensitivePa function hash_hkdf(string $algo, #[\SensitiveParameter] string $key, int $length = 0, string $info = "", string $salt = ""): string {} #ifdef PHP_MHASH_BC -/** @deprecated */ +#[\Deprecated] function mhash_get_block_size(int $algo): int|false {} /** * @refcount 1 - * @deprecated */ +#[\Deprecated] function mhash_get_hash_name(int $algo): string|false {} /** * @refcount 1 - * @deprecated */ +#[\Deprecated] function mhash_keygen_s2k(int $algo, string $password, string $salt, int $length): string|false {} -/** @deprecated */ +#[\Deprecated] function mhash_count(): int {} /** * @refcount 1 - * @deprecated */ +#[\Deprecated] function mhash(int $algo, string $data, ?string $key = null): string|false {} #endif diff --git a/ext/hash/hash_arginfo.h b/ext/hash/hash_arginfo.h index d41664d9a1146..86ab746a6873b 100644 --- a/ext/hash/hash_arginfo.h +++ b/ext/hash/hash_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: df078e28c10c9af51b6c4e98c4ad4827e1f32bed */ + * Stub hash: 8879c355810d211645dd6de31998ad39acf257bc */ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_hash, 0, 2, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, algo, IS_STRING, 0) @@ -230,6 +230,26 @@ static void register_hash_symbols(int module_number) zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "hash_equals", sizeof("hash_equals") - 1), 1, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "hash_hkdf", sizeof("hash_hkdf") - 1), 1, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); +#if defined(PHP_MHASH_BC) + + zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "mhash_get_block_size", sizeof("mhash_get_block_size") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED), 0); +#endif +#if defined(PHP_MHASH_BC) + + zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "mhash_get_hash_name", sizeof("mhash_get_hash_name") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED), 0); +#endif +#if defined(PHP_MHASH_BC) + + zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "mhash_keygen_s2k", sizeof("mhash_keygen_s2k") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED), 0); +#endif +#if defined(PHP_MHASH_BC) + + zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "mhash_count", sizeof("mhash_count") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED), 0); +#endif +#if defined(PHP_MHASH_BC) + + zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "mhash", sizeof("mhash") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED), 0); +#endif } static zend_class_entry *register_class_HashContext(void) diff --git a/ext/intl/formatter/formatter.stub.php b/ext/intl/formatter/formatter.stub.php index 8d824789c5db9..b6f38e35481b3 100644 --- a/ext/intl/formatter/formatter.stub.php +++ b/ext/intl/formatter/formatter.stub.php @@ -180,9 +180,9 @@ class NumberFormatter /** @cvalue FORMAT_TYPE_DOUBLE */ public const int TYPE_DOUBLE = UNKNOWN; /** - * @deprecated * @cvalue FORMAT_TYPE_CURRENCY */ + #[\Deprecated(since: '8.3')] public const int TYPE_CURRENCY = UNKNOWN; public function __construct(string $locale, int $style, ?string $pattern = null) {} diff --git a/ext/intl/formatter/formatter_arginfo.h b/ext/intl/formatter/formatter_arginfo.h index 1942b342ecb90..0f067ee73c697 100644 --- a/ext/intl/formatter/formatter_arginfo.h +++ b/ext/intl/formatter/formatter_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 3f8b9961bc62392c50e3871c88ea4d0934d62c6a */ + * Stub hash: 79398fd5abd2d1f5176388b67423d937d0e25da4 */ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_NumberFormatter___construct, 0, 0, 2) ZEND_ARG_TYPE_INFO(0, locale, IS_STRING, 0) @@ -589,8 +589,16 @@ static zend_class_entry *register_class_NumberFormatter(void) zval const_TYPE_CURRENCY_value; ZVAL_LONG(&const_TYPE_CURRENCY_value, FORMAT_TYPE_CURRENCY); zend_string *const_TYPE_CURRENCY_name = zend_string_init_interned("TYPE_CURRENCY", sizeof("TYPE_CURRENCY") - 1, 1); - zend_declare_typed_class_constant(class_entry, const_TYPE_CURRENCY_name, &const_TYPE_CURRENCY_value, ZEND_ACC_PUBLIC|ZEND_ACC_DEPRECATED, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); + zend_class_constant *const_TYPE_CURRENCY = zend_declare_typed_class_constant(class_entry, const_TYPE_CURRENCY_name, &const_TYPE_CURRENCY_value, ZEND_ACC_PUBLIC|ZEND_ACC_DEPRECATED, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_TYPE_CURRENCY_name); + + zend_attribute *attribute_Deprecated_const_TYPE_CURRENCY_0 = zend_add_class_constant_attribute(class_entry, const_TYPE_CURRENCY, ZSTR_KNOWN(ZEND_STR_DEPRECATED), 1); + zval attribute_Deprecated_const_TYPE_CURRENCY_0_arg0; + zend_string *attribute_Deprecated_const_TYPE_CURRENCY_0_arg0_str = zend_string_init("8.3", strlen("8.3"), 1); + ZVAL_STR(&attribute_Deprecated_const_TYPE_CURRENCY_0_arg0, attribute_Deprecated_const_TYPE_CURRENCY_0_arg0_str); + ZVAL_COPY_VALUE(&attribute_Deprecated_const_TYPE_CURRENCY_0->args[0].value, &attribute_Deprecated_const_TYPE_CURRENCY_0_arg0); + attribute_Deprecated_const_TYPE_CURRENCY_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE); + return class_entry; } diff --git a/ext/intl/formatter/formatter_class.c b/ext/intl/formatter/formatter_class.c index 89ff5e2b5d4db..7832824c94e1c 100644 --- a/ext/intl/formatter/formatter_class.c +++ b/ext/intl/formatter/formatter_class.c @@ -18,11 +18,13 @@ #include "php_intl.h" #include "formatter_data.h" #include "formatter_format.h" -#include "formatter_arginfo.h" #include +#include "Zend/zend_attributes.h" #include "Zend/zend_interfaces.h" +#include "formatter_arginfo.h" + zend_class_entry *NumberFormatter_ce_ptr = NULL; static zend_object_handlers NumberFormatter_handlers; diff --git a/ext/intl/php_intl.c b/ext/intl/php_intl.c index eee9e77c19d78..cba18f5ae07b1 100644 --- a/ext/intl/php_intl.c +++ b/ext/intl/php_intl.c @@ -72,6 +72,8 @@ #include "php_ini.h" +#include "zend_attributes.h" + #include "php_intl_arginfo.h" /* diff --git a/ext/intl/php_intl.stub.php b/ext/intl/php_intl.stub.php index c03ee482123f2..24e02be8b59f0 100644 --- a/ext/intl/php_intl.stub.php +++ b/ext/intl/php_intl.stub.php @@ -201,7 +201,7 @@ function intlcal_after(IntlCalendar $calendar, IntlCalendar $other): bool {} function intlcal_before(IntlCalendar $calendar, IntlCalendar $other): bool {} -/** @deprecated */ +#[\Deprecated(since: '8.4')] function intlcal_set(IntlCalendar $calendar, int $year, int $month, int $dayOfMonth = UNKNOWN, int $hour = UNKNOWN, int $minute = UNKNOWN, int $second = UNKNOWN): true {} /** @param int|bool $value */ @@ -278,8 +278,8 @@ function intlcal_get_error_message(IntlCalendar $calendar): string|false {} * @param int $hour * @param int $minute * @param int $second - * @deprecated */ +#[\Deprecated(since: '8.4')] function intlgregcal_create_instance($timezoneOrYear = UNKNOWN, $localeOrMonth = UNKNOWN, $day = UNKNOWN, $hour = UNKNOWN, $minute = UNKNOWN, $second = UNKNOWN): ?IntlGregorianCalendar {} function intlgregcal_set_gregorian_change(IntlGregorianCalendar $calendar, float $timestamp): bool {} diff --git a/ext/intl/php_intl_arginfo.h b/ext/intl/php_intl_arginfo.h index 8e632029bf0e1..a46c4cc62b22c 100644 --- a/ext/intl/php_intl_arginfo.h +++ b/ext/intl/php_intl_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: b45ef763d82e1ad9ab27336fd0ab95e2d2e79a90 */ + * Stub hash: ab32e4760858272b27b37bae058586a32124d1dd */ ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_intlcal_create_instance, 0, 0, IntlCalendar, 1) ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, timezone, "null") @@ -1218,6 +1218,21 @@ static void register_php_intl_symbols(int module_number) REGISTER_LONG_CONSTANT("IDNA_ERROR_INVALID_ACE_LABEL", UIDNA_ERROR_INVALID_ACE_LABEL, CONST_PERSISTENT); REGISTER_LONG_CONSTANT("IDNA_ERROR_BIDI", UIDNA_ERROR_BIDI, CONST_PERSISTENT); REGISTER_LONG_CONSTANT("IDNA_ERROR_CONTEXTJ", UIDNA_ERROR_CONTEXTJ, CONST_PERSISTENT); + + + zend_attribute *attribute_Deprecated_func_intlcal_set_0 = zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "intlcal_set", sizeof("intlcal_set") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED), 1); + zval attribute_Deprecated_func_intlcal_set_0_arg0; + zend_string *attribute_Deprecated_func_intlcal_set_0_arg0_str = zend_string_init("8.4", strlen("8.4"), 1); + ZVAL_STR(&attribute_Deprecated_func_intlcal_set_0_arg0, attribute_Deprecated_func_intlcal_set_0_arg0_str); + ZVAL_COPY_VALUE(&attribute_Deprecated_func_intlcal_set_0->args[0].value, &attribute_Deprecated_func_intlcal_set_0_arg0); + attribute_Deprecated_func_intlcal_set_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE); + + zend_attribute *attribute_Deprecated_func_intlgregcal_create_instance_0 = zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "intlgregcal_create_instance", sizeof("intlgregcal_create_instance") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED), 1); + zval attribute_Deprecated_func_intlgregcal_create_instance_0_arg0; + zend_string *attribute_Deprecated_func_intlgregcal_create_instance_0_arg0_str = zend_string_init("8.4", strlen("8.4"), 1); + ZVAL_STR(&attribute_Deprecated_func_intlgregcal_create_instance_0_arg0, attribute_Deprecated_func_intlgregcal_create_instance_0_arg0_str); + ZVAL_COPY_VALUE(&attribute_Deprecated_func_intlgregcal_create_instance_0->args[0].value, &attribute_Deprecated_func_intlgregcal_create_instance_0_arg0); + attribute_Deprecated_func_intlgregcal_create_instance_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE); } static zend_class_entry *register_class_IntlException(zend_class_entry *class_entry_Exception) diff --git a/ext/intl/tests/calendar_set_basic.phpt b/ext/intl/tests/calendar_set_basic.phpt index 56017f2bf554b..906b39505656c 100644 --- a/ext/intl/tests/calendar_set_basic.phpt +++ b/ext/intl/tests/calendar_set_basic.phpt @@ -20,6 +20,6 @@ var_dump($intlcal->get(IntlCalendar::FIELD_DAY_OF_MONTH)); bool(true) int(2) -Deprecated: Function intlcal_set() is deprecated in %s on line %d +Deprecated: Function intlcal_set() is deprecated since 8.4 in %s on line %d bool(true) int(3) diff --git a/ext/intl/tests/calendar_set_error.phpt b/ext/intl/tests/calendar_set_error.phpt index d91c9449ac442..4aa1c429fd5fd 100644 --- a/ext/intl/tests/calendar_set_error.phpt +++ b/ext/intl/tests/calendar_set_error.phpt @@ -48,8 +48,8 @@ Deprecated: Calling IntlCalendar::set() with more than 2 arguments is deprecated IntlCalendar::set() has no variant with exactly 4 parameters IntlCalendar::set(): Argument #1 ($year) must be a valid field -Deprecated: Function intlcal_set() is deprecated in %s on line %d +Deprecated: Function intlcal_set() is deprecated since 8.4 in %s on line %d intlcal_set(): Argument #2 ($year) must be a valid field -Deprecated: Function intlcal_set() is deprecated in %s on line %d +Deprecated: Function intlcal_set() is deprecated since 8.4 in %s on line %d intlcal_set(): Argument #1 ($calendar) must be of type IntlCalendar, int given diff --git a/ext/intl/tests/deprecated_number_formater_type_currency.phpt b/ext/intl/tests/deprecated_number_formater_type_currency.phpt index bbc53cc291012..e8b76cdbc6d93 100644 --- a/ext/intl/tests/deprecated_number_formater_type_currency.phpt +++ b/ext/intl/tests/deprecated_number_formater_type_currency.phpt @@ -8,8 +8,8 @@ var_dump(NumberFormatter::TYPE_CURRENCY); var_dump(constant('NumberFormatter::TYPE_CURRENCY')); ?> --EXPECTF-- -Deprecated: Constant NumberFormatter::TYPE_CURRENCY is deprecated in %s on line %d +Deprecated: Constant NumberFormatter::TYPE_CURRENCY is deprecated since 8.3 in %s on line %d int(4) -Deprecated: Constant NumberFormatter::TYPE_CURRENCY is deprecated in %s on line %d +Deprecated: Constant NumberFormatter::TYPE_CURRENCY is deprecated since 8.3 in %s on line %d int(4) diff --git a/ext/intl/tests/formatter_format_and_parse_errors.phpt b/ext/intl/tests/formatter_format_and_parse_errors.phpt index e58455c5e4e98..e2d1cde891339 100644 --- a/ext/intl/tests/formatter_format_and_parse_errors.phpt +++ b/ext/intl/tests/formatter_format_and_parse_errors.phpt @@ -60,14 +60,14 @@ NumberFormatter::format(): Argument #2 ($type) must be a NumberFormatter::TYPE_* numfmt_parse(): Argument #3 ($type) must be a NumberFormatter::TYPE_* constant NumberFormatter::parse(): Argument #2 ($type) must be a NumberFormatter::TYPE_* constant -Deprecated: Constant NumberFormatter::TYPE_CURRENCY is deprecated in %s on line %d +Deprecated: Constant NumberFormatter::TYPE_CURRENCY is deprecated since 8.3 in %s on line %d numfmt_format(): Argument #3 ($type) cannot be NumberFormatter::TYPE_CURRENCY constant, use numfmt_format_currency() function instead -Deprecated: Constant NumberFormatter::TYPE_CURRENCY is deprecated in %s on line %d +Deprecated: Constant NumberFormatter::TYPE_CURRENCY is deprecated since 8.3 in %s on line %d NumberFormatter::format(): Argument #2 ($type) cannot be NumberFormatter::TYPE_CURRENCY constant, use NumberFormatter::formatCurrency() method instead -Deprecated: Constant NumberFormatter::TYPE_CURRENCY is deprecated in %s on line %d +Deprecated: Constant NumberFormatter::TYPE_CURRENCY is deprecated since 8.3 in %s on line %d numfmt_parse(): Argument #3 ($type) cannot be NumberFormatter::TYPE_CURRENCY constant, use numfmt_parse_currency() function instead -Deprecated: Constant NumberFormatter::TYPE_CURRENCY is deprecated in %s on line %d +Deprecated: Constant NumberFormatter::TYPE_CURRENCY is deprecated since 8.3 in %s on line %d NumberFormatter::parse(): Argument #2 ($type) cannot be NumberFormatter::TYPE_CURRENCY constant, use NumberFormatter::parseCurrency() method instead diff --git a/ext/intl/tests/gregoriancalendar___construct_basic.phpt b/ext/intl/tests/gregoriancalendar___construct_basic.phpt index 8e8240a11a808..2d7359b75cfa3 100644 --- a/ext/intl/tests/gregoriancalendar___construct_basic.phpt +++ b/ext/intl/tests/gregoriancalendar___construct_basic.phpt @@ -32,7 +32,7 @@ var_dump($intlcal->getLocale(1)); var_dump($intlcal->getType()); ?> --EXPECTF-- -Deprecated: Function intlgregcal_create_instance() is deprecated in %s on line %d +Deprecated: Function intlgregcal_create_instance() is deprecated since 8.4 in %s on line %d string(16) "Europe/Amsterdam" string(5) "nl_NL" string(13) "Europe/Lisbon" diff --git a/ext/intl/tests/gregoriancalendar___construct_error.phpt b/ext/intl/tests/gregoriancalendar___construct_error.phpt index e25dd0f1c98e8..b885a4ab2fa03 100644 --- a/ext/intl/tests/gregoriancalendar___construct_error.phpt +++ b/ext/intl/tests/gregoriancalendar___construct_error.phpt @@ -40,13 +40,13 @@ try { } ?> --EXPECTF-- -Deprecated: Function intlgregcal_create_instance() is deprecated in %s on line %d +Deprecated: Function intlgregcal_create_instance() is deprecated since 8.4 in %s on line %d Too many arguments -Deprecated: Function intlgregcal_create_instance() is deprecated in %s on line %d +Deprecated: Function intlgregcal_create_instance() is deprecated since 8.4 in %s on line %d Too many arguments -Deprecated: Function intlgregcal_create_instance() is deprecated in %s on line %d +Deprecated: Function intlgregcal_create_instance() is deprecated since 8.4 in %s on line %d No variant with 4 arguments (excluding trailing NULLs) Deprecated: Calling IntlGregorianCalendar::__construct() with more than 2 arguments is deprecated, use either IntlGregorianCalendar::createFromDate() or IntlGregorianCalendar::createFromDateTime() instead in %s on line %d diff --git a/ext/intl/tests/gregoriancalendar___construct_variant1.phpt b/ext/intl/tests/gregoriancalendar___construct_variant1.phpt index 3590d39308a24..76885934c844b 100644 --- a/ext/intl/tests/gregoriancalendar___construct_variant1.phpt +++ b/ext/intl/tests/gregoriancalendar___construct_variant1.phpt @@ -18,7 +18,7 @@ var_dump($intlcal->getTime(), (float)strtotime('2012-02-29 16:07:08') * 1000); var_dump($intlcal->getType()); ?> --EXPECTF-- -Deprecated: Function intlgregcal_create_instance() is deprecated in %s on line %d +Deprecated: Function intlgregcal_create_instance() is deprecated since 8.4 in %s on line %d string(16) "Europe/Amsterdam" float(1330527600000) float(1330527600000) diff --git a/ext/libxml/libxml.c b/ext/libxml/libxml.c index 83179607368b5..e6b42cbe3372c 100644 --- a/ext/libxml/libxml.c +++ b/ext/libxml/libxml.c @@ -22,6 +22,7 @@ #include "php.h" #include "SAPI.h" +#include "zend_attributes.h" #include "zend_variables.h" #include "ext/standard/info.h" #include "ext/standard/file.h" diff --git a/ext/libxml/libxml.stub.php b/ext/libxml/libxml.stub.php index ac9220c4f1d0e..9c01eec2489c9 100644 --- a/ext/libxml/libxml.stub.php +++ b/ext/libxml/libxml.stub.php @@ -172,7 +172,7 @@ function libxml_get_errors(): array {} function libxml_clear_errors(): void {} -/** @deprecated */ +#[\Deprecated(since: '8.0')] function libxml_disable_entity_loader(bool $disable = true): bool {} function libxml_set_external_entity_loader(?callable $resolver_function): bool {} diff --git a/ext/libxml/libxml_arginfo.h b/ext/libxml/libxml_arginfo.h index a4c072a9b02e6..0d46d66d967a3 100644 --- a/ext/libxml/libxml_arginfo.h +++ b/ext/libxml/libxml_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 08e4e3f10ba89430292831f50c4760a362593282 */ + * Stub hash: defe2500313f458620b1db9cce8a2042f246a557 */ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_libxml_set_streams_context, 0, 1, IS_VOID, 0) ZEND_ARG_INFO(0, context) @@ -86,6 +86,14 @@ static void register_libxml_symbols(int module_number) REGISTER_LONG_CONSTANT("LIBXML_ERR_WARNING", XML_ERR_WARNING, CONST_PERSISTENT); REGISTER_LONG_CONSTANT("LIBXML_ERR_ERROR", XML_ERR_ERROR, CONST_PERSISTENT); REGISTER_LONG_CONSTANT("LIBXML_ERR_FATAL", XML_ERR_FATAL, CONST_PERSISTENT); + + + zend_attribute *attribute_Deprecated_func_libxml_disable_entity_loader_0 = zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "libxml_disable_entity_loader", sizeof("libxml_disable_entity_loader") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED), 1); + zval attribute_Deprecated_func_libxml_disable_entity_loader_0_arg0; + zend_string *attribute_Deprecated_func_libxml_disable_entity_loader_0_arg0_str = zend_string_init("8.0", strlen("8.0"), 1); + ZVAL_STR(&attribute_Deprecated_func_libxml_disable_entity_loader_0_arg0, attribute_Deprecated_func_libxml_disable_entity_loader_0_arg0_str); + ZVAL_COPY_VALUE(&attribute_Deprecated_func_libxml_disable_entity_loader_0->args[0].value, &attribute_Deprecated_func_libxml_disable_entity_loader_0_arg0); + attribute_Deprecated_func_libxml_disable_entity_loader_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE); } static zend_class_entry *register_class_LibXMLError(void) diff --git a/ext/libxml/tests/libxml_disable_entity_loader.phpt b/ext/libxml/tests/libxml_disable_entity_loader.phpt index 7a9d82e6bcac4..65459cadcd837 100644 --- a/ext/libxml/tests/libxml_disable_entity_loader.phpt +++ b/ext/libxml/tests/libxml_disable_entity_loader.phpt @@ -37,7 +37,7 @@ echo "Done\n"; --EXPECTF-- bool(true) -Deprecated: Function libxml_disable_entity_loader() is deprecated in %s on line %d +Deprecated: Function libxml_disable_entity_loader() is deprecated since 8.0 in %s on line %d bool(false) Warning: DOMDocument::loadXML(): I/O warning : failed to load external entity "%s" in %s on line %d diff --git a/ext/libxml/tests/libxml_disable_entity_loader_2.phpt b/ext/libxml/tests/libxml_disable_entity_loader_2.phpt index 2cbd4dc8f5a0c..e299dbcae21e0 100644 --- a/ext/libxml/tests/libxml_disable_entity_loader_2.phpt +++ b/ext/libxml/tests/libxml_disable_entity_loader_2.phpt @@ -37,7 +37,7 @@ echo "Done\n"; --EXPECTF-- bool(true) -Deprecated: Function libxml_disable_entity_loader() is deprecated in %s on line %d +Deprecated: Function libxml_disable_entity_loader() is deprecated since 8.0 in %s on line %d bool(false) Warning: DOMDocument::loadXML(): %Sfailed to load external entity "%s" in %s on line %d diff --git a/ext/mysqli/mysqli.stub.php b/ext/mysqli/mysqli.stub.php index fed02e14b02e7..afba393fa2edf 100644 --- a/ext/mysqli/mysqli.stub.php +++ b/ext/mysqli/mysqli.stub.php @@ -821,8 +821,8 @@ public function execute_query(string $query, ?array $params = null): mysqli_resu /** * @tentative-return-type * @alias mysqli_get_client_info - * @deprecated 8.1.0 */ + #[\Deprecated(since: '8.1', message: 'use mysqli_get_client_info() instead')] public function get_client_info(): string {} /** @@ -845,9 +845,9 @@ public function get_server_info(): string {} public function get_warnings(): mysqli_warning|false {} /** - * @deprecated * @return bool|null * */ + #[\Deprecated(since: '8.1', message: 'replace calls to parent::init() with parent::__construct()')] public function init() {} /** diff --git a/ext/mysqli/mysqli_arginfo.h b/ext/mysqli/mysqli_arginfo.h index 3390016d4f4b9..4565c989c9658 100644 --- a/ext/mysqli/mysqli_arginfo.h +++ b/ext/mysqli/mysqli_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: eb43a01e76fc18bc56572129be8d6dfce1a1e52a */ + * Stub hash: 69e41b1b2ec5f46193a9defb75e401ac69588d95 */ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mysqli_affected_rows, 0, 1, MAY_BE_LONG|MAY_BE_STRING) ZEND_ARG_OBJ_INFO(0, mysql, mysqli, 0) @@ -1331,6 +1331,30 @@ static zend_class_entry *register_class_mysqli(void) zend_add_parameter_attribute(zend_hash_str_find_ptr(&class_entry->function_table, "connect", sizeof("connect") - 1), 2, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_attribute *attribute_Deprecated_func_get_client_info_0 = zend_add_function_attribute(zend_hash_str_find_ptr(&class_entry->function_table, "get_client_info", sizeof("get_client_info") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED), 2); + zval attribute_Deprecated_func_get_client_info_0_arg0; + zend_string *attribute_Deprecated_func_get_client_info_0_arg0_str = zend_string_init("8.1", strlen("8.1"), 1); + ZVAL_STR(&attribute_Deprecated_func_get_client_info_0_arg0, attribute_Deprecated_func_get_client_info_0_arg0_str); + ZVAL_COPY_VALUE(&attribute_Deprecated_func_get_client_info_0->args[0].value, &attribute_Deprecated_func_get_client_info_0_arg0); + attribute_Deprecated_func_get_client_info_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE); + zval attribute_Deprecated_func_get_client_info_0_arg1; + zend_string *attribute_Deprecated_func_get_client_info_0_arg1_str = zend_string_init("use mysqli_get_client_info() instead", strlen("use mysqli_get_client_info() instead"), 1); + ZVAL_STR(&attribute_Deprecated_func_get_client_info_0_arg1, attribute_Deprecated_func_get_client_info_0_arg1_str); + ZVAL_COPY_VALUE(&attribute_Deprecated_func_get_client_info_0->args[1].value, &attribute_Deprecated_func_get_client_info_0_arg1); + attribute_Deprecated_func_get_client_info_0->args[1].name = ZSTR_KNOWN(ZEND_STR_MESSAGE); + + zend_attribute *attribute_Deprecated_func_init_0 = zend_add_function_attribute(zend_hash_str_find_ptr(&class_entry->function_table, "init", sizeof("init") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED), 2); + zval attribute_Deprecated_func_init_0_arg0; + zend_string *attribute_Deprecated_func_init_0_arg0_str = zend_string_init("8.1", strlen("8.1"), 1); + ZVAL_STR(&attribute_Deprecated_func_init_0_arg0, attribute_Deprecated_func_init_0_arg0_str); + ZVAL_COPY_VALUE(&attribute_Deprecated_func_init_0->args[0].value, &attribute_Deprecated_func_init_0_arg0); + attribute_Deprecated_func_init_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE); + zval attribute_Deprecated_func_init_0_arg1; + zend_string *attribute_Deprecated_func_init_0_arg1_str = zend_string_init("replace calls to parent::init() with parent::__construct()", strlen("replace calls to parent::init() with parent::__construct()"), 1); + ZVAL_STR(&attribute_Deprecated_func_init_0_arg1, attribute_Deprecated_func_init_0_arg1_str); + ZVAL_COPY_VALUE(&attribute_Deprecated_func_init_0->args[1].value, &attribute_Deprecated_func_init_0_arg1); + attribute_Deprecated_func_init_0->args[1].name = ZSTR_KNOWN(ZEND_STR_MESSAGE); + zend_add_parameter_attribute(zend_hash_str_find_ptr(&class_entry->function_table, "real_connect", sizeof("real_connect") - 1), 2, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); return class_entry; diff --git a/ext/mysqli/tests/bug46109.phpt b/ext/mysqli/tests/bug46109.phpt index 47cb43bcbf9d4..2afa84f8461de 100644 --- a/ext/mysqli/tests/bug46109.phpt +++ b/ext/mysqli/tests/bug46109.phpt @@ -16,7 +16,7 @@ $mysqli->init(); echo "done"; ?> --EXPECTF-- -Deprecated: Method mysqli::init() is deprecated in %s on line %d +Deprecated: Method mysqli::init() is deprecated since 8.1, replace calls to parent::init() with parent::__construct() in %s on line %d -Deprecated: Method mysqli::init() is deprecated in %s on line %d +Deprecated: Method mysqli::init() is deprecated since 8.1, replace calls to parent::init() with parent::__construct() in %s on line %d done diff --git a/ext/mysqli/tests/mysqli_get_info_deprecations.phpt b/ext/mysqli/tests/mysqli_get_info_deprecations.phpt index 21eb869f18573..ed4ffbfd50602 100644 --- a/ext/mysqli/tests/mysqli_get_info_deprecations.phpt +++ b/ext/mysqli/tests/mysqli_get_info_deprecations.phpt @@ -24,7 +24,7 @@ print "done!"; ?> --EXPECTF-- -Deprecated: Method mysqli::get_client_info() is deprecated in %s +Deprecated: Method mysqli::get_client_info() is deprecated since 8.1, use mysqli_get_client_info() instead in %s client_info = '%s' Deprecated: mysqli_get_client_info(): Passing connection object as an argument is deprecated in %s diff --git a/ext/odbc/odbc.stub.php b/ext/odbc/odbc.stub.php index 8e7a43d059dfc..f1eb2a890b3c3 100644 --- a/ext/odbc/odbc.stub.php +++ b/ext/odbc/odbc.stub.php @@ -368,7 +368,7 @@ function odbc_fetch_row(Odbc\Result $statement, ?int $row = null): bool {} function odbc_result(Odbc\Result $statement, string|int $field): string|bool|null {} - /** @deprecated */ + #[\Deprecated(since: '8.1')] function odbc_result_all(Odbc\Result $statement, string $format = ""): int|false {} function odbc_free_result(Odbc\Result $statement): true {} diff --git a/ext/odbc/odbc_arginfo.h b/ext/odbc/odbc_arginfo.h index 681625f3eb997..f3480033a0918 100644 --- a/ext/odbc/odbc_arginfo.h +++ b/ext/odbc/odbc_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 34cebf41d91e4dacb8655a935c629ac62f0bb5ab */ + * Stub hash: 30ed66d5e97f6615a461d39f40f85a18ba618711 */ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_odbc_close_all, 0, 0, IS_VOID, 0) ZEND_END_ARG_INFO() @@ -493,6 +493,13 @@ static void register_odbc_symbols(int module_number) #endif + zend_attribute *attribute_Deprecated_func_odbc_result_all_0 = zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "odbc_result_all", sizeof("odbc_result_all") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED), 1); + zval attribute_Deprecated_func_odbc_result_all_0_arg0; + zend_string *attribute_Deprecated_func_odbc_result_all_0_arg0_str = zend_string_init("8.1", strlen("8.1"), 1); + ZVAL_STR(&attribute_Deprecated_func_odbc_result_all_0_arg0, attribute_Deprecated_func_odbc_result_all_0_arg0_str); + ZVAL_COPY_VALUE(&attribute_Deprecated_func_odbc_result_all_0->args[0].value, &attribute_Deprecated_func_odbc_result_all_0_arg0); + attribute_Deprecated_func_odbc_result_all_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE); + zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "odbc_connect", sizeof("odbc_connect") - 1), 2, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "odbc_pconnect", sizeof("odbc_pconnect") - 1), 2, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); diff --git a/ext/odbc/tests/bug44618.phpt b/ext/odbc/tests/bug44618.phpt index ee7b10a7e908e..3ee2e61a63813 100644 --- a/ext/odbc/tests/bug44618.phpt +++ b/ext/odbc/tests/bug44618.phpt @@ -66,7 +66,7 @@ array(3) { Warning: odbc_result(): Cannot get data of column #3 (retcode 100) in %s on line %d bool(false) -Deprecated: Function odbc_result_all() is deprecated in %s on line %d +Deprecated: Function odbc_result_all() is deprecated since 8.1 in %s on line %d
IDreal1text1
110.02
Warning: odbc_result_all(): Cannot get data of column #3 (retcode 100) in %s on line %d diff --git a/ext/openssl/openssl.stub.php b/ext/openssl/openssl.stub.php index 9757a15bd546f..6bbba8dabfc46 100644 --- a/ext/openssl/openssl.stub.php +++ b/ext/openssl/openssl.stub.php @@ -443,7 +443,7 @@ function openssl_x509_checkpurpose(OpenSSLCertificate|string $certificate, int $ function openssl_x509_read(OpenSSLCertificate|string $certificate): OpenSSLCertificate|false {} -/** @deprecated */ +#[\Deprecated] function openssl_x509_free(OpenSSLCertificate $certificate): void {} /** @@ -507,15 +507,13 @@ function openssl_pkey_get_public($public_key): OpenSSLAsymmetricKey|false {} */ function openssl_get_publickey($public_key): OpenSSLAsymmetricKey|false {} -/** - * @deprecated - */ +#[\Deprecated] function openssl_pkey_free(OpenSSLAsymmetricKey $key): void {} /** * @alias openssl_pkey_free - * @deprecated */ +#[\Deprecated] function openssl_free_key(OpenSSLAsymmetricKey $key): void {} /** diff --git a/ext/openssl/openssl_arginfo.h b/ext/openssl/openssl_arginfo.h index 26cf850981b59..60ae23d77f0c9 100644 --- a/ext/openssl/openssl_arginfo.h +++ b/ext/openssl/openssl_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 1867498c895461f81aad433c21cf899ffdb65b3d */ + * Stub hash: e99def6998e4cfd0fb39399ee47385f72d4fed9a */ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_openssl_x509_export_to_file, 0, 2, _IS_BOOL, 0) ZEND_ARG_OBJ_TYPE_MASK(0, certificate, OpenSSLCertificate, MAY_BE_STRING, NULL) @@ -648,6 +648,8 @@ static void register_openssl_symbols(int module_number) zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "openssl_x509_check_private_key", sizeof("openssl_x509_check_private_key") - 1), 1, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "openssl_x509_free", sizeof("openssl_x509_free") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED), 0); + zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "openssl_pkcs12_export_to_file", sizeof("openssl_pkcs12_export_to_file") - 1), 2, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "openssl_pkcs12_export_to_file", sizeof("openssl_pkcs12_export_to_file") - 1), 3, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); @@ -670,6 +672,10 @@ static void register_openssl_symbols(int module_number) zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "openssl_pkey_export", sizeof("openssl_pkey_export") - 1), 2, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); + zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "openssl_pkey_free", sizeof("openssl_pkey_free") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED), 0); + + zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "openssl_free_key", sizeof("openssl_free_key") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED), 0); + zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "openssl_pkey_get_private", sizeof("openssl_pkey_get_private") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "openssl_pkey_get_private", sizeof("openssl_pkey_get_private") - 1), 1, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); diff --git a/ext/pgsql/pgsql.stub.php b/ext/pgsql/pgsql.stub.php index a683ef425e420..105d2bb4ef19a 100644 --- a/ext/pgsql/pgsql.stub.php +++ b/ext/pgsql/pgsql.stub.php @@ -480,8 +480,8 @@ function pg_last_error(?PgSql\Connection $connection = null): string {} /** * @alias pg_last_error - * @deprecated */ + #[\Deprecated(since: '8.0', message: 'use pg_last_error() instead')] function pg_errormessage(?PgSql\Connection $connection = null): string {} /** @refcount 1 */ @@ -552,24 +552,24 @@ function pg_num_rows(PgSql\Result $result): int {} /** * @alias pg_num_rows - * @deprecated */ + #[\Deprecated(since: '8.0', message: 'use pg_num_rows() instead')] function pg_numrows(PgSql\Result $result): int {} function pg_num_fields(PgSql\Result $result): int {} /** * @alias pg_num_fields - * @deprecated */ + #[\Deprecated(since: '8.0', message: 'use pg_num_fields() instead')] function pg_numfields(PgSql\Result $result): int {} function pg_affected_rows(PgSql\Result $result): int {} /** * @alias pg_affected_rows - * @deprecated */ + #[\Deprecated(since: '8.0', message: 'use pg_affected_rows() instead')] function pg_cmdtuples(PgSql\Result $result): int {} function pg_last_notice(PgSql\Connection $connection, int $mode = PGSQL_NOTICE_LAST): array|string|bool {} @@ -581,24 +581,24 @@ function pg_field_name(PgSql\Result $result, int $field): string {} /** * @alias pg_field_name - * @deprecated */ + #[\Deprecated(since: '8.0', message: 'use pg_field_name() instead')] function pg_fieldname(PgSql\Result $result, int $field): string {} function pg_field_size(PgSql\Result $result, int $field): int {} /** * @alias pg_field_size - * @deprecated */ + #[\Deprecated(since: '8.0', message: 'use pg_field_size() instead')] function pg_fieldsize(PgSql\Result $result, int $field): int {} function pg_field_type(PgSql\Result $result, int $field): string {} /** * @alias pg_field_type - * @deprecated */ + #[\Deprecated(since: '8.0', message: 'use pg_field_type() instead')] function pg_fieldtype(PgSql\Result $result, int $field): string {} /** @refcount 1 */ @@ -608,8 +608,8 @@ function pg_field_num(PgSql\Result $result, string $field): int {} /** * @alias pg_field_num - * @deprecated */ + #[\Deprecated(since: '8.0', message: 'use pg_field_num() instead')] function pg_fieldnum(PgSql\Result $result, string $field): int {} /** @@ -621,8 +621,8 @@ function pg_fetch_result(PgSql\Result $result, $row, string|int $field = UNKNOWN /** * @param string|int $row * @alias pg_fetch_result - * @deprecated */ + #[\Deprecated(since: '8.0', message: 'use pg_fetch_result() instead')] function pg_result(PgSql\Result $result, $row, string|int $field = UNKNOWN): string|false|null {} /** @@ -665,8 +665,8 @@ function pg_field_prtlen(PgSql\Result $result, $row, string|int $field = UNKNOWN /** * @param string|int $row - * @deprecated */ + #[\Deprecated] function pg_fieldprtlen(PgSql\Result $result, $row, string|int $field = UNKNOWN): int|false {} /** @param string|int|null $row */ @@ -674,16 +674,16 @@ function pg_field_is_null(PgSql\Result $result, $row, string|int $field = UNKNOW /** * @param string|int $row - * @deprecated */ + #[\Deprecated] function pg_fieldisnull(PgSql\Result $result, $row, string|int $field = UNKNOWN): int|false {} function pg_free_result(PgSql\Result $result): bool {} /** * @alias pg_free_result - * @deprecated */ + #[\Deprecated(since: '8.0', message: 'use pg_free_result() instead')] function pg_freeresult(PgSql\Result $result): bool {} /** @refcount 1 */ @@ -691,8 +691,8 @@ function pg_last_oid(PgSql\Result $result): string|int|false {} /** * @alias pg_last_oid - * @deprecated */ + #[\Deprecated(since: '8.0', message: 'use pg_last_oid() instead')] function pg_getlastoid(PgSql\Result $result): string|int|false {} function pg_trace(string $filename, string $mode = "w", ?PgSql\Connection $connection = null, int $trace_mode = 0): bool {} @@ -710,8 +710,8 @@ function pg_lo_create($connection = UNKNOWN, $oid = UNKNOWN): string|int|false { * @param PgSql\Connection $connection * @param string|int $oid * @alias pg_lo_create - * @deprecated */ + #[\Deprecated(since: '8.0', message: 'use pg_lo_create() instead')] function pg_locreate($connection = UNKNOWN, $oid = UNKNOWN): string|int|false {} /** @@ -724,8 +724,8 @@ function pg_lo_unlink($connection, $oid = UNKNOWN): bool {} * @param PgSql\Connection $connection * @param string|int $oid * @alias pg_lo_unlink - * @deprecated */ + #[\Deprecated(since: '8.0', message: 'use pg_lo_unlink() instead')] function pg_lounlink($connection, $oid = UNKNOWN): bool {} /** @@ -739,16 +739,16 @@ function pg_lo_open($connection, $oid = UNKNOWN, string $mode = UNKNOWN): PgSql\ * @param PgSql\Connection $connection * @param string|int $oid * @alias pg_lo_open - * @deprecated */ + #[\Deprecated(since: '8.0', message: 'use pg_lo_open() instead')] function pg_loopen($connection, $oid = UNKNOWN, string $mode = UNKNOWN): PgSql\Lob|false {} function pg_lo_close(PgSql\Lob $lob): bool {} /** * @alias pg_lo_close - * @deprecated */ + #[\Deprecated(since: '8.0', message: 'use pg_lo_close() instead')] function pg_loclose(PgSql\Lob $lob): bool {} /** @refcount 1 */ @@ -756,24 +756,24 @@ function pg_lo_read(PgSql\Lob $lob, int $length = 8192): string|false {} /** * @alias pg_lo_read - * @deprecated */ + #[\Deprecated(since: '8.0', message: 'use pg_lo_read() instead')] function pg_loread(PgSql\Lob $lob, int $length = 8192): string|false {} function pg_lo_write(PgSql\Lob $lob, string $data, ?int $length = null): int|false {} /** * @alias pg_lo_write - * @deprecated */ + #[\Deprecated(since: '8.0', message: 'use pg_lo_write() instead')] function pg_lowrite(PgSql\Lob $lob, string $data, ?int $length = null): int|false {} function pg_lo_read_all(PgSql\Lob $lob): int {} /** * @alias pg_lo_read_all - * @deprecated */ + #[\Deprecated(since: '8.0', message: 'use pg_lo_read_all() instead')] function pg_loreadall(PgSql\Lob $lob): int {} /** @@ -789,8 +789,8 @@ function pg_lo_import($connection, $filename = UNKNOWN, $oid = UNKNOWN): string| * @param string|int $filename * @param string|int $oid * @alias pg_lo_import - * @deprecated */ + #[\Deprecated(since: '8.0', message: 'use pg_lo_import() instead')] function pg_loimport($connection, $filename = UNKNOWN, $oid = UNKNOWN): string|int|false {} /** @@ -805,8 +805,8 @@ function pg_lo_export($connection, $oid = UNKNOWN, $filename = UNKNOWN): bool {} * @param string|int $oid * @param string|int $filename * @alias pg_lo_export - * @deprecated */ + #[\Deprecated(since: '8.0', message: 'use pg_lo_export() instead')] function pg_loexport($connection, $oid = UNKNOWN, $filename = UNKNOWN): bool {} function pg_lo_seek(PgSql\Lob $lob, int $offset, int $whence = SEEK_CUR): bool {} @@ -824,16 +824,16 @@ function pg_set_client_encoding($connection, string $encoding = UNKNOWN): int {} /** * @param PgSql\Connection|string $connection * @alias pg_set_client_encoding - * @deprecated */ + #[\Deprecated(since: '8.0', message: 'use pg_set_client_encoding() instead')] function pg_setclientencoding($connection, string $encoding = UNKNOWN): int {} function pg_client_encoding(?PgSql\Connection $connection = null): string {} /** * @alias pg_client_encoding - * @deprecated */ + #[\Deprecated(since: '8.0', message: 'use pg_client_encoding() instead')] function pg_clientencoding(?PgSql\Connection $connection = null): string {} function pg_end_copy(?PgSql\Connection $connection = null): bool {} diff --git a/ext/pgsql/pgsql_arginfo.h b/ext/pgsql/pgsql_arginfo.h index db6a3b4a8d673..1660fa69c733b 100644 --- a/ext/pgsql/pgsql_arginfo.h +++ b/ext/pgsql/pgsql_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 84535fbc63b6fe9766088d884c89f5c4a4db0ddf */ + * Stub hash: e73169a5280e4b7eb628c3713fe0404201652232 */ ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_pg_connect, 0, 1, PgSql\\Connection, MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(0, connection_string, IS_STRING, 0) @@ -851,6 +851,274 @@ static void register_pgsql_symbols(int module_number) REGISTER_LONG_CONSTANT("PGSQL_SHOW_CONTEXT_ALWAYS", PQSHOW_CONTEXT_ALWAYS, CONST_PERSISTENT); + zend_attribute *attribute_Deprecated_func_pg_errormessage_0 = zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "pg_errormessage", sizeof("pg_errormessage") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED), 2); + zval attribute_Deprecated_func_pg_errormessage_0_arg0; + zend_string *attribute_Deprecated_func_pg_errormessage_0_arg0_str = zend_string_init("8.0", strlen("8.0"), 1); + ZVAL_STR(&attribute_Deprecated_func_pg_errormessage_0_arg0, attribute_Deprecated_func_pg_errormessage_0_arg0_str); + ZVAL_COPY_VALUE(&attribute_Deprecated_func_pg_errormessage_0->args[0].value, &attribute_Deprecated_func_pg_errormessage_0_arg0); + attribute_Deprecated_func_pg_errormessage_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE); + zval attribute_Deprecated_func_pg_errormessage_0_arg1; + zend_string *attribute_Deprecated_func_pg_errormessage_0_arg1_str = zend_string_init("use pg_last_error() instead", strlen("use pg_last_error() instead"), 1); + ZVAL_STR(&attribute_Deprecated_func_pg_errormessage_0_arg1, attribute_Deprecated_func_pg_errormessage_0_arg1_str); + ZVAL_COPY_VALUE(&attribute_Deprecated_func_pg_errormessage_0->args[1].value, &attribute_Deprecated_func_pg_errormessage_0_arg1); + attribute_Deprecated_func_pg_errormessage_0->args[1].name = ZSTR_KNOWN(ZEND_STR_MESSAGE); + + zend_attribute *attribute_Deprecated_func_pg_numrows_0 = zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "pg_numrows", sizeof("pg_numrows") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED), 2); + zval attribute_Deprecated_func_pg_numrows_0_arg0; + zend_string *attribute_Deprecated_func_pg_numrows_0_arg0_str = zend_string_init("8.0", strlen("8.0"), 1); + ZVAL_STR(&attribute_Deprecated_func_pg_numrows_0_arg0, attribute_Deprecated_func_pg_numrows_0_arg0_str); + ZVAL_COPY_VALUE(&attribute_Deprecated_func_pg_numrows_0->args[0].value, &attribute_Deprecated_func_pg_numrows_0_arg0); + attribute_Deprecated_func_pg_numrows_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE); + zval attribute_Deprecated_func_pg_numrows_0_arg1; + zend_string *attribute_Deprecated_func_pg_numrows_0_arg1_str = zend_string_init("use pg_num_rows() instead", strlen("use pg_num_rows() instead"), 1); + ZVAL_STR(&attribute_Deprecated_func_pg_numrows_0_arg1, attribute_Deprecated_func_pg_numrows_0_arg1_str); + ZVAL_COPY_VALUE(&attribute_Deprecated_func_pg_numrows_0->args[1].value, &attribute_Deprecated_func_pg_numrows_0_arg1); + attribute_Deprecated_func_pg_numrows_0->args[1].name = ZSTR_KNOWN(ZEND_STR_MESSAGE); + + zend_attribute *attribute_Deprecated_func_pg_numfields_0 = zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "pg_numfields", sizeof("pg_numfields") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED), 2); + zval attribute_Deprecated_func_pg_numfields_0_arg0; + zend_string *attribute_Deprecated_func_pg_numfields_0_arg0_str = zend_string_init("8.0", strlen("8.0"), 1); + ZVAL_STR(&attribute_Deprecated_func_pg_numfields_0_arg0, attribute_Deprecated_func_pg_numfields_0_arg0_str); + ZVAL_COPY_VALUE(&attribute_Deprecated_func_pg_numfields_0->args[0].value, &attribute_Deprecated_func_pg_numfields_0_arg0); + attribute_Deprecated_func_pg_numfields_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE); + zval attribute_Deprecated_func_pg_numfields_0_arg1; + zend_string *attribute_Deprecated_func_pg_numfields_0_arg1_str = zend_string_init("use pg_num_fields() instead", strlen("use pg_num_fields() instead"), 1); + ZVAL_STR(&attribute_Deprecated_func_pg_numfields_0_arg1, attribute_Deprecated_func_pg_numfields_0_arg1_str); + ZVAL_COPY_VALUE(&attribute_Deprecated_func_pg_numfields_0->args[1].value, &attribute_Deprecated_func_pg_numfields_0_arg1); + attribute_Deprecated_func_pg_numfields_0->args[1].name = ZSTR_KNOWN(ZEND_STR_MESSAGE); + + zend_attribute *attribute_Deprecated_func_pg_cmdtuples_0 = zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "pg_cmdtuples", sizeof("pg_cmdtuples") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED), 2); + zval attribute_Deprecated_func_pg_cmdtuples_0_arg0; + zend_string *attribute_Deprecated_func_pg_cmdtuples_0_arg0_str = zend_string_init("8.0", strlen("8.0"), 1); + ZVAL_STR(&attribute_Deprecated_func_pg_cmdtuples_0_arg0, attribute_Deprecated_func_pg_cmdtuples_0_arg0_str); + ZVAL_COPY_VALUE(&attribute_Deprecated_func_pg_cmdtuples_0->args[0].value, &attribute_Deprecated_func_pg_cmdtuples_0_arg0); + attribute_Deprecated_func_pg_cmdtuples_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE); + zval attribute_Deprecated_func_pg_cmdtuples_0_arg1; + zend_string *attribute_Deprecated_func_pg_cmdtuples_0_arg1_str = zend_string_init("use pg_affected_rows() instead", strlen("use pg_affected_rows() instead"), 1); + ZVAL_STR(&attribute_Deprecated_func_pg_cmdtuples_0_arg1, attribute_Deprecated_func_pg_cmdtuples_0_arg1_str); + ZVAL_COPY_VALUE(&attribute_Deprecated_func_pg_cmdtuples_0->args[1].value, &attribute_Deprecated_func_pg_cmdtuples_0_arg1); + attribute_Deprecated_func_pg_cmdtuples_0->args[1].name = ZSTR_KNOWN(ZEND_STR_MESSAGE); + + zend_attribute *attribute_Deprecated_func_pg_fieldname_0 = zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "pg_fieldname", sizeof("pg_fieldname") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED), 2); + zval attribute_Deprecated_func_pg_fieldname_0_arg0; + zend_string *attribute_Deprecated_func_pg_fieldname_0_arg0_str = zend_string_init("8.0", strlen("8.0"), 1); + ZVAL_STR(&attribute_Deprecated_func_pg_fieldname_0_arg0, attribute_Deprecated_func_pg_fieldname_0_arg0_str); + ZVAL_COPY_VALUE(&attribute_Deprecated_func_pg_fieldname_0->args[0].value, &attribute_Deprecated_func_pg_fieldname_0_arg0); + attribute_Deprecated_func_pg_fieldname_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE); + zval attribute_Deprecated_func_pg_fieldname_0_arg1; + zend_string *attribute_Deprecated_func_pg_fieldname_0_arg1_str = zend_string_init("use pg_field_name() instead", strlen("use pg_field_name() instead"), 1); + ZVAL_STR(&attribute_Deprecated_func_pg_fieldname_0_arg1, attribute_Deprecated_func_pg_fieldname_0_arg1_str); + ZVAL_COPY_VALUE(&attribute_Deprecated_func_pg_fieldname_0->args[1].value, &attribute_Deprecated_func_pg_fieldname_0_arg1); + attribute_Deprecated_func_pg_fieldname_0->args[1].name = ZSTR_KNOWN(ZEND_STR_MESSAGE); + + zend_attribute *attribute_Deprecated_func_pg_fieldsize_0 = zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "pg_fieldsize", sizeof("pg_fieldsize") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED), 2); + zval attribute_Deprecated_func_pg_fieldsize_0_arg0; + zend_string *attribute_Deprecated_func_pg_fieldsize_0_arg0_str = zend_string_init("8.0", strlen("8.0"), 1); + ZVAL_STR(&attribute_Deprecated_func_pg_fieldsize_0_arg0, attribute_Deprecated_func_pg_fieldsize_0_arg0_str); + ZVAL_COPY_VALUE(&attribute_Deprecated_func_pg_fieldsize_0->args[0].value, &attribute_Deprecated_func_pg_fieldsize_0_arg0); + attribute_Deprecated_func_pg_fieldsize_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE); + zval attribute_Deprecated_func_pg_fieldsize_0_arg1; + zend_string *attribute_Deprecated_func_pg_fieldsize_0_arg1_str = zend_string_init("use pg_field_size() instead", strlen("use pg_field_size() instead"), 1); + ZVAL_STR(&attribute_Deprecated_func_pg_fieldsize_0_arg1, attribute_Deprecated_func_pg_fieldsize_0_arg1_str); + ZVAL_COPY_VALUE(&attribute_Deprecated_func_pg_fieldsize_0->args[1].value, &attribute_Deprecated_func_pg_fieldsize_0_arg1); + attribute_Deprecated_func_pg_fieldsize_0->args[1].name = ZSTR_KNOWN(ZEND_STR_MESSAGE); + + zend_attribute *attribute_Deprecated_func_pg_fieldtype_0 = zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "pg_fieldtype", sizeof("pg_fieldtype") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED), 2); + zval attribute_Deprecated_func_pg_fieldtype_0_arg0; + zend_string *attribute_Deprecated_func_pg_fieldtype_0_arg0_str = zend_string_init("8.0", strlen("8.0"), 1); + ZVAL_STR(&attribute_Deprecated_func_pg_fieldtype_0_arg0, attribute_Deprecated_func_pg_fieldtype_0_arg0_str); + ZVAL_COPY_VALUE(&attribute_Deprecated_func_pg_fieldtype_0->args[0].value, &attribute_Deprecated_func_pg_fieldtype_0_arg0); + attribute_Deprecated_func_pg_fieldtype_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE); + zval attribute_Deprecated_func_pg_fieldtype_0_arg1; + zend_string *attribute_Deprecated_func_pg_fieldtype_0_arg1_str = zend_string_init("use pg_field_type() instead", strlen("use pg_field_type() instead"), 1); + ZVAL_STR(&attribute_Deprecated_func_pg_fieldtype_0_arg1, attribute_Deprecated_func_pg_fieldtype_0_arg1_str); + ZVAL_COPY_VALUE(&attribute_Deprecated_func_pg_fieldtype_0->args[1].value, &attribute_Deprecated_func_pg_fieldtype_0_arg1); + attribute_Deprecated_func_pg_fieldtype_0->args[1].name = ZSTR_KNOWN(ZEND_STR_MESSAGE); + + zend_attribute *attribute_Deprecated_func_pg_fieldnum_0 = zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "pg_fieldnum", sizeof("pg_fieldnum") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED), 2); + zval attribute_Deprecated_func_pg_fieldnum_0_arg0; + zend_string *attribute_Deprecated_func_pg_fieldnum_0_arg0_str = zend_string_init("8.0", strlen("8.0"), 1); + ZVAL_STR(&attribute_Deprecated_func_pg_fieldnum_0_arg0, attribute_Deprecated_func_pg_fieldnum_0_arg0_str); + ZVAL_COPY_VALUE(&attribute_Deprecated_func_pg_fieldnum_0->args[0].value, &attribute_Deprecated_func_pg_fieldnum_0_arg0); + attribute_Deprecated_func_pg_fieldnum_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE); + zval attribute_Deprecated_func_pg_fieldnum_0_arg1; + zend_string *attribute_Deprecated_func_pg_fieldnum_0_arg1_str = zend_string_init("use pg_field_num() instead", strlen("use pg_field_num() instead"), 1); + ZVAL_STR(&attribute_Deprecated_func_pg_fieldnum_0_arg1, attribute_Deprecated_func_pg_fieldnum_0_arg1_str); + ZVAL_COPY_VALUE(&attribute_Deprecated_func_pg_fieldnum_0->args[1].value, &attribute_Deprecated_func_pg_fieldnum_0_arg1); + attribute_Deprecated_func_pg_fieldnum_0->args[1].name = ZSTR_KNOWN(ZEND_STR_MESSAGE); + + zend_attribute *attribute_Deprecated_func_pg_result_0 = zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "pg_result", sizeof("pg_result") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED), 2); + zval attribute_Deprecated_func_pg_result_0_arg0; + zend_string *attribute_Deprecated_func_pg_result_0_arg0_str = zend_string_init("8.0", strlen("8.0"), 1); + ZVAL_STR(&attribute_Deprecated_func_pg_result_0_arg0, attribute_Deprecated_func_pg_result_0_arg0_str); + ZVAL_COPY_VALUE(&attribute_Deprecated_func_pg_result_0->args[0].value, &attribute_Deprecated_func_pg_result_0_arg0); + attribute_Deprecated_func_pg_result_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE); + zval attribute_Deprecated_func_pg_result_0_arg1; + zend_string *attribute_Deprecated_func_pg_result_0_arg1_str = zend_string_init("use pg_fetch_result() instead", strlen("use pg_fetch_result() instead"), 1); + ZVAL_STR(&attribute_Deprecated_func_pg_result_0_arg1, attribute_Deprecated_func_pg_result_0_arg1_str); + ZVAL_COPY_VALUE(&attribute_Deprecated_func_pg_result_0->args[1].value, &attribute_Deprecated_func_pg_result_0_arg1); + attribute_Deprecated_func_pg_result_0->args[1].name = ZSTR_KNOWN(ZEND_STR_MESSAGE); + + zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "pg_fieldprtlen", sizeof("pg_fieldprtlen") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED), 0); + + zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "pg_fieldisnull", sizeof("pg_fieldisnull") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED), 0); + + zend_attribute *attribute_Deprecated_func_pg_freeresult_0 = zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "pg_freeresult", sizeof("pg_freeresult") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED), 2); + zval attribute_Deprecated_func_pg_freeresult_0_arg0; + zend_string *attribute_Deprecated_func_pg_freeresult_0_arg0_str = zend_string_init("8.0", strlen("8.0"), 1); + ZVAL_STR(&attribute_Deprecated_func_pg_freeresult_0_arg0, attribute_Deprecated_func_pg_freeresult_0_arg0_str); + ZVAL_COPY_VALUE(&attribute_Deprecated_func_pg_freeresult_0->args[0].value, &attribute_Deprecated_func_pg_freeresult_0_arg0); + attribute_Deprecated_func_pg_freeresult_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE); + zval attribute_Deprecated_func_pg_freeresult_0_arg1; + zend_string *attribute_Deprecated_func_pg_freeresult_0_arg1_str = zend_string_init("use pg_free_result() instead", strlen("use pg_free_result() instead"), 1); + ZVAL_STR(&attribute_Deprecated_func_pg_freeresult_0_arg1, attribute_Deprecated_func_pg_freeresult_0_arg1_str); + ZVAL_COPY_VALUE(&attribute_Deprecated_func_pg_freeresult_0->args[1].value, &attribute_Deprecated_func_pg_freeresult_0_arg1); + attribute_Deprecated_func_pg_freeresult_0->args[1].name = ZSTR_KNOWN(ZEND_STR_MESSAGE); + + zend_attribute *attribute_Deprecated_func_pg_getlastoid_0 = zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "pg_getlastoid", sizeof("pg_getlastoid") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED), 2); + zval attribute_Deprecated_func_pg_getlastoid_0_arg0; + zend_string *attribute_Deprecated_func_pg_getlastoid_0_arg0_str = zend_string_init("8.0", strlen("8.0"), 1); + ZVAL_STR(&attribute_Deprecated_func_pg_getlastoid_0_arg0, attribute_Deprecated_func_pg_getlastoid_0_arg0_str); + ZVAL_COPY_VALUE(&attribute_Deprecated_func_pg_getlastoid_0->args[0].value, &attribute_Deprecated_func_pg_getlastoid_0_arg0); + attribute_Deprecated_func_pg_getlastoid_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE); + zval attribute_Deprecated_func_pg_getlastoid_0_arg1; + zend_string *attribute_Deprecated_func_pg_getlastoid_0_arg1_str = zend_string_init("use pg_last_oid() instead", strlen("use pg_last_oid() instead"), 1); + ZVAL_STR(&attribute_Deprecated_func_pg_getlastoid_0_arg1, attribute_Deprecated_func_pg_getlastoid_0_arg1_str); + ZVAL_COPY_VALUE(&attribute_Deprecated_func_pg_getlastoid_0->args[1].value, &attribute_Deprecated_func_pg_getlastoid_0_arg1); + attribute_Deprecated_func_pg_getlastoid_0->args[1].name = ZSTR_KNOWN(ZEND_STR_MESSAGE); + + zend_attribute *attribute_Deprecated_func_pg_locreate_0 = zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "pg_locreate", sizeof("pg_locreate") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED), 2); + zval attribute_Deprecated_func_pg_locreate_0_arg0; + zend_string *attribute_Deprecated_func_pg_locreate_0_arg0_str = zend_string_init("8.0", strlen("8.0"), 1); + ZVAL_STR(&attribute_Deprecated_func_pg_locreate_0_arg0, attribute_Deprecated_func_pg_locreate_0_arg0_str); + ZVAL_COPY_VALUE(&attribute_Deprecated_func_pg_locreate_0->args[0].value, &attribute_Deprecated_func_pg_locreate_0_arg0); + attribute_Deprecated_func_pg_locreate_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE); + zval attribute_Deprecated_func_pg_locreate_0_arg1; + zend_string *attribute_Deprecated_func_pg_locreate_0_arg1_str = zend_string_init("use pg_lo_create() instead", strlen("use pg_lo_create() instead"), 1); + ZVAL_STR(&attribute_Deprecated_func_pg_locreate_0_arg1, attribute_Deprecated_func_pg_locreate_0_arg1_str); + ZVAL_COPY_VALUE(&attribute_Deprecated_func_pg_locreate_0->args[1].value, &attribute_Deprecated_func_pg_locreate_0_arg1); + attribute_Deprecated_func_pg_locreate_0->args[1].name = ZSTR_KNOWN(ZEND_STR_MESSAGE); + + zend_attribute *attribute_Deprecated_func_pg_lounlink_0 = zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "pg_lounlink", sizeof("pg_lounlink") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED), 2); + zval attribute_Deprecated_func_pg_lounlink_0_arg0; + zend_string *attribute_Deprecated_func_pg_lounlink_0_arg0_str = zend_string_init("8.0", strlen("8.0"), 1); + ZVAL_STR(&attribute_Deprecated_func_pg_lounlink_0_arg0, attribute_Deprecated_func_pg_lounlink_0_arg0_str); + ZVAL_COPY_VALUE(&attribute_Deprecated_func_pg_lounlink_0->args[0].value, &attribute_Deprecated_func_pg_lounlink_0_arg0); + attribute_Deprecated_func_pg_lounlink_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE); + zval attribute_Deprecated_func_pg_lounlink_0_arg1; + zend_string *attribute_Deprecated_func_pg_lounlink_0_arg1_str = zend_string_init("use pg_lo_unlink() instead", strlen("use pg_lo_unlink() instead"), 1); + ZVAL_STR(&attribute_Deprecated_func_pg_lounlink_0_arg1, attribute_Deprecated_func_pg_lounlink_0_arg1_str); + ZVAL_COPY_VALUE(&attribute_Deprecated_func_pg_lounlink_0->args[1].value, &attribute_Deprecated_func_pg_lounlink_0_arg1); + attribute_Deprecated_func_pg_lounlink_0->args[1].name = ZSTR_KNOWN(ZEND_STR_MESSAGE); + + zend_attribute *attribute_Deprecated_func_pg_loopen_0 = zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "pg_loopen", sizeof("pg_loopen") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED), 2); + zval attribute_Deprecated_func_pg_loopen_0_arg0; + zend_string *attribute_Deprecated_func_pg_loopen_0_arg0_str = zend_string_init("8.0", strlen("8.0"), 1); + ZVAL_STR(&attribute_Deprecated_func_pg_loopen_0_arg0, attribute_Deprecated_func_pg_loopen_0_arg0_str); + ZVAL_COPY_VALUE(&attribute_Deprecated_func_pg_loopen_0->args[0].value, &attribute_Deprecated_func_pg_loopen_0_arg0); + attribute_Deprecated_func_pg_loopen_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE); + zval attribute_Deprecated_func_pg_loopen_0_arg1; + zend_string *attribute_Deprecated_func_pg_loopen_0_arg1_str = zend_string_init("use pg_lo_open() instead", strlen("use pg_lo_open() instead"), 1); + ZVAL_STR(&attribute_Deprecated_func_pg_loopen_0_arg1, attribute_Deprecated_func_pg_loopen_0_arg1_str); + ZVAL_COPY_VALUE(&attribute_Deprecated_func_pg_loopen_0->args[1].value, &attribute_Deprecated_func_pg_loopen_0_arg1); + attribute_Deprecated_func_pg_loopen_0->args[1].name = ZSTR_KNOWN(ZEND_STR_MESSAGE); + + zend_attribute *attribute_Deprecated_func_pg_loclose_0 = zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "pg_loclose", sizeof("pg_loclose") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED), 2); + zval attribute_Deprecated_func_pg_loclose_0_arg0; + zend_string *attribute_Deprecated_func_pg_loclose_0_arg0_str = zend_string_init("8.0", strlen("8.0"), 1); + ZVAL_STR(&attribute_Deprecated_func_pg_loclose_0_arg0, attribute_Deprecated_func_pg_loclose_0_arg0_str); + ZVAL_COPY_VALUE(&attribute_Deprecated_func_pg_loclose_0->args[0].value, &attribute_Deprecated_func_pg_loclose_0_arg0); + attribute_Deprecated_func_pg_loclose_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE); + zval attribute_Deprecated_func_pg_loclose_0_arg1; + zend_string *attribute_Deprecated_func_pg_loclose_0_arg1_str = zend_string_init("use pg_lo_close() instead", strlen("use pg_lo_close() instead"), 1); + ZVAL_STR(&attribute_Deprecated_func_pg_loclose_0_arg1, attribute_Deprecated_func_pg_loclose_0_arg1_str); + ZVAL_COPY_VALUE(&attribute_Deprecated_func_pg_loclose_0->args[1].value, &attribute_Deprecated_func_pg_loclose_0_arg1); + attribute_Deprecated_func_pg_loclose_0->args[1].name = ZSTR_KNOWN(ZEND_STR_MESSAGE); + + zend_attribute *attribute_Deprecated_func_pg_loread_0 = zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "pg_loread", sizeof("pg_loread") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED), 2); + zval attribute_Deprecated_func_pg_loread_0_arg0; + zend_string *attribute_Deprecated_func_pg_loread_0_arg0_str = zend_string_init("8.0", strlen("8.0"), 1); + ZVAL_STR(&attribute_Deprecated_func_pg_loread_0_arg0, attribute_Deprecated_func_pg_loread_0_arg0_str); + ZVAL_COPY_VALUE(&attribute_Deprecated_func_pg_loread_0->args[0].value, &attribute_Deprecated_func_pg_loread_0_arg0); + attribute_Deprecated_func_pg_loread_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE); + zval attribute_Deprecated_func_pg_loread_0_arg1; + zend_string *attribute_Deprecated_func_pg_loread_0_arg1_str = zend_string_init("use pg_lo_read() instead", strlen("use pg_lo_read() instead"), 1); + ZVAL_STR(&attribute_Deprecated_func_pg_loread_0_arg1, attribute_Deprecated_func_pg_loread_0_arg1_str); + ZVAL_COPY_VALUE(&attribute_Deprecated_func_pg_loread_0->args[1].value, &attribute_Deprecated_func_pg_loread_0_arg1); + attribute_Deprecated_func_pg_loread_0->args[1].name = ZSTR_KNOWN(ZEND_STR_MESSAGE); + + zend_attribute *attribute_Deprecated_func_pg_lowrite_0 = zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "pg_lowrite", sizeof("pg_lowrite") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED), 2); + zval attribute_Deprecated_func_pg_lowrite_0_arg0; + zend_string *attribute_Deprecated_func_pg_lowrite_0_arg0_str = zend_string_init("8.0", strlen("8.0"), 1); + ZVAL_STR(&attribute_Deprecated_func_pg_lowrite_0_arg0, attribute_Deprecated_func_pg_lowrite_0_arg0_str); + ZVAL_COPY_VALUE(&attribute_Deprecated_func_pg_lowrite_0->args[0].value, &attribute_Deprecated_func_pg_lowrite_0_arg0); + attribute_Deprecated_func_pg_lowrite_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE); + zval attribute_Deprecated_func_pg_lowrite_0_arg1; + zend_string *attribute_Deprecated_func_pg_lowrite_0_arg1_str = zend_string_init("use pg_lo_write() instead", strlen("use pg_lo_write() instead"), 1); + ZVAL_STR(&attribute_Deprecated_func_pg_lowrite_0_arg1, attribute_Deprecated_func_pg_lowrite_0_arg1_str); + ZVAL_COPY_VALUE(&attribute_Deprecated_func_pg_lowrite_0->args[1].value, &attribute_Deprecated_func_pg_lowrite_0_arg1); + attribute_Deprecated_func_pg_lowrite_0->args[1].name = ZSTR_KNOWN(ZEND_STR_MESSAGE); + + zend_attribute *attribute_Deprecated_func_pg_loreadall_0 = zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "pg_loreadall", sizeof("pg_loreadall") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED), 2); + zval attribute_Deprecated_func_pg_loreadall_0_arg0; + zend_string *attribute_Deprecated_func_pg_loreadall_0_arg0_str = zend_string_init("8.0", strlen("8.0"), 1); + ZVAL_STR(&attribute_Deprecated_func_pg_loreadall_0_arg0, attribute_Deprecated_func_pg_loreadall_0_arg0_str); + ZVAL_COPY_VALUE(&attribute_Deprecated_func_pg_loreadall_0->args[0].value, &attribute_Deprecated_func_pg_loreadall_0_arg0); + attribute_Deprecated_func_pg_loreadall_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE); + zval attribute_Deprecated_func_pg_loreadall_0_arg1; + zend_string *attribute_Deprecated_func_pg_loreadall_0_arg1_str = zend_string_init("use pg_lo_read_all() instead", strlen("use pg_lo_read_all() instead"), 1); + ZVAL_STR(&attribute_Deprecated_func_pg_loreadall_0_arg1, attribute_Deprecated_func_pg_loreadall_0_arg1_str); + ZVAL_COPY_VALUE(&attribute_Deprecated_func_pg_loreadall_0->args[1].value, &attribute_Deprecated_func_pg_loreadall_0_arg1); + attribute_Deprecated_func_pg_loreadall_0->args[1].name = ZSTR_KNOWN(ZEND_STR_MESSAGE); + + zend_attribute *attribute_Deprecated_func_pg_loimport_0 = zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "pg_loimport", sizeof("pg_loimport") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED), 2); + zval attribute_Deprecated_func_pg_loimport_0_arg0; + zend_string *attribute_Deprecated_func_pg_loimport_0_arg0_str = zend_string_init("8.0", strlen("8.0"), 1); + ZVAL_STR(&attribute_Deprecated_func_pg_loimport_0_arg0, attribute_Deprecated_func_pg_loimport_0_arg0_str); + ZVAL_COPY_VALUE(&attribute_Deprecated_func_pg_loimport_0->args[0].value, &attribute_Deprecated_func_pg_loimport_0_arg0); + attribute_Deprecated_func_pg_loimport_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE); + zval attribute_Deprecated_func_pg_loimport_0_arg1; + zend_string *attribute_Deprecated_func_pg_loimport_0_arg1_str = zend_string_init("use pg_lo_import() instead", strlen("use pg_lo_import() instead"), 1); + ZVAL_STR(&attribute_Deprecated_func_pg_loimport_0_arg1, attribute_Deprecated_func_pg_loimport_0_arg1_str); + ZVAL_COPY_VALUE(&attribute_Deprecated_func_pg_loimport_0->args[1].value, &attribute_Deprecated_func_pg_loimport_0_arg1); + attribute_Deprecated_func_pg_loimport_0->args[1].name = ZSTR_KNOWN(ZEND_STR_MESSAGE); + + zend_attribute *attribute_Deprecated_func_pg_loexport_0 = zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "pg_loexport", sizeof("pg_loexport") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED), 2); + zval attribute_Deprecated_func_pg_loexport_0_arg0; + zend_string *attribute_Deprecated_func_pg_loexport_0_arg0_str = zend_string_init("8.0", strlen("8.0"), 1); + ZVAL_STR(&attribute_Deprecated_func_pg_loexport_0_arg0, attribute_Deprecated_func_pg_loexport_0_arg0_str); + ZVAL_COPY_VALUE(&attribute_Deprecated_func_pg_loexport_0->args[0].value, &attribute_Deprecated_func_pg_loexport_0_arg0); + attribute_Deprecated_func_pg_loexport_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE); + zval attribute_Deprecated_func_pg_loexport_0_arg1; + zend_string *attribute_Deprecated_func_pg_loexport_0_arg1_str = zend_string_init("use pg_lo_export() instead", strlen("use pg_lo_export() instead"), 1); + ZVAL_STR(&attribute_Deprecated_func_pg_loexport_0_arg1, attribute_Deprecated_func_pg_loexport_0_arg1_str); + ZVAL_COPY_VALUE(&attribute_Deprecated_func_pg_loexport_0->args[1].value, &attribute_Deprecated_func_pg_loexport_0_arg1); + attribute_Deprecated_func_pg_loexport_0->args[1].name = ZSTR_KNOWN(ZEND_STR_MESSAGE); + + zend_attribute *attribute_Deprecated_func_pg_setclientencoding_0 = zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "pg_setclientencoding", sizeof("pg_setclientencoding") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED), 2); + zval attribute_Deprecated_func_pg_setclientencoding_0_arg0; + zend_string *attribute_Deprecated_func_pg_setclientencoding_0_arg0_str = zend_string_init("8.0", strlen("8.0"), 1); + ZVAL_STR(&attribute_Deprecated_func_pg_setclientencoding_0_arg0, attribute_Deprecated_func_pg_setclientencoding_0_arg0_str); + ZVAL_COPY_VALUE(&attribute_Deprecated_func_pg_setclientencoding_0->args[0].value, &attribute_Deprecated_func_pg_setclientencoding_0_arg0); + attribute_Deprecated_func_pg_setclientencoding_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE); + zval attribute_Deprecated_func_pg_setclientencoding_0_arg1; + zend_string *attribute_Deprecated_func_pg_setclientencoding_0_arg1_str = zend_string_init("use pg_set_client_encoding() instead", strlen("use pg_set_client_encoding() instead"), 1); + ZVAL_STR(&attribute_Deprecated_func_pg_setclientencoding_0_arg1, attribute_Deprecated_func_pg_setclientencoding_0_arg1_str); + ZVAL_COPY_VALUE(&attribute_Deprecated_func_pg_setclientencoding_0->args[1].value, &attribute_Deprecated_func_pg_setclientencoding_0_arg1); + attribute_Deprecated_func_pg_setclientencoding_0->args[1].name = ZSTR_KNOWN(ZEND_STR_MESSAGE); + + zend_attribute *attribute_Deprecated_func_pg_clientencoding_0 = zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "pg_clientencoding", sizeof("pg_clientencoding") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED), 2); + zval attribute_Deprecated_func_pg_clientencoding_0_arg0; + zend_string *attribute_Deprecated_func_pg_clientencoding_0_arg0_str = zend_string_init("8.0", strlen("8.0"), 1); + ZVAL_STR(&attribute_Deprecated_func_pg_clientencoding_0_arg0, attribute_Deprecated_func_pg_clientencoding_0_arg0_str); + ZVAL_COPY_VALUE(&attribute_Deprecated_func_pg_clientencoding_0->args[0].value, &attribute_Deprecated_func_pg_clientencoding_0_arg0); + attribute_Deprecated_func_pg_clientencoding_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE); + zval attribute_Deprecated_func_pg_clientencoding_0_arg1; + zend_string *attribute_Deprecated_func_pg_clientencoding_0_arg1_str = zend_string_init("use pg_client_encoding() instead", strlen("use pg_client_encoding() instead"), 1); + ZVAL_STR(&attribute_Deprecated_func_pg_clientencoding_0_arg1, attribute_Deprecated_func_pg_clientencoding_0_arg1_str); + ZVAL_COPY_VALUE(&attribute_Deprecated_func_pg_clientencoding_0->args[1].value, &attribute_Deprecated_func_pg_clientencoding_0_arg1); + attribute_Deprecated_func_pg_clientencoding_0->args[1].name = ZSTR_KNOWN(ZEND_STR_MESSAGE); + zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "pg_change_password", sizeof("pg_change_password") - 1), 2, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); } diff --git a/ext/pgsql/tests/98old_api.phpt b/ext/pgsql/tests/98old_api.phpt index 26bfd6fa5966a..cc75e58799b34 100644 --- a/ext/pgsql/tests/98old_api.phpt +++ b/ext/pgsql/tests/98old_api.phpt @@ -45,15 +45,15 @@ $db = pg_connect($conn_str); pg_query($db, "DROP TABLE IF EXISTS {$table_name}"); ?> --EXPECTF-- -Deprecated: Function pg_numrows() is deprecated in %s on line %d +Deprecated: Function pg_numrows() is deprecated since 8.0, use pg_num_rows() instead in %s on line %d -Deprecated: Function pg_numfields() is deprecated in %s on line %d +Deprecated: Function pg_numfields() is deprecated since 8.0, use pg_num_fields() instead in %s on line %d -Deprecated: Function pg_fieldname() is deprecated in %s on line %d +Deprecated: Function pg_fieldname() is deprecated since 8.0, use pg_field_name() instead in %s on line %d -Deprecated: Function pg_fieldsize() is deprecated in %s on line %d +Deprecated: Function pg_fieldsize() is deprecated since 8.0, use pg_field_size() instead in %s on line %d -Deprecated: Function pg_fieldtype() is deprecated in %s on line %d +Deprecated: Function pg_fieldtype() is deprecated since 8.0, use pg_field_type() instead in %s on line %d Deprecated: Function pg_fieldprtlen() is deprecated in %s on line %d @@ -67,17 +67,17 @@ Deprecated: Function pg_fieldisnull() is deprecated in %s on line %d Deprecated: pg_fieldisnull(): Passing null to parameter #2 ($row) of type int is deprecated in %s on line %d -Deprecated: Function pg_result() is deprecated in %s on line %d +Deprecated: Function pg_result() is deprecated since 8.0, use pg_fetch_result() instead in %s on line %d -Deprecated: Function pg_result() is deprecated in %s on line %d +Deprecated: Function pg_result() is deprecated since 8.0, use pg_fetch_result() instead in %s on line %d Deprecated: pg_result(): Passing null to parameter #2 ($row) of type int is deprecated in %s on line %d -Deprecated: Function pg_getlastoid() is deprecated in %s on line %d +Deprecated: Function pg_getlastoid() is deprecated since 8.0, use pg_last_oid() instead in %s on line %d -Deprecated: Function pg_freeresult() is deprecated in %s on line %d +Deprecated: Function pg_freeresult() is deprecated since 8.0, use pg_free_result() instead in %s on line %d -Deprecated: Function pg_errormessage() is deprecated in %s on line %d +Deprecated: Function pg_errormessage() is deprecated since 8.0, use pg_last_error() instead in %s on line %d -Deprecated: Function pg_cmdtuples() is deprecated in %s on line %d +Deprecated: Function pg_cmdtuples() is deprecated since 8.0, use pg_affected_rows() instead in %s on line %d OK diff --git a/ext/reflection/php_reflection.stub.php b/ext/reflection/php_reflection.stub.php index 59f27981d8b20..af4c177318fd0 100644 --- a/ext/reflection/php_reflection.stub.php +++ b/ext/reflection/php_reflection.stub.php @@ -127,8 +127,8 @@ public function isAnonymous(): bool {} /** * @tentative-return-type - * @deprecated ReflectionFunction can no longer be constructed for disabled functions */ + #[\Deprecated(message: "ReflectionFunction can no longer be constructed for disabled functions")] public function isDisabled(): bool {} /** @tentative-return-type */ @@ -593,8 +593,8 @@ public function getDeclaringClass(): ?ReflectionClass {} /** * @tentative-return-type - * @deprecated Use ReflectionParameter::getType() instead */ + #[\Deprecated(message: "use ReflectionParameter::getType() instead")] public function getClass(): ?ReflectionClass {} /** @tentative-return-type */ @@ -605,14 +605,14 @@ public function getType(): ?ReflectionType {} /** * @tentative-return-type - * @deprecated Use ReflectionParameter::getType() instead */ + #[\Deprecated(message: "use ReflectionParameter::getType() instead")] public function isArray(): bool {} /** * @tentative-return-type - * @deprecated Use ReflectionParameter::getType() instead */ + #[\Deprecated(message: "use ReflectionParameter::getType() instead")] public function isCallable(): bool {} /** @tentative-return-type */ diff --git a/ext/reflection/php_reflection_arginfo.h b/ext/reflection/php_reflection_arginfo.h index 250e91f0926bd..3aa9338c65ff9 100644 --- a/ext/reflection/php_reflection_arginfo.h +++ b/ext/reflection/php_reflection_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 53cb11e3aaa2215f8dbb39778dfbc1bd28f629af */ + * Stub hash: ac18876dab6c0d0e21564c75a033f61e0fd56f6a */ ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_Reflection_getModifierNames, 0, 1, IS_ARRAY, 0) ZEND_ARG_TYPE_INFO(0, modifiers, IS_LONG, 0) @@ -1287,6 +1287,14 @@ static zend_class_entry *register_class_ReflectionFunction(zend_class_entry *cla zend_declare_typed_class_constant(class_entry, const_IS_DEPRECATED_name, &const_IS_DEPRECATED_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_IS_DEPRECATED_name); + + zend_attribute *attribute_Deprecated_func_isdisabled_0 = zend_add_function_attribute(zend_hash_str_find_ptr(&class_entry->function_table, "isdisabled", sizeof("isdisabled") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED), 1); + zval attribute_Deprecated_func_isdisabled_0_arg0; + zend_string *attribute_Deprecated_func_isdisabled_0_arg0_str = zend_string_init("ReflectionFunction can no longer be constructed for disabled functions", strlen("ReflectionFunction can no longer be constructed for disabled functions"), 1); + ZVAL_STR(&attribute_Deprecated_func_isdisabled_0_arg0, attribute_Deprecated_func_isdisabled_0_arg0_str); + ZVAL_COPY_VALUE(&attribute_Deprecated_func_isdisabled_0->args[0].value, &attribute_Deprecated_func_isdisabled_0_arg0); + attribute_Deprecated_func_isdisabled_0->args[0].name = ZSTR_KNOWN(ZEND_STR_MESSAGE); + return class_entry; } @@ -1522,6 +1530,28 @@ static zend_class_entry *register_class_ReflectionParameter(zend_class_entry *cl zend_declare_typed_property(class_entry, property_name_name, &property_name_default_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_STRING)); zend_string_release(property_name_name); + + zend_attribute *attribute_Deprecated_func_getclass_0 = zend_add_function_attribute(zend_hash_str_find_ptr(&class_entry->function_table, "getclass", sizeof("getclass") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED), 1); + zval attribute_Deprecated_func_getclass_0_arg0; + zend_string *attribute_Deprecated_func_getclass_0_arg0_str = zend_string_init("use ReflectionParameter::getType() instead", strlen("use ReflectionParameter::getType() instead"), 1); + ZVAL_STR(&attribute_Deprecated_func_getclass_0_arg0, attribute_Deprecated_func_getclass_0_arg0_str); + ZVAL_COPY_VALUE(&attribute_Deprecated_func_getclass_0->args[0].value, &attribute_Deprecated_func_getclass_0_arg0); + attribute_Deprecated_func_getclass_0->args[0].name = ZSTR_KNOWN(ZEND_STR_MESSAGE); + + zend_attribute *attribute_Deprecated_func_isarray_0 = zend_add_function_attribute(zend_hash_str_find_ptr(&class_entry->function_table, "isarray", sizeof("isarray") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED), 1); + zval attribute_Deprecated_func_isarray_0_arg0; + zend_string *attribute_Deprecated_func_isarray_0_arg0_str = zend_string_init("use ReflectionParameter::getType() instead", strlen("use ReflectionParameter::getType() instead"), 1); + ZVAL_STR(&attribute_Deprecated_func_isarray_0_arg0, attribute_Deprecated_func_isarray_0_arg0_str); + ZVAL_COPY_VALUE(&attribute_Deprecated_func_isarray_0->args[0].value, &attribute_Deprecated_func_isarray_0_arg0); + attribute_Deprecated_func_isarray_0->args[0].name = ZSTR_KNOWN(ZEND_STR_MESSAGE); + + zend_attribute *attribute_Deprecated_func_iscallable_0 = zend_add_function_attribute(zend_hash_str_find_ptr(&class_entry->function_table, "iscallable", sizeof("iscallable") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED), 1); + zval attribute_Deprecated_func_iscallable_0_arg0; + zend_string *attribute_Deprecated_func_iscallable_0_arg0_str = zend_string_init("use ReflectionParameter::getType() instead", strlen("use ReflectionParameter::getType() instead"), 1); + ZVAL_STR(&attribute_Deprecated_func_iscallable_0_arg0, attribute_Deprecated_func_iscallable_0_arg0_str); + ZVAL_COPY_VALUE(&attribute_Deprecated_func_iscallable_0->args[0].value, &attribute_Deprecated_func_iscallable_0_arg0); + attribute_Deprecated_func_iscallable_0->args[0].name = ZSTR_KNOWN(ZEND_STR_MESSAGE); + return class_entry; } diff --git a/ext/reflection/tests/ReflectionClass_isArray.phpt b/ext/reflection/tests/ReflectionClass_isArray.phpt index 67df4e98e7542..6b6899f434a47 100644 --- a/ext/reflection/tests/ReflectionClass_isArray.phpt +++ b/ext/reflection/tests/ReflectionClass_isArray.phpt @@ -14,14 +14,14 @@ foreach ($reflection->getParameters() as $parameter) { } ?> --EXPECTF-- -Deprecated: Method ReflectionParameter::isArray() is deprecated in %s on line %d +Deprecated: Method ReflectionParameter::isArray() is deprecated, use ReflectionParameter::getType() instead in %s on line %d bool(true) -Deprecated: Method ReflectionParameter::isArray() is deprecated in %s on line %d +Deprecated: Method ReflectionParameter::isArray() is deprecated, use ReflectionParameter::getType() instead in %s on line %d bool(true) -Deprecated: Method ReflectionParameter::isArray() is deprecated in %s on line %d +Deprecated: Method ReflectionParameter::isArray() is deprecated, use ReflectionParameter::getType() instead in %s on line %d bool(false) -Deprecated: Method ReflectionParameter::isArray() is deprecated in %s on line %d +Deprecated: Method ReflectionParameter::isArray() is deprecated, use ReflectionParameter::getType() instead in %s on line %d bool(false) diff --git a/ext/reflection/tests/ReflectionFunction_isDisabled_basic.phpt b/ext/reflection/tests/ReflectionFunction_isDisabled_basic.phpt index 9cc7eaa31f0fa..f1781597aeb55 100644 --- a/ext/reflection/tests/ReflectionFunction_isDisabled_basic.phpt +++ b/ext/reflection/tests/ReflectionFunction_isDisabled_basic.phpt @@ -20,5 +20,5 @@ var_dump($rf->isDisabled()); --EXPECTF-- Function is_file() does not exist -Deprecated: Method ReflectionFunction::isDisabled() is deprecated in %s on line %d +Deprecated: Method ReflectionFunction::isDisabled() is deprecated, ReflectionFunction can no longer be constructed for disabled functions in %s on line %d bool(false) diff --git a/ext/reflection/tests/ReflectionParameter_getClass_self_parent_closure.phpt b/ext/reflection/tests/ReflectionParameter_getClass_self_parent_closure.phpt index 4e4270b606310..e9715c7d70a06 100644 --- a/ext/reflection/tests/ReflectionParameter_getClass_self_parent_closure.phpt +++ b/ext/reflection/tests/ReflectionParameter_getClass_self_parent_closure.phpt @@ -27,11 +27,11 @@ try { ?> --EXPECTF-- -Deprecated: Method ReflectionParameter::getClass() is deprecated in %s on line %d +Deprecated: Method ReflectionParameter::getClass() is deprecated, use ReflectionParameter::getType() instead in %s on line %d Parameter uses "self" as type but function is not a class member -Deprecated: Method ReflectionParameter::getClass() is deprecated in %s on line %d +Deprecated: Method ReflectionParameter::getClass() is deprecated, use ReflectionParameter::getType() instead in %s on line %d Parameter uses "parent" as type but function is not a class member -Deprecated: Method ReflectionParameter::getClass() is deprecated in %s on line %d +Deprecated: Method ReflectionParameter::getClass() is deprecated, use ReflectionParameter::getType() instead in %s on line %d Parameter uses "parent" as type although class does not have a parent diff --git a/ext/reflection/tests/bug26695.phpt b/ext/reflection/tests/bug26695.phpt index 2f50e2151ca08..ee90a7a3e4f14 100644 --- a/ext/reflection/tests/bug26695.phpt +++ b/ext/reflection/tests/bug26695.phpt @@ -20,5 +20,5 @@ $class = $params[0]->getClass(); var_dump($class->getName()); ?> --EXPECTF-- -Deprecated: Method ReflectionParameter::getClass() is deprecated in %s on line %d +Deprecated: Method ReflectionParameter::getClass() is deprecated, use ReflectionParameter::getType() instead in %s on line %d string(3) "Foo" diff --git a/ext/reflection/tests/bug29268.phpt b/ext/reflection/tests/bug29268.phpt index 4bb12819bc512..745c41dfabfb0 100644 --- a/ext/reflection/tests/bug29268.phpt +++ b/ext/reflection/tests/bug29268.phpt @@ -22,7 +22,7 @@ foreach($parameters as $parameter) echo "ok\n"; ?> --EXPECTF-- -Deprecated: Method ReflectionParameter::getClass() is deprecated in %s on line %d +Deprecated: Method ReflectionParameter::getClass() is deprecated, use ReflectionParameter::getType() instead in %s on line %d __autoload(A) A ok diff --git a/ext/reflection/tests/bug39884.phpt b/ext/reflection/tests/bug39884.phpt index 40494930289b6..6cab785a0635a 100644 --- a/ext/reflection/tests/bug39884.phpt +++ b/ext/reflection/tests/bug39884.phpt @@ -16,7 +16,7 @@ $refParam = new ReflectionParameter(array('stubParamTest', 'paramTest'), 'param' var_dump($refParam->getClass()); ?> --EXPECTF-- -Deprecated: Method ReflectionParameter::getClass() is deprecated in %s on line %d +Deprecated: Method ReflectionParameter::getClass() is deprecated, use ReflectionParameter::getType() instead in %s on line %d object(ReflectionClass)#4 (1) { ["name"]=> string(13) "stubParamTest" diff --git a/ext/reflection/tests/bug69802.phpt b/ext/reflection/tests/bug69802.phpt index bf60ea0143694..3e058a170f894 100644 --- a/ext/reflection/tests/bug69802.phpt +++ b/ext/reflection/tests/bug69802.phpt @@ -13,7 +13,7 @@ echo $r,"\n"; --EXPECTF-- string(1) "x" -Deprecated: Method ReflectionParameter::getClass() is deprecated in %s on line %d +Deprecated: Method ReflectionParameter::getClass() is deprecated, use ReflectionParameter::getType() instead in %s on line %d object(ReflectionClass)#4 (1) { ["name"]=> string(8) "stdClass" diff --git a/ext/reflection/tests/parameters_002.phpt b/ext/reflection/tests/parameters_002.phpt index 71d58c486f0b0..7a70cabae71e8 100644 --- a/ext/reflection/tests/parameters_002.phpt +++ b/ext/reflection/tests/parameters_002.phpt @@ -79,11 +79,11 @@ Deprecated: test(): Implicitly marking parameter $opt as nullable is deprecated, getName: string(3) "nix" isPassedByReference: bool(false) -Deprecated: Method ReflectionParameter::getClass() is deprecated in %s on line %d +Deprecated: Method ReflectionParameter::getClass() is deprecated, use ReflectionParameter::getType() instead in %s on line %d getClass: NULL getDeclaringClass: NULL isArray: -Deprecated: Method ReflectionParameter::isArray() is deprecated in %s on line %d +Deprecated: Method ReflectionParameter::isArray() is deprecated, use ReflectionParameter::getType() instead in %s on line %d bool(false) allowsNull: bool(true) isOptional: bool(false) @@ -92,11 +92,11 @@ isDefaultValueAvailable: bool(false) getName: string(2) "ar" isPassedByReference: bool(false) -Deprecated: Method ReflectionParameter::getClass() is deprecated in %s on line %d +Deprecated: Method ReflectionParameter::getClass() is deprecated, use ReflectionParameter::getType() instead in %s on line %d getClass: NULL getDeclaringClass: NULL isArray: -Deprecated: Method ReflectionParameter::isArray() is deprecated in %s on line %d +Deprecated: Method ReflectionParameter::isArray() is deprecated, use ReflectionParameter::getType() instead in %s on line %d bool(true) allowsNull: bool(false) isOptional: bool(false) @@ -105,11 +105,11 @@ isDefaultValueAvailable: bool(false) getName: string(3) "ref" isPassedByReference: bool(true) -Deprecated: Method ReflectionParameter::getClass() is deprecated in %s on line %d +Deprecated: Method ReflectionParameter::getClass() is deprecated, use ReflectionParameter::getType() instead in %s on line %d getClass: NULL getDeclaringClass: NULL isArray: -Deprecated: Method ReflectionParameter::isArray() is deprecated in %s on line %d +Deprecated: Method ReflectionParameter::isArray() is deprecated, use ReflectionParameter::getType() instead in %s on line %d bool(false) allowsNull: bool(true) isOptional: bool(false) @@ -118,11 +118,11 @@ isDefaultValueAvailable: bool(false) getName: string(3) "std" isPassedByReference: bool(false) -Deprecated: Method ReflectionParameter::getClass() is deprecated in %s on line %d +Deprecated: Method ReflectionParameter::getClass() is deprecated, use ReflectionParameter::getType() instead in %s on line %d getClass: stdClass getDeclaringClass: NULL isArray: -Deprecated: Method ReflectionParameter::isArray() is deprecated in %s on line %d +Deprecated: Method ReflectionParameter::isArray() is deprecated, use ReflectionParameter::getType() instead in %s on line %d bool(false) allowsNull: bool(false) isOptional: bool(false) @@ -131,11 +131,11 @@ isDefaultValueAvailable: bool(false) getName: string(2) "na" isPassedByReference: bool(false) -Deprecated: Method ReflectionParameter::getClass() is deprecated in %s on line %d +Deprecated: Method ReflectionParameter::getClass() is deprecated, use ReflectionParameter::getType() instead in %s on line %d Class "NonExistingClass" does not exist getDeclaringClass: NULL isArray: -Deprecated: Method ReflectionParameter::isArray() is deprecated in %s on line %d +Deprecated: Method ReflectionParameter::isArray() is deprecated, use ReflectionParameter::getType() instead in %s on line %d bool(false) allowsNull: bool(false) isOptional: bool(false) @@ -144,11 +144,11 @@ isDefaultValueAvailable: bool(false) getName: string(3) "opt" isPassedByReference: bool(true) -Deprecated: Method ReflectionParameter::getClass() is deprecated in %s on line %d +Deprecated: Method ReflectionParameter::getClass() is deprecated, use ReflectionParameter::getType() instead in %s on line %d getClass: stdClass getDeclaringClass: NULL isArray: -Deprecated: Method ReflectionParameter::isArray() is deprecated in %s on line %d +Deprecated: Method ReflectionParameter::isArray() is deprecated, use ReflectionParameter::getType() instead in %s on line %d bool(false) allowsNull: bool(true) isOptional: bool(true) @@ -158,11 +158,11 @@ getDefaultValue: NULL getName: string(3) "def" isPassedByReference: bool(false) -Deprecated: Method ReflectionParameter::getClass() is deprecated in %s on line %d +Deprecated: Method ReflectionParameter::getClass() is deprecated, use ReflectionParameter::getType() instead in %s on line %d getClass: NULL getDeclaringClass: NULL isArray: -Deprecated: Method ReflectionParameter::isArray() is deprecated in %s on line %d +Deprecated: Method ReflectionParameter::isArray() is deprecated, use ReflectionParameter::getType() instead in %s on line %d bool(false) allowsNull: bool(true) isOptional: bool(true) @@ -173,11 +173,11 @@ getDefaultValue: string(6) "FooBar" getName: string(3) "nix" isPassedByReference: bool(false) -Deprecated: Method ReflectionParameter::getClass() is deprecated in %s on line %d +Deprecated: Method ReflectionParameter::getClass() is deprecated, use ReflectionParameter::getType() instead in %s on line %d getClass: NULL getDeclaringClass: test isArray: -Deprecated: Method ReflectionParameter::isArray() is deprecated in %s on line %d +Deprecated: Method ReflectionParameter::isArray() is deprecated, use ReflectionParameter::getType() instead in %s on line %d bool(false) allowsNull: bool(true) isOptional: bool(false) @@ -186,11 +186,11 @@ isDefaultValueAvailable: bool(false) getName: string(2) "ar" isPassedByReference: bool(false) -Deprecated: Method ReflectionParameter::getClass() is deprecated in %s on line %d +Deprecated: Method ReflectionParameter::getClass() is deprecated, use ReflectionParameter::getType() instead in %s on line %d getClass: NULL getDeclaringClass: test isArray: -Deprecated: Method ReflectionParameter::isArray() is deprecated in %s on line %d +Deprecated: Method ReflectionParameter::isArray() is deprecated, use ReflectionParameter::getType() instead in %s on line %d bool(true) allowsNull: bool(false) isOptional: bool(false) @@ -199,11 +199,11 @@ isDefaultValueAvailable: bool(false) getName: string(3) "ref" isPassedByReference: bool(true) -Deprecated: Method ReflectionParameter::getClass() is deprecated in %s on line %d +Deprecated: Method ReflectionParameter::getClass() is deprecated, use ReflectionParameter::getType() instead in %s on line %d getClass: NULL getDeclaringClass: test isArray: -Deprecated: Method ReflectionParameter::isArray() is deprecated in %s on line %d +Deprecated: Method ReflectionParameter::isArray() is deprecated, use ReflectionParameter::getType() instead in %s on line %d bool(false) allowsNull: bool(true) isOptional: bool(false) @@ -212,11 +212,11 @@ isDefaultValueAvailable: bool(false) getName: string(3) "std" isPassedByReference: bool(false) -Deprecated: Method ReflectionParameter::getClass() is deprecated in %s on line %d +Deprecated: Method ReflectionParameter::getClass() is deprecated, use ReflectionParameter::getType() instead in %s on line %d getClass: stdClass getDeclaringClass: test isArray: -Deprecated: Method ReflectionParameter::isArray() is deprecated in %s on line %d +Deprecated: Method ReflectionParameter::isArray() is deprecated, use ReflectionParameter::getType() instead in %s on line %d bool(false) allowsNull: bool(false) isOptional: bool(false) @@ -225,11 +225,11 @@ isDefaultValueAvailable: bool(false) getName: string(2) "na" isPassedByReference: bool(false) -Deprecated: Method ReflectionParameter::getClass() is deprecated in %s on line %d +Deprecated: Method ReflectionParameter::getClass() is deprecated, use ReflectionParameter::getType() instead in %s on line %d Class "NonExistingClass" does not exist getDeclaringClass: test isArray: -Deprecated: Method ReflectionParameter::isArray() is deprecated in %s on line %d +Deprecated: Method ReflectionParameter::isArray() is deprecated, use ReflectionParameter::getType() instead in %s on line %d bool(false) allowsNull: bool(false) isOptional: bool(false) @@ -238,11 +238,11 @@ isDefaultValueAvailable: bool(false) getName: string(3) "opt" isPassedByReference: bool(false) -Deprecated: Method ReflectionParameter::getClass() is deprecated in %s on line %d +Deprecated: Method ReflectionParameter::getClass() is deprecated, use ReflectionParameter::getType() instead in %s on line %d getClass: stdClass getDeclaringClass: test isArray: -Deprecated: Method ReflectionParameter::isArray() is deprecated in %s on line %d +Deprecated: Method ReflectionParameter::isArray() is deprecated, use ReflectionParameter::getType() instead in %s on line %d bool(false) allowsNull: bool(true) isOptional: bool(true) @@ -252,11 +252,11 @@ getDefaultValue: NULL getName: string(3) "def" isPassedByReference: bool(false) -Deprecated: Method ReflectionParameter::getClass() is deprecated in %s on line %d +Deprecated: Method ReflectionParameter::getClass() is deprecated, use ReflectionParameter::getType() instead in %s on line %d getClass: NULL getDeclaringClass: test isArray: -Deprecated: Method ReflectionParameter::isArray() is deprecated in %s on line %d +Deprecated: Method ReflectionParameter::isArray() is deprecated, use ReflectionParameter::getType() instead in %s on line %d bool(false) allowsNull: bool(true) isOptional: bool(true) diff --git a/ext/shmop/shmop.c b/ext/shmop/shmop.c index 1368057309820..67f060f3c82cd 100644 --- a/ext/shmop/shmop.c +++ b/ext/shmop/shmop.c @@ -23,6 +23,8 @@ #include "php.h" #include "php_shmop.h" +#include "Zend/zend_attributes.h" + #include "shmop_arginfo.h" # ifndef PHP_WIN32 @@ -116,6 +118,8 @@ PHP_MINIT_FUNCTION(shmop) shmop_object_handlers.clone_obj = NULL; shmop_object_handlers.compare = zend_objects_not_comparable; + register_shmop_symbols(module_number); + return SUCCESS; } /* }}} */ diff --git a/ext/shmop/shmop.stub.php b/ext/shmop/shmop.stub.php index c9386cdfddc58..7222ade827412 100644 --- a/ext/shmop/shmop.stub.php +++ b/ext/shmop/shmop.stub.php @@ -12,7 +12,7 @@ function shmop_open(int $key, string $mode, int $permissions, int $size): Shmop| function shmop_read(Shmop $shmop, int $offset, int $size): string {} -/** @deprecated */ +#[\Deprecated] function shmop_close(Shmop $shmop): void {} function shmop_size(Shmop $shmop): int {} diff --git a/ext/shmop/shmop_arginfo.h b/ext/shmop/shmop_arginfo.h index e59f6a1da8e1a..77020551f41e6 100644 --- a/ext/shmop/shmop_arginfo.h +++ b/ext/shmop/shmop_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 6055f4edb68a7caed517dbb80f4d5265865dd91d */ + * Stub hash: d3c550e7b40aa3bb801d7dae4967bca90ab24879 */ ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_shmop_open, 0, 4, Shmop, MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(0, key, IS_LONG, 0) @@ -53,6 +53,12 @@ static const zend_function_entry class_Shmop_methods[] = { ZEND_FE_END }; +static void register_shmop_symbols(int module_number) +{ + + zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "shmop_close", sizeof("shmop_close") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED), 0); +} + static zend_class_entry *register_class_Shmop(void) { zend_class_entry ce, *class_entry; diff --git a/ext/spl/spl_directory.c b/ext/spl/spl_directory.c index 2785949095b1c..c705e9261ba5c 100644 --- a/ext/spl/spl_directory.c +++ b/ext/spl/spl_directory.c @@ -24,6 +24,7 @@ #include "ext/standard/flock_compat.h" #include "ext/standard/scanf.h" #include "ext/standard/php_string.h" +#include "zend_attributes.h" #include "zend_exceptions.h" #include "zend_interfaces.h" diff --git a/ext/spl/spl_directory.stub.php b/ext/spl/spl_directory.stub.php index 1e858534c5f4b..a9f49715e8f78 100644 --- a/ext/spl/spl_directory.stub.php +++ b/ext/spl/spl_directory.stub.php @@ -98,9 +98,9 @@ public function __toString(): string {} public function __debugInfo(): array {} /** - * @deprecated * @tentative-return-type */ + #[\Deprecated(since: '8.2')] final public function _bad_state_ex(): void {} } diff --git a/ext/spl/spl_directory_arginfo.h b/ext/spl/spl_directory_arginfo.h index aa258b42b91cf..4534970dc492c 100644 --- a/ext/spl/spl_directory_arginfo.h +++ b/ext/spl/spl_directory_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 6212994df4935f42c99080b928b8b5b08bdbe19d */ + * Stub hash: 3ed3a9f6609e1b8fa642f1e4cfaa1de40e3cc11e */ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_SplFileInfo___construct, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0) @@ -491,6 +491,14 @@ static zend_class_entry *register_class_SplFileInfo(zend_class_entry *class_entr class_entry->ce_flags |= ZEND_ACC_NOT_SERIALIZABLE; zend_class_implements(class_entry, 1, class_entry_Stringable); + + zend_attribute *attribute_Deprecated_func__bad_state_ex_0 = zend_add_function_attribute(zend_hash_str_find_ptr(&class_entry->function_table, "_bad_state_ex", sizeof("_bad_state_ex") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED), 1); + zval attribute_Deprecated_func__bad_state_ex_0_arg0; + zend_string *attribute_Deprecated_func__bad_state_ex_0_arg0_str = zend_string_init("8.2", strlen("8.2"), 1); + ZVAL_STR(&attribute_Deprecated_func__bad_state_ex_0_arg0, attribute_Deprecated_func__bad_state_ex_0_arg0_str); + ZVAL_COPY_VALUE(&attribute_Deprecated_func__bad_state_ex_0->args[0].value, &attribute_Deprecated_func__bad_state_ex_0_arg0); + attribute_Deprecated_func__bad_state_ex_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE); + return class_entry; } diff --git a/ext/standard/basic_functions.stub.php b/ext/standard/basic_functions.stub.php index 2e89f446d4624..62d7785d42876 100644 --- a/ext/standard/basic_functions.stub.php +++ b/ext/standard/basic_functions.stub.php @@ -2136,9 +2136,9 @@ function crypt(#[\SensitiveParameter] string $string, string $salt): string {} #ifdef HAVE_STRPTIME /** * @return array|false - * @deprecated * @refcount 1 */ +#[\Deprecated] function strptime(string $timestamp, string $format): array|false {} #endif @@ -2301,7 +2301,7 @@ function get_html_translation_table(int $table = HTML_SPECIALCHARS, int $flags = function assert(mixed $assertion, Throwable|string|null $description = null): bool {} -/** @deprecated */ +#[\Deprecated(since: '8.3')] function assert_options(int $option, mixed $value = UNKNOWN): mixed {} /* string.c */ @@ -2655,15 +2655,15 @@ function substr_compare(string $haystack, string $needle, int $offset, ?int $len /** * @compile-time-eval * @refcount 1 - * @deprecated */ +#[\Deprecated] function utf8_encode(string $string): string {} /** * @compile-time-eval * @refcount 1 - * @deprecated */ +#[\Deprecated] function utf8_decode(string $string): string {} /* dir.c */ diff --git a/ext/standard/basic_functions_arginfo.h b/ext/standard/basic_functions_arginfo.h index f3d04ad2544d9..1969c3c906033 100644 --- a/ext/standard/basic_functions_arginfo.h +++ b/ext/standard/basic_functions_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 7d588414e84ed62088cd5b1c668b29c0e51d406f */ + * Stub hash: 27c735a49e2718f27f056d6133bf40096a680a46 */ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_set_time_limit, 0, 1, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, seconds, IS_LONG, 0) @@ -4122,6 +4122,21 @@ static void register_basic_functions_symbols(int module_number) zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "crypt", sizeof("crypt") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); +#if defined(HAVE_STRPTIME) + + zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "strptime", sizeof("strptime") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED), 0); +#endif + + zend_attribute *attribute_Deprecated_func_assert_options_0 = zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "assert_options", sizeof("assert_options") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED), 1); + zval attribute_Deprecated_func_assert_options_0_arg0; + zend_string *attribute_Deprecated_func_assert_options_0_arg0_str = zend_string_init("8.3", strlen("8.3"), 1); + ZVAL_STR(&attribute_Deprecated_func_assert_options_0_arg0, attribute_Deprecated_func_assert_options_0_arg0_str); + ZVAL_COPY_VALUE(&attribute_Deprecated_func_assert_options_0->args[0].value, &attribute_Deprecated_func_assert_options_0_arg0); + attribute_Deprecated_func_assert_options_0->args[0].name = ZSTR_KNOWN(ZEND_STR_SINCE); + + zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "utf8_encode", sizeof("utf8_encode") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED), 0); + + zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "utf8_decode", sizeof("utf8_decode") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED), 0); zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "password_hash", sizeof("password_hash") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); diff --git a/ext/standard/tests/assert/assert.phpt b/ext/standard/tests/assert/assert.phpt index 249415b0e995f..4649e9a59be94 100644 --- a/ext/standard/tests/assert/assert.phpt +++ b/ext/standard/tests/assert/assert.phpt @@ -43,23 +43,23 @@ Deprecated: PHP Startup: assert.exception INI setting is deprecated in Unknown o Deprecated: Constant ASSERT_ACTIVE is deprecated in %s on line %d -Deprecated: Function assert_options() is deprecated in %s on line %d +Deprecated: Function assert_options() is deprecated since 8.3 in %s on line %d Deprecated: Constant ASSERT_WARNING is deprecated in %s on line %d -Deprecated: Function assert_options() is deprecated in %s on line %d +Deprecated: Function assert_options() is deprecated since 8.3 in %s on line %d Deprecated: Constant ASSERT_CALLBACK is deprecated in %s on line %d -Deprecated: Function assert_options() is deprecated in %s on line %d +Deprecated: Function assert_options() is deprecated since 8.3 in %s on line %d assertion failed 21,"assert($a != 0)" Deprecated: Constant ASSERT_CALLBACK is deprecated in %s on line %d -Deprecated: Function assert_options() is deprecated in %s on line %d +Deprecated: Function assert_options() is deprecated since 8.3 in %s on line %d class assertion failed 24,"assert($a != 0)" Deprecated: Constant ASSERT_CALLBACK is deprecated in %s on line %d -Deprecated: Function assert_options() is deprecated in %s on line %d +Deprecated: Function assert_options() is deprecated since 8.3 in %s on line %d class assertion failed 28,"assert($a != 0)" diff --git a/ext/standard/tests/assert/assert03.phpt b/ext/standard/tests/assert/assert03.phpt index 5863650859db0..2a62665893a88 100644 --- a/ext/standard/tests/assert/assert03.phpt +++ b/ext/standard/tests/assert/assert03.phpt @@ -38,15 +38,15 @@ Deprecated: PHP Startup: assert.exception INI setting is deprecated in Unknown o Deprecated: Constant ASSERT_ACTIVE is deprecated in %s on line %d -Deprecated: Function assert_options() is deprecated in %s on line %d +Deprecated: Function assert_options() is deprecated since 8.3 in %s on line %d Deprecated: Constant ASSERT_WARNING is deprecated in %s on line %d -Deprecated: Function assert_options() is deprecated in %s on line %d +Deprecated: Function assert_options() is deprecated since 8.3 in %s on line %d Deprecated: Constant ASSERT_CALLBACK is deprecated in %s on line %d -Deprecated: Function assert_options() is deprecated in %s on line %d +Deprecated: Function assert_options() is deprecated since 8.3 in %s on line %d assertion failed - a - 18,"assert($a != 0)" Deprecated: ini_set(): assert.callback INI setting is deprecated in %s on line %d diff --git a/ext/standard/tests/assert/assert04.phpt b/ext/standard/tests/assert/assert04.phpt index ff777552374ad..9935d4c6a123c 100644 --- a/ext/standard/tests/assert/assert04.phpt +++ b/ext/standard/tests/assert/assert04.phpt @@ -31,16 +31,16 @@ Deprecated: PHP Startup: assert.exception INI setting is deprecated in Unknown o Deprecated: Constant ASSERT_ACTIVE is deprecated in %s on line %d -Deprecated: Function assert_options() is deprecated in %s on line %d +Deprecated: Function assert_options() is deprecated since 8.3 in %s on line %d Deprecated: Constant ASSERT_ACTIVE is deprecated in %s on line %d -Deprecated: Function assert_options() is deprecated in %s on line %d +Deprecated: Function assert_options() is deprecated since 8.3 in %s on line %d Warning: assert(): assert(0) failed in %s on line %d Deprecated: Constant ASSERT_BAIL is deprecated in %s on line %d -Deprecated: Function assert_options() is deprecated in %s on line %d +Deprecated: Function assert_options() is deprecated since 8.3 in %s on line %d Warning: assert(): assert(0) failed in %s on line %d diff --git a/ext/standard/tests/assert/assert_basic2.phpt b/ext/standard/tests/assert/assert_basic2.phpt index 18bac512bf0de..fdd1c53b93dde 100644 --- a/ext/standard/tests/assert/assert_basic2.phpt +++ b/ext/standard/tests/assert/assert_basic2.phpt @@ -32,7 +32,7 @@ Deprecated: PHP Startup: assert.exception INI setting is deprecated in Unknown o Deprecated: Constant ASSERT_CALLBACK is deprecated in %s on line %d -Deprecated: Function assert_options() is deprecated in %s on line %d +Deprecated: Function assert_options() is deprecated since 8.3 in %s on line %d string(2) "f1" f1 called @@ -40,12 +40,12 @@ Warning: assert(): assert(0) failed in %s on line %d Deprecated: Constant ASSERT_CALLBACK is deprecated in %s on line %d -Deprecated: Function assert_options() is deprecated in %s on line %d +Deprecated: Function assert_options() is deprecated since 8.3 in %s on line %d string(2) "f1" Deprecated: Constant ASSERT_CALLBACK is deprecated in %s on line %d -Deprecated: Function assert_options() is deprecated in %s on line %d +Deprecated: Function assert_options() is deprecated since 8.3 in %s on line %d string(2) "f2" f2 called diff --git a/ext/standard/tests/assert/assert_basic3.phpt b/ext/standard/tests/assert/assert_basic3.phpt index d93c759d7b9bf..0849f16e6f208 100644 --- a/ext/standard/tests/assert/assert_basic3.phpt +++ b/ext/standard/tests/assert/assert_basic3.phpt @@ -25,7 +25,7 @@ Deprecated: PHP Startup: assert.exception INI setting is deprecated in Unknown o Deprecated: Constant ASSERT_BAIL is deprecated in %s on line %d -Deprecated: Function assert_options() is deprecated in %s on line %d +Deprecated: Function assert_options() is deprecated since 8.3 in %s on line %d int(0) f1 called diff --git a/ext/standard/tests/assert/assert_basic4.phpt b/ext/standard/tests/assert/assert_basic4.phpt index ff628494f0c68..76ade8d00f403 100644 --- a/ext/standard/tests/assert/assert_basic4.phpt +++ b/ext/standard/tests/assert/assert_basic4.phpt @@ -30,22 +30,22 @@ Deprecated: PHP Startup: assert.callback INI setting is deprecated in Unknown on Deprecated: Constant ASSERT_ACTIVE is deprecated in %s on line %d -Deprecated: Function assert_options() is deprecated in %s on line %d +Deprecated: Function assert_options() is deprecated since 8.3 in %s on line %d Initial values: assert_options(ASSERT_ACTIVE) => [0] Deprecated: Constant ASSERT_WARNING is deprecated in %s on line %d -Deprecated: Function assert_options() is deprecated in %s on line %d +Deprecated: Function assert_options() is deprecated since 8.3 in %s on line %d Initial values: assert_options(ASSERT_WARNING) => [0] Deprecated: Constant ASSERT_BAIL is deprecated in %s on line %d -Deprecated: Function assert_options() is deprecated in %s on line %d +Deprecated: Function assert_options() is deprecated since 8.3 in %s on line %d Initial values: assert_options(ASSERT_BAIL) => [0] Deprecated: Constant ASSERT_CALLBACK is deprecated in %s on line %d -Deprecated: Function assert_options() is deprecated in %s on line %d +Deprecated: Function assert_options() is deprecated since 8.3 in %s on line %d Initial values: assert_options(ASSERT_CALLBACK) => [f1] Initial values: ini.get("assert.active") => [0] Initial values: ini.get("assert.warning") => [0] diff --git a/ext/standard/tests/assert/assert_basic5.phpt b/ext/standard/tests/assert/assert_basic5.phpt index ca4c83ed11f91..6ba70d94cdf36 100644 --- a/ext/standard/tests/assert/assert_basic5.phpt +++ b/ext/standard/tests/assert/assert_basic5.phpt @@ -30,7 +30,7 @@ Deprecated: PHP Startup: assert.exception INI setting is deprecated in Unknown o Deprecated: Constant ASSERT_WARNING is deprecated in %s on line %d -Deprecated: Function assert_options() is deprecated in %s on line %d +Deprecated: Function assert_options() is deprecated since 8.3 in %s on line %d int(0) f1 called @@ -40,5 +40,5 @@ bool(true) Deprecated: Constant ASSERT_WARNING is deprecated in %s on line %d -Deprecated: Function assert_options() is deprecated in %s on line %d +Deprecated: Function assert_options() is deprecated since 8.3 in %s on line %d int(1) diff --git a/ext/standard/tests/assert/assert_basic6.phpt b/ext/standard/tests/assert/assert_basic6.phpt index 132ac9d51f4fe..4e95fdb01dc4c 100644 --- a/ext/standard/tests/assert/assert_basic6.phpt +++ b/ext/standard/tests/assert/assert_basic6.phpt @@ -34,11 +34,11 @@ try { --EXPECTF-- Deprecated: Constant ASSERT_CALLBACK is deprecated in %s on line %d -Deprecated: Function assert_options() is deprecated in %s on line %d +Deprecated: Function assert_options() is deprecated since 8.3 in %s on line %d Deprecated: Constant ASSERT_CALLBACK is deprecated in %s on line %d -Deprecated: Function assert_options() is deprecated in %s on line %d +Deprecated: Function assert_options() is deprecated since 8.3 in %s on line %d string(2) "f1" foo assert(false) @@ -46,10 +46,10 @@ assert(false) Deprecated: Constant ASSERT_CALLBACK is deprecated in %s on line %d -Deprecated: Function assert_options() is deprecated in %s on line %d +Deprecated: Function assert_options() is deprecated since 8.3 in %s on line %d Deprecated: Constant ASSERT_CALLBACK is deprecated in %s on line %d -Deprecated: Function assert_options() is deprecated in %s on line %d +Deprecated: Function assert_options() is deprecated since 8.3 in %s on line %d NULL assert(false) diff --git a/ext/standard/tests/assert/assert_closures.phpt b/ext/standard/tests/assert/assert_closures.phpt index b53ef0c3c1e10..aa7246ee21bee 100644 --- a/ext/standard/tests/assert/assert_closures.phpt +++ b/ext/standard/tests/assert/assert_closures.phpt @@ -15,7 +15,7 @@ Deprecated: PHP Startup: assert.exception INI setting is deprecated in Unknown o Deprecated: Constant ASSERT_CALLBACK is deprecated in %s on line %d -Deprecated: Function assert_options() is deprecated in %s on line %d +Deprecated: Function assert_options() is deprecated since 8.3 in %s on line %d Hello World! Warning: assert(): assert(0) failed in %s on line %d diff --git a/ext/standard/tests/assert/assert_closures_multiple.phpt b/ext/standard/tests/assert/assert_closures_multiple.phpt index b514e993708f9..0786740155571 100644 --- a/ext/standard/tests/assert/assert_closures_multiple.phpt +++ b/ext/standard/tests/assert/assert_closures_multiple.phpt @@ -34,5 +34,5 @@ DONE --EXPECTF-- Deprecated: Constant ASSERT_CALLBACK is deprecated in %s on line %d -Deprecated: Function assert_options() is deprecated in %s on line %d +Deprecated: Function assert_options() is deprecated since 8.3 in %s on line %d DONE diff --git a/ext/standard/tests/assert/assert_error2.phpt b/ext/standard/tests/assert/assert_error2.phpt index c1757f72f8060..eaa62523845d4 100644 --- a/ext/standard/tests/assert/assert_error2.phpt +++ b/ext/standard/tests/assert/assert_error2.phpt @@ -27,7 +27,7 @@ Deprecated: PHP Startup: assert.exception INI setting is deprecated in Unknown o Deprecated: Constant ASSERT_BAIL is deprecated in %s on line %d -Deprecated: Function assert_options() is deprecated in %s on line %d +Deprecated: Function assert_options() is deprecated since 8.3 in %s on line %d int(0) f1 called diff --git a/ext/standard/tests/assert/assert_options_error.phpt b/ext/standard/tests/assert/assert_options_error.phpt index 6cd4ed70db804..d3b055e65f9a1 100644 --- a/ext/standard/tests/assert/assert_options_error.phpt +++ b/ext/standard/tests/assert/assert_options_error.phpt @@ -10,5 +10,5 @@ try { } ?> --EXPECTF-- -Deprecated: Function assert_options() is deprecated in %s on line %d +Deprecated: Function assert_options() is deprecated since 8.3 in %s on line %d assert_options(): Argument #1 ($option) must be an ASSERT_* constant diff --git a/ext/standard/tests/assert/assert_variation.phpt b/ext/standard/tests/assert/assert_variation.phpt index 8f436d92635ce..494f6cd579384 100644 --- a/ext/standard/tests/assert/assert_variation.phpt +++ b/ext/standard/tests/assert/assert_variation.phpt @@ -87,7 +87,7 @@ Deprecated: PHP Startup: assert.exception INI setting is deprecated in Unknown o Deprecated: Constant ASSERT_CALLBACK is deprecated in %s on line %d -Deprecated: Function assert_options() is deprecated in %s on line %d +Deprecated: Function assert_options() is deprecated since 8.3 in %s on line %d Initial values: assert_options(ASSERT_CALLBACK) => [f1] Initial values: ini.get("assert.callback") => [f1] f1 called @@ -100,7 +100,7 @@ string(2) "f1" Deprecated: Constant ASSERT_CALLBACK is deprecated in %s on line %d -Deprecated: Function assert_options() is deprecated in %s on line %d +Deprecated: Function assert_options() is deprecated since 8.3 in %s on line %d assert_options(ASSERT_CALLBACK) => [f2] ini.get("assert.callback") => [f2] f2 called @@ -110,12 +110,12 @@ Change callback function using assert_options and test return value Deprecated: Constant ASSERT_CALLBACK is deprecated in %s on line %d -Deprecated: Function assert_options() is deprecated in %s on line %d +Deprecated: Function assert_options() is deprecated since 8.3 in %s on line %d string(2) "f2" Deprecated: Constant ASSERT_CALLBACK is deprecated in %s on line %d -Deprecated: Function assert_options() is deprecated in %s on line %d +Deprecated: Function assert_options() is deprecated since 8.3 in %s on line %d assert_options(ASSERT_CALLBACK) => [f3] ini.get("assert.callback") => [f2] f3 called @@ -125,12 +125,12 @@ Reset the name of the callback routine to a class method Deprecated: Constant ASSERT_CALLBACK is deprecated in %s on line %d -Deprecated: Function assert_options() is deprecated in %s on line %d +Deprecated: Function assert_options() is deprecated since 8.3 in %s on line %d string(2) "f3" Deprecated: Constant ASSERT_CALLBACK is deprecated in %s on line %d -Deprecated: Function assert_options() is deprecated in %s on line %d +Deprecated: Function assert_options() is deprecated since 8.3 in %s on line %d assert_options(ASSERT_CALLBACK) => [c1] ini.get("assert.callback") => [f2] Invalid callback c1, function "c1" not found or invalid function name @@ -139,12 +139,12 @@ Reset callback options to use a class method Deprecated: Constant ASSERT_CALLBACK is deprecated in %s on line %d -Deprecated: Function assert_options() is deprecated in %s on line %d +Deprecated: Function assert_options() is deprecated since 8.3 in %s on line %d string(2) "c1" Deprecated: Constant ASSERT_CALLBACK is deprecated in %s on line %d -Deprecated: Function assert_options() is deprecated in %s on line %d +Deprecated: Function assert_options() is deprecated since 8.3 in %s on line %d array(2) { [0]=> string(2) "c1" @@ -160,7 +160,7 @@ Reset callback options to use an object method Deprecated: Constant ASSERT_CALLBACK is deprecated in %s on line %d -Deprecated: Function assert_options() is deprecated in %s on line %d +Deprecated: Function assert_options() is deprecated since 8.3 in %s on line %d array(2) { [0]=> string(2) "c1" @@ -170,7 +170,7 @@ array(2) { Deprecated: Constant ASSERT_CALLBACK is deprecated in %s on line %d -Deprecated: Function assert_options() is deprecated in %s on line %d +Deprecated: Function assert_options() is deprecated since 8.3 in %s on line %d array(2) { [0]=> &object(c1)#2 (0) { @@ -187,9 +187,9 @@ Set callback to something silly Deprecated: Constant ASSERT_CALLBACK is deprecated in %s on line %d -Deprecated: Function assert_options() is deprecated in %s on line %d +Deprecated: Function assert_options() is deprecated since 8.3 in %s on line %d Deprecated: Constant ASSERT_CALLBACK is deprecated in %s on line %d -Deprecated: Function assert_options() is deprecated in %s on line %d +Deprecated: Function assert_options() is deprecated since 8.3 in %s on line %d float(3.141) diff --git a/ext/standard/tests/assert/bug80290.phpt b/ext/standard/tests/assert/bug80290.phpt index cb32a80b03a75..8b737f33043f9 100644 --- a/ext/standard/tests/assert/bug80290.phpt +++ b/ext/standard/tests/assert/bug80290.phpt @@ -14,7 +14,7 @@ assert(false, 'Dynamic message: ' . $x); --EXPECTF-- Deprecated: Constant ASSERT_CALLBACK is deprecated in %s on line %d -Deprecated: Function assert_options() is deprecated in %s on line %d +Deprecated: Function assert_options() is deprecated since 8.3 in %s on line %d string(18) "Dynamic message: x" Fatal error: Uncaught AssertionError: Dynamic message: x in %s:%d diff --git a/ext/zip/php_zip.c b/ext/zip/php_zip.c index 4dfaaaee5e19f..5d331c2fa4b82 100644 --- a/ext/zip/php_zip.c +++ b/ext/zip/php_zip.c @@ -3168,6 +3168,8 @@ static PHP_MINIT_FUNCTION(zip) php_register_url_stream_wrapper("zip", &php_stream_zip_wrapper); + register_php_zip_symbols(module_number); + le_zip_dir = zend_register_list_destructors_ex(php_zip_free_dir, NULL, le_zip_dir_name, module_number); le_zip_entry = zend_register_list_destructors_ex(php_zip_free_entry, NULL, le_zip_entry_name, module_number); diff --git a/ext/zip/php_zip.stub.php b/ext/zip/php_zip.stub.php index bdd236faaa1a6..375f9adf29785 100644 --- a/ext/zip/php_zip.stub.php +++ b/ext/zip/php_zip.stub.php @@ -4,64 +4,64 @@ /** * @return resource|int|false - * @deprecated */ +#[\Deprecated] function zip_open(string $filename) {} /** * @param resource $zip - * @deprecated */ +#[\Deprecated] function zip_close($zip): void {} /** * @param resource $zip * @return resource|false - * @deprecated */ +#[\Deprecated] function zip_read($zip) {} /** * @param resource $zip_dp * @param resource $zip_entry - * @deprecated */ +#[\Deprecated] function zip_entry_open($zip_dp, $zip_entry, string $mode = "rb"): bool {} /** * @param resource $zip_entry - * @deprecated */ +#[\Deprecated] function zip_entry_close($zip_entry): bool {} /** * @param resource $zip_entry - * @deprecated */ +#[\Deprecated] function zip_entry_read($zip_entry, int $len = 1024): string|false {} /** * @param resource $zip_entry - * @deprecated */ +#[\Deprecated] function zip_entry_name($zip_entry): string|false {} /** * @param resource $zip_entry - * @deprecated */ +#[\Deprecated] function zip_entry_compressedsize($zip_entry): int|false {} /** * @param resource $zip_entry - * @deprecated */ +#[\Deprecated] function zip_entry_filesize($zip_entry): int|false {} /** * @param resource $zip_entry - * @deprecated */ +#[\Deprecated] function zip_entry_compressionmethod($zip_entry): string|false {} class ZipArchive implements Countable @@ -109,8 +109,8 @@ class ZipArchive implements Countable #ifdef ZIP_FL_RECOMPRESS /** * @cvalue ZIP_FL_RECOMPRESS - * @deprecated */ + #[\Deprecated] public const int FL_RECOMPRESS = UNKNOWN; #endif /** diff --git a/ext/zip/php_zip_arginfo.h b/ext/zip/php_zip_arginfo.h index fc0621ea19b3c..68148e9cc85d8 100644 --- a/ext/zip/php_zip_arginfo.h +++ b/ext/zip/php_zip_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 95564c667a51a548f5d43025c90546b991970ddd */ + * Stub hash: 1649cc6f892951dca6dd0a85b01b39532063fab8 */ ZEND_BEGIN_ARG_INFO_EX(arginfo_zip_open, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0) @@ -497,6 +497,30 @@ static const zend_function_entry class_ZipArchive_methods[] = { ZEND_FE_END }; +static void register_php_zip_symbols(int module_number) +{ + + zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "zip_open", sizeof("zip_open") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED), 0); + + zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "zip_close", sizeof("zip_close") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED), 0); + + zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "zip_read", sizeof("zip_read") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED), 0); + + zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "zip_entry_open", sizeof("zip_entry_open") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED), 0); + + zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "zip_entry_close", sizeof("zip_entry_close") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED), 0); + + zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "zip_entry_read", sizeof("zip_entry_read") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED), 0); + + zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "zip_entry_name", sizeof("zip_entry_name") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED), 0); + + zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "zip_entry_compressedsize", sizeof("zip_entry_compressedsize") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED), 0); + + zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "zip_entry_filesize", sizeof("zip_entry_filesize") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED), 0); + + zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "zip_entry_compressionmethod", sizeof("zip_entry_compressionmethod") - 1), ZSTR_KNOWN(ZEND_STR_DEPRECATED), 0); +} + static zend_class_entry *register_class_ZipArchive(zend_class_entry *class_entry_Countable) { zend_class_entry ce, *class_entry; @@ -565,7 +589,7 @@ static zend_class_entry *register_class_ZipArchive(zend_class_entry *class_entry zval const_FL_RECOMPRESS_value; ZVAL_LONG(&const_FL_RECOMPRESS_value, ZIP_FL_RECOMPRESS); zend_string *const_FL_RECOMPRESS_name = zend_string_init_interned("FL_RECOMPRESS", sizeof("FL_RECOMPRESS") - 1, 1); - zend_declare_typed_class_constant(class_entry, const_FL_RECOMPRESS_name, &const_FL_RECOMPRESS_value, ZEND_ACC_PUBLIC|ZEND_ACC_DEPRECATED, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); + zend_class_constant *const_FL_RECOMPRESS = zend_declare_typed_class_constant(class_entry, const_FL_RECOMPRESS_name, &const_FL_RECOMPRESS_value, ZEND_ACC_PUBLIC|ZEND_ACC_DEPRECATED, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_FL_RECOMPRESS_name); #endif @@ -1278,6 +1302,11 @@ static zend_class_entry *register_class_ZipArchive(zend_class_entry *class_entry zend_declare_typed_property(class_entry, property_comment_name, &property_comment_default_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_STRING)); zend_string_release(property_comment_name); +#if defined(ZIP_FL_RECOMPRESS) + + zend_add_class_constant_attribute(class_entry, const_FL_RECOMPRESS, ZSTR_KNOWN(ZEND_STR_DEPRECATED), 0); +#endif + zend_add_parameter_attribute(zend_hash_str_find_ptr(&class_entry->function_table, "setpassword", sizeof("setpassword") - 1), 0, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0); #if defined(HAVE_ENCRYPTION)