From 97f10fc341fb320dd803b83e0b3a3041a1ee2046 Mon Sep 17 00:00:00 2001 From: Tyson Andre Date: Sat, 18 Jul 2020 17:54:59 -0400 Subject: Allow overriding completion in `auto_prepend_file` Currently, it's possible to override `php -a`s completion functionality to provide an alternative to the C implementation, with `readline_completion_function()`. However, that surprisingly gets overridden when called from `auto_prepend_file`, because those scripts get run before the interactive shell is started. I believe that not overriding it would be more consistent with what happens when you override the completion function **after** the interactive shell. CLI is the only built-in API that uses this (See discussion in GH-5872). I believe MINIT and RINIT will only run once when invoked with `php -a`. Add documentation about the architecture of how php uses readline/libedit Closes GH-5872 --- UPGRADING | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'UPGRADING') diff --git a/UPGRADING b/UPGRADING index a71c8959c3..f38f149236 100644 --- a/UPGRADING +++ b/UPGRADING @@ -932,6 +932,12 @@ PHP 8.0 UPGRADE NOTES - PGSQL / PDO PGSQL: . The PGSQL and PDO PGSQL extensions now require at least libpq 9.1. +- Readline: + . Calling readline_completion_function() before the interactive prompt starts + (e.g. in auto_prepend_file) will now override the default interactive prompt + completion function. Previously, readline_completion_function() only worked + when called after starting the interactive prompt. + - SimpleXML: . SimpleXMLElement now implements RecursiveIterator and absorbed the functionality of SimpleXMLIterator. SimpleXMLIterator is an empty extension -- cgit v1.2.1