Skip to content
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

Drop support for libreadline #3823

Closed
wants to merge 1 commit into from

Conversation

remicollet
Copy link
Member

libreadline is GPL, so incompatible with PHP

  • remove --with-libedit option and rely on pkg-config instead
  • remove --with-readline DIR option
  • cleanup conditions using HAVELIBREADLINE or HAVE_LIBEDIT
  • keep HAVE_LIBEDIT in php_config.h is some extension use it

Notice: Windows already only support libedit

@remicollet
Copy link
Member Author

Notice: if merged, I plan to add a deprecation warning in 7.4

@nikic
Copy link
Member

nikic commented Feb 13, 2019

Looks like you'll have to install libedit on Travis.

I'm personally fine with making this change. Supporting two different libraries with subtly different behavior and different feature set is not a good idea. If libedit is available everywhere, I don't see a disadvantage to normalizing on it.

@remicollet remicollet force-pushed the issue-nolibreadline branch 2 times, most recently from c64922b to 256d4c4 Compare February 13, 2019 14:20
@remicollet
Copy link
Member Author

readline_list_history also added for 7.x in pr #3824

libreadline is GPL, so incompatible with PHP
@remicollet
Copy link
Member Author

Rebased and travis is happy :)

@hughmcmaster
Copy link
Contributor

@remicollet What is the status of this removal?

@mvorisek
Copy link
Contributor

@remicollet do you want this still to be merged and can you rebase on current master?

@krakjoe
Copy link
Member

krakjoe commented May 11, 2021

@remicollet this looks like it ought to be taken care of, the rebase looks non-trivial and I don't want to mess it up ....

Hopefully we can get this sorted for 8.1, I'll add a milestone so that eyes are on it ...

@krakjoe krakjoe added this to the PHP 8.1 milestone May 11, 2021
@remicollet
Copy link
Member Author

Differred, as need to be rebased...

@remicollet remicollet closed this Jul 6, 2021
petk added a commit to petk/php-src that referenced this pull request Jan 19, 2024
Readline library is not compatible with PHP license-wise and shouldn't
be compiled into the executable. This can be simplified by using the
libedit library with pkgconf determining its availability.

This is a continuation of php#3823
and other discussions in the past.
@petk
Copy link
Member

petk commented Jan 19, 2024

Continuing this one here: #13184

@petk petk mentioned this pull request Jan 19, 2024
6 tasks
petk added a commit to petk/php-src that referenced this pull request Sep 13, 2024
This removes the GNU Readline library integration and relies on the
libedit library if present. Issue is that there are several ext/readline
libraries and GNU Readline license (GNU GPL 3) is not compatible with
the PHP license. There was a similar attempt to fix this (phpGH-3823) and
now fix continues here.

Changes:
- `--with-libedit` configure option removed (only `--with-readline`
  stays)

This also fixes the phpdbg readline integration on *nix systems (using
libedit library) for history (up/down keys and similar nice features).
petk added a commit to petk/php-src that referenced this pull request Sep 14, 2024
This removes the GNU Readline library integration and relies on the
libedit library if present. Issue is that there are several ext/readline
libraries and GNU Readline license (GNU GPL 3) is not compatible with
the PHP license. There was a similar attempt to fix this (phpGH-3823) and
now fix continues here.

Changes:
- `--with-libedit` configure option removed (only `--with-readline`
  stays)
- readline extension tests fixed: those required by only readline
  library removed, added missing skip reasons, some functions are always
  available, etc.
- New PHP_SETUP_EDIT Autoconf macro that finds libedit

This also fixes the phpdbg readline integration on *nix systems (using
libedit library) for history (up/down keys and similar nice features) to
not produce compile errors:

    ./configure --enable-phpdbg-readline
    make

    undefined reference to 'readline'
    undefined reference to 'add_history'
petk added a commit to petk/php-src that referenced this pull request Sep 14, 2024
This removes the GNU Readline library integration and relies on the
libedit library if present. Issue is that there are several ext/readline
libraries and GNU Readline license (GNU GPL 3) is not compatible with
the PHP license. There was a similar attempt to fix this (phpGH-3823) and
now fix continues here.

Changes:
- `--with-libedit` configure option removed (only `--with-readline`
  stays)
- readline extension tests fixed: those required by only readline
  library removed, added missing skip reasons, some functions are always
  available, etc.
- New PHP_SETUP_EDIT Autoconf macro that finds libedit

This also fixes the phpdbg readline integration on *nix systems (using
libedit library) for history (up/down keys and similar nice features) to
not produce compile errors:

    ./configure --enable-phpdbg-readline
    make

    undefined reference to 'readline'
    undefined reference to 'add_history'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants