From 5f5d12c58354f93ac1c350a68e3714c8dc2cd7f0 Mon Sep 17 00:00:00 2001 From: Kamil Tekiela Date: Sat, 12 Aug 2023 15:31:12 +0100 Subject: [PATCH 1/2] mysqli_field_seek now has true return type --- ext/mysqli/mysqli.stub.php | 2 +- ext/mysqli/mysqli_arginfo.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ext/mysqli/mysqli.stub.php b/ext/mysqli/mysqli.stub.php index bb39ab5bbd147..92f8e84907800 100644 --- a/ext/mysqli/mysqli.stub.php +++ b/ext/mysqli/mysqli.stub.php @@ -1457,7 +1457,7 @@ function mysqli_fetch_column(mysqli_result $result, int $column = 0): null|int|f function mysqli_field_count(mysqli $mysql): int {} -function mysqli_field_seek(mysqli_result $result, int $index): bool {} +function mysqli_field_seek(mysqli_result $result, int $index): true {} // TODO make return type void function mysqli_field_tell(mysqli_result $result): int {} diff --git a/ext/mysqli/mysqli_arginfo.h b/ext/mysqli/mysqli_arginfo.h index eacfc83a67103..9cbe4f80126a9 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: 656fe3f3475bb2f43d89ebf34361940e2f746373 */ + * Stub hash: 543a6e2354efcf690b7ac1316bff5d7e346cb51b */ 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) @@ -130,7 +130,7 @@ ZEND_END_ARG_INFO() #define arginfo_mysqli_field_count arginfo_mysqli_errno -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mysqli_field_seek, 0, 2, _IS_BOOL, 0) +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mysqli_field_seek, 0, 2, IS_TRUE, 0) ZEND_ARG_OBJ_INFO(0, result, mysqli_result, 0) ZEND_ARG_TYPE_INFO(0, index, IS_LONG, 0) ZEND_END_ARG_INFO() From 44f394d21a659c3e9de33649441920150f32540d Mon Sep 17 00:00:00 2001 From: Kamil Tekiela Date: Mon, 14 Aug 2023 11:46:26 +0100 Subject: [PATCH 2/2] Change return type for mysqli_result::field_seek --- UPGRADING | 2 ++ ext/mysqli/mysqli.stub.php | 2 +- ext/mysqli/mysqli_arginfo.h | 4 ++-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/UPGRADING b/UPGRADING index 75536b00f4a54..95f7a24ebc767 100644 --- a/UPGRADING +++ b/UPGRADING @@ -289,6 +289,8 @@ PHP 8.3 UPGRADE NOTES constructor. . mysqli_poll now raises a ValueError when the read nor error arguments are passed. + . mysqli_field_seek and mysqli_result::field_seek now specify return type + as true instead of bool. - ODBC . odbc_autocommit() now accepts null for the $enable parameter. diff --git a/ext/mysqli/mysqli.stub.php b/ext/mysqli/mysqli.stub.php index 92f8e84907800..4fd55442b7447 100644 --- a/ext/mysqli/mysqli.stub.php +++ b/ext/mysqli/mysqli.stub.php @@ -1144,7 +1144,7 @@ public function fetch_column(int $column = 0): null|int|float|string|false {} * @tentative-return-type * @alias mysqli_field_seek */ - public function field_seek(int $index): bool {} + public function field_seek(int $index): true {} // TODO make return type void /** * @tentative-return-type diff --git a/ext/mysqli/mysqli_arginfo.h b/ext/mysqli/mysqli_arginfo.h index 9cbe4f80126a9..ee4a2013809e9 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: 543a6e2354efcf690b7ac1316bff5d7e346cb51b */ + * Stub hash: a54ef005e9535458e886b7845a25a1c742a114ac */ 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) @@ -628,7 +628,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_class_mysqli_result_fetch_column ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, column, IS_LONG, 0, "0") ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_mysqli_result_field_seek, 0, 1, _IS_BOOL, 0) +ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_mysqli_result_field_seek, 0, 1, IS_TRUE, 0) ZEND_ARG_TYPE_INFO(0, index, IS_LONG, 0) ZEND_END_ARG_INFO()