diff --git a/NEWS b/NEWS index 47bf820d6b64c..bef0ac90460a0 100644 --- a/NEWS +++ b/NEWS @@ -69,6 +69,7 @@ PHP NEWS - Fileinfo: . Upgrade to file 5.46. (nielsdos) + . Change return type of finfo_close() to true. (timwolla) - FPM: . Fixed GH-17645 (FPM with httpd ProxyPass does not decode script path). diff --git a/UPGRADING b/UPGRADING index 6b6c555adcf73..36be5313ab6c5 100644 --- a/UPGRADING +++ b/UPGRADING @@ -348,6 +348,9 @@ PHP 8.5 UPGRADE NOTES - Fileinfo: . Upgraded to file 5.46. + . The return type of finfo_close() has been changed to true, rather + than bool. + - PCRE: . Upgraded to pcre2lib from 10.44 to 10.45. diff --git a/ext/fileinfo/fileinfo.stub.php b/ext/fileinfo/fileinfo.stub.php index 6fc2cc4c7b4e5..2dba0fe2659ef 100644 --- a/ext/fileinfo/fileinfo.stub.php +++ b/ext/fileinfo/fileinfo.stub.php @@ -92,7 +92,7 @@ public function set_flags(int $flags): true {} /** @refcount 1 */ function finfo_open(int $flags = FILEINFO_NONE, ?string $magic_database = null): finfo|false {} -function finfo_close(finfo $finfo): bool {} +function finfo_close(finfo $finfo): true {} function finfo_set_flags(finfo $finfo, int $flags): true {} diff --git a/ext/fileinfo/fileinfo_arginfo.h b/ext/fileinfo/fileinfo_arginfo.h index 36b9351ea1387..024e7d4b6bd59 100644 --- a/ext/fileinfo/fileinfo_arginfo.h +++ b/ext/fileinfo/fileinfo_arginfo.h @@ -1,12 +1,12 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 96d78126bc5af37c5d94fa160e509623e947de48 */ + * Stub hash: d5bc322159e4af87077c07ddaca0a77803b4743a */ ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_finfo_open, 0, 0, finfo, MAY_BE_FALSE) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "FILEINFO_NONE") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, magic_database, IS_STRING, 1, "null") ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_finfo_close, 0, 1, _IS_BOOL, 0) +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_finfo_close, 0, 1, IS_TRUE, 0) ZEND_ARG_OBJ_INFO(0, finfo, finfo, 0) ZEND_END_ARG_INFO()