Skip to content

ext/readline: update return typehints from bool to true #16545

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions UPGRADING
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,11 @@ PHP 8.5 UPGRADE NOTES
9. Other Changes to Extensions
========================================

- Readline:
. The return types of readline_add_history(), readline_clear_history(), and
readline_callback_handler_install() have been changed to true, rather
than bool.

========================================
10. New Global Constants
========================================
Expand Down
6 changes: 3 additions & 3 deletions ext/readline/readline.stub.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ function readline(?string $prompt = null): string|false {}
/** @param int|string|bool|null $value */
function readline_info(?string $var_name = null, $value = null): mixed {}

function readline_add_history(string $prompt): bool {}
function readline_add_history(string $prompt): true {}

function readline_clear_history(): bool {}
function readline_clear_history(): true {}

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


#ifdef HAVE_RL_CALLBACK_READ_CHAR
function readline_callback_handler_install(string $prompt, callable $callback): bool {}
function readline_callback_handler_install(string $prompt, callable $callback): true {}

function readline_callback_read_char(): void {}

Expand Down
8 changes: 4 additions & 4 deletions ext/readline/readline_arginfo.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading