Skip to content

Commit 922bd2f

Browse files
ext/readline: update return typehints from bool to true (php#16545)
These always return true
1 parent 0b3684c commit 922bd2f

File tree

3 files changed

+12
-7
lines changed

3 files changed

+12
-7
lines changed

UPGRADING

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,11 @@ PHP 8.5 UPGRADE NOTES
100100
9. Other Changes to Extensions
101101
========================================
102102

103+
- Readline:
104+
. The return types of readline_add_history(), readline_clear_history(), and
105+
readline_callback_handler_install() have been changed to true, rather
106+
than bool.
107+
103108
========================================
104109
10. New Global Constants
105110
========================================

ext/readline/readline.stub.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ function readline(?string $prompt = null): string|false {}
1313
/** @param int|string|bool|null $value */
1414
function readline_info(?string $var_name = null, $value = null): mixed {}
1515

16-
function readline_add_history(string $prompt): bool {}
16+
function readline_add_history(string $prompt): true {}
1717

18-
function readline_clear_history(): bool {}
18+
function readline_clear_history(): true {}
1919

2020
#ifdef HAVE_HISTORY_LIST
2121
/**
@@ -33,7 +33,7 @@ function readline_completion_function(callable $callback): bool {}
3333

3434

3535
#ifdef HAVE_RL_CALLBACK_READ_CHAR
36-
function readline_callback_handler_install(string $prompt, callable $callback): bool {}
36+
function readline_callback_handler_install(string $prompt, callable $callback): true {}
3737

3838
function readline_callback_read_char(): void {}
3939

ext/readline/readline_arginfo.h

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)