diff --git a/ext/hash/hash.c b/ext/hash/hash.c index 9d099c2d50b45..fbfcf485e1d7a 100644 --- a/ext/hash/hash.c +++ b/ext/hash/hash.c @@ -1189,7 +1189,7 @@ static void mhash_init(INIT_FUNC_ARGS) } len = slprintf(buf, 127, "MHASH_%s", algorithm.mhash_name); - zend_register_long_constant(buf, len, algorithm.value, CONST_PERSISTENT, module_number); + zend_register_long_constant(buf, len, algorithm.value, CONST_PERSISTENT|CONST_DEPRECATED, module_number); } /* TODO: this cause #69823 zend_register_internal_module(&mhash_module_entry); */ diff --git a/ext/hash/tests/mhash_001.phpt b/ext/hash/tests/mhash_001.phpt index 6b2011b2f1f68..29f0f473380b1 100644 --- a/ext/hash/tests/mhash_001.phpt +++ b/ext/hash/tests/mhash_001.phpt @@ -35,56 +35,78 @@ foreach ($supported_hash_al as $hash=>$wanted) { } ?> --EXPECTF-- +Deprecated: Constant MHASH_MD5 is deprecated in %s on line %d + Deprecated: Function mhash() is deprecated since 8.1 in %s on line %d MHASH_MD5 ok +Deprecated: Constant MHASH_SHA1 is deprecated in %s on line %d + Deprecated: Function mhash() is deprecated since 8.1 in %s on line %d MHASH_SHA1 ok +Deprecated: Constant MHASH_HAVAL256 is deprecated in %s on line %d + Deprecated: Function mhash() is deprecated since 8.1 in %s on line %d MHASH_HAVAL256 ok +Deprecated: Constant MHASH_HAVAL192 is deprecated in %s on line %d + Deprecated: Function mhash() is deprecated since 8.1 in %s on line %d MHASH_HAVAL192 ok +Deprecated: Constant MHASH_HAVAL224 is deprecated in %s on line %d + Deprecated: Function mhash() is deprecated since 8.1 in %s on line %d MHASH_HAVAL224 ok +Deprecated: Constant MHASH_HAVAL160 is deprecated in %s on line %d + Deprecated: Function mhash() is deprecated since 8.1 in %s on line %d MHASH_HAVAL160 ok +Deprecated: Constant MHASH_RIPEMD160 is deprecated in %s on line %d + Deprecated: Function mhash() is deprecated since 8.1 in %s on line %d MHASH_RIPEMD160 ok +Deprecated: Constant MHASH_GOST is deprecated in %s on line %d + Deprecated: Function mhash() is deprecated since 8.1 in %s on line %d MHASH_GOST ok +Deprecated: Constant MHASH_TIGER is deprecated in %s on line %d + Deprecated: Function mhash() is deprecated since 8.1 in %s on line %d MHASH_TIGER ok +Deprecated: Constant MHASH_CRC32 is deprecated in %s on line %d + Deprecated: Function mhash() is deprecated since 8.1 in %s on line %d MHASH_CRC32 ok +Deprecated: Constant MHASH_CRC32B is deprecated in %s on line %d + Deprecated: Function mhash() is deprecated since 8.1 in %s on line %d MHASH_CRC32B ok diff --git a/ext/hash/tests/mhash_003.phpt b/ext/hash/tests/mhash_003.phpt index 26c54af6feb64..f39e1ff387cb9 100644 --- a/ext/hash/tests/mhash_003.phpt +++ b/ext/hash/tests/mhash_003.phpt @@ -35,56 +35,78 @@ foreach ($supported_hash_al as $hash=>$wanted) { } ?> --EXPECTF-- +Deprecated: Constant MHASH_MD5 is deprecated in %s on line %d + Deprecated: Function mhash_keygen_s2k() is deprecated since 8.1 in %s on line %d MHASH_MD5 ok +Deprecated: Constant MHASH_SHA1 is deprecated in %s on line %d + Deprecated: Function mhash_keygen_s2k() is deprecated since 8.1 in %s on line %d MHASH_SHA1 ok +Deprecated: Constant MHASH_HAVAL256 is deprecated in %s on line %d + Deprecated: Function mhash_keygen_s2k() is deprecated since 8.1 in %s on line %d MHASH_HAVAL256 ok +Deprecated: Constant MHASH_HAVAL224 is deprecated in %s on line %d + Deprecated: Function mhash_keygen_s2k() is deprecated since 8.1 in %s on line %d MHASH_HAVAL224 ok +Deprecated: Constant MHASH_HAVAL192 is deprecated in %s on line %d + Deprecated: Function mhash_keygen_s2k() is deprecated since 8.1 in %s on line %d MHASH_HAVAL192 ok +Deprecated: Constant MHASH_HAVAL160 is deprecated in %s on line %d + Deprecated: Function mhash_keygen_s2k() is deprecated since 8.1 in %s on line %d MHASH_HAVAL160 ok +Deprecated: Constant MHASH_RIPEMD160 is deprecated in %s on line %d + Deprecated: Function mhash_keygen_s2k() is deprecated since 8.1 in %s on line %d MHASH_RIPEMD160 ok +Deprecated: Constant MHASH_GOST is deprecated in %s on line %d + Deprecated: Function mhash_keygen_s2k() is deprecated since 8.1 in %s on line %d MHASH_GOST ok +Deprecated: Constant MHASH_TIGER is deprecated in %s on line %d + Deprecated: Function mhash_keygen_s2k() is deprecated since 8.1 in %s on line %d MHASH_TIGER ok +Deprecated: Constant MHASH_CRC32 is deprecated in %s on line %d + Deprecated: Function mhash_keygen_s2k() is deprecated since 8.1 in %s on line %d MHASH_CRC32 ok +Deprecated: Constant MHASH_CRC32B is deprecated in %s on line %d + Deprecated: Function mhash_keygen_s2k() is deprecated since 8.1 in %s on line %d MHASH_CRC32B ok diff --git a/ext/hash/tests/mhash_004.phpt b/ext/hash/tests/mhash_004.phpt index 7087b090fabaf..e47d48eb1a5d8 100644 --- a/ext/hash/tests/mhash_004.phpt +++ b/ext/hash/tests/mhash_004.phpt @@ -12,6 +12,7 @@ var_dump($algo); ?> --EXPECTF-- +Deprecated: Constant MHASH_MD5 is deprecated in %s on line %d int(1) Deprecated: Function mhash() is deprecated since 8.1 in %s on line %d