mirror of
https://github.com/php/php-src.git
synced 2025-08-15 13:38:49 +02:00
Deprecate mhash constants
The mhash functions already have been deprecated as of PHP 8.1.0[1], but the respective constants appear to have been missed. We catch up on that. [1] <https://wiki.php.net/rfc/deprecations_php_8_1#mhash_function_family> Closes GH-16569.
This commit is contained in:
parent
7c37c25ef2
commit
2b10cd1beb
5 changed files with 51 additions and 1 deletions
|
@ -56,6 +56,11 @@ PHP 8.5 UPGRADE NOTES
|
|||
4. Deprecated Functionality
|
||||
========================================
|
||||
|
||||
- Hash:
|
||||
The MHASH_* constants have been deprecated. These have been overlooked
|
||||
when the mhash*() function family has been deprecated per
|
||||
https://wiki.php.net/rfc/deprecations_php_8_1#mhash_function_family
|
||||
|
||||
========================================
|
||||
5. Changed Functions
|
||||
========================================
|
||||
|
|
|
@ -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); */
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue