Skip to content

Commit

Permalink
Revert "Remove GNU Readline in favor of libedit (#3745)"
Browse files Browse the repository at this point in the history
This reverts commit b9582e1, and the
follow-up f8e440f, because the change
didn't make it into PHP 8.4, and is still pending.
  • Loading branch information
cmb69 committed Nov 15, 2024
1 parent 72b70d7 commit 51779f7
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 63 deletions.
4 changes: 2 additions & 2 deletions reference/readline/book.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@

<book xml:id="book.readline" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<?phpdoc extension-membership="bundledexternal" ?>
<title>Readline</title>
<title>GNU Readline</title>
<titleabbrev>Readline</titleabbrev>

<!-- {{{ preface -->
<preface xml:id="intro.readline">
&reftitle.intro;
<para>
The readline functions implement an interface
to the libedit library. These are functions that provide
to the GNU Readline library. These are functions that provide
editable command lines. An example being the way Bash allows you
to use the arrow keys to insert characters or scroll through
command history. Because of the interactive nature of this
Expand Down
34 changes: 4 additions & 30 deletions reference/readline/configure.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,41 +3,15 @@
<section xml:id="readline.installation" xmlns="http://docbook.org/ns/docbook">
&reftitle.install;
<para>
To use these functions the CGI or CLI version of PHP must be compiled
To use these functions you must compile the CGI or CLI version of PHP
with readline support. You need to configure PHP
<option role="configure">--with-readline</option>.
<option role="configure">--with-readline[=DIR]</option>.
If you want to use the libedit readline replacement, configure PHP
<option role="configure">--with-libedit[=DIR]</option>.
</para>
<para>
On Windows this extension is available by default as of PHP 7.1.0.
</para>
<simplesect role="changelog">
&reftitle.changelog;
<para>
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>8.4.0</entry>
<entry>
Configure option <option role="configure">--with-libedit</option>
has been removed in favor of the
<option role="configure">--with-readline</option> which now doesn't
accept a DIR argument anymore in favor of the pkg-config and now links
to the libedit library, a non-GPL replacement for the GNU Readline
library.
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</para>
</simplesect>
</section>

<!-- Keep this comment at the end of the file
Expand Down
29 changes: 0 additions & 29 deletions reference/readline/constants.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,38 +14,9 @@
The library which is used for readline support; currently either
<literal>readline</literal> or <literal>libedit</literal>.
</simpara>
<simpara>
Removed as of PHP 8.4.0.
</simpara>
</listitem>
</varlistentry>
</variablelist>

<formalpara>
&reftitle.changelog;
<para>
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>8.4.0</entry>
<entry>
The <constant>READLINE_LIB</constant> has been removed. The library
which is used for readline support; either <literal>readline</literal>
or <literal>libedit</literal>.
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</para>
</formalpara>
</appendix>
<!-- Keep this comment at the end of the file
Local variables:
Expand Down
11 changes: 9 additions & 2 deletions reference/readline/setup.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,15 @@
<section xml:id="readline.requirements">
&reftitle.required;
<para>
To use the readline functions, the libedit library must be installed. The
libedit library is BSD-licensed and available for download from
To use the readline functions, you need to install libreadline. You can
find libreadline on the home page of the GNU Readline project, at
<link xlink:href="&url.readline;">&url.readline;</link>.
It's maintained by Chet Ramey, who's also the author of Bash.
</para>
<para>
You can also use these functions with the libedit library, a non-GPL
replacement for the readline library. The libedit library is BSD
licensed and available for download from
<link xlink:href="&url.libedit;">&url.libedit;</link>.
</para>
</section>
Expand Down

0 comments on commit 51779f7

Please sign in to comment.