From 2a60543cee7179c502d19b5d4b96eccb58ead6be Mon Sep 17 00:00:00 2001 From: Peter Kokot Date: Wed, 1 Nov 2023 17:26:27 +0100 Subject: [PATCH] Add deprecation notice when enabling mhash (#12586) The mhash* functions are deprecated as of PHP 8.1.0. https://wiki.php.net/rfc/deprecations_php_8_1 --- ext/hash/config.m4 | 1 + ext/hash/config.w32 | 1 + 2 files changed, 2 insertions(+) diff --git a/ext/hash/config.m4 b/ext/hash/config.m4 index dd0b24a1320..00075da06ff 100644 --- a/ext/hash/config.m4 +++ b/ext/hash/config.m4 @@ -4,6 +4,7 @@ PHP_ARG_WITH([mhash], [Include mhash support])]) if test "$PHP_MHASH" != "no"; then + AC_MSG_WARN([The --with-mhash option and mhash* functions are deprecated as of PHP 8.1.0]) AC_DEFINE(PHP_MHASH_BC, 1, [ ]) fi diff --git a/ext/hash/config.w32 b/ext/hash/config.w32 index d38b032efd3..61c8fcb35b7 100644 --- a/ext/hash/config.w32 +++ b/ext/hash/config.w32 @@ -3,6 +3,7 @@ ARG_WITH('mhash', 'mhash support (BC via hash)', 'no'); if (PHP_MHASH != 'no') { + WARNING("mhash* functions are deprecated as of PHP 8.1.0"); AC_DEFINE('PHP_MHASH_BC', 1); }