Skip to content

Enable pear/pecl by default for PHP 8 #1087

Closed

Description

@derickr

Hi,

Unlike other reports, the pear/pecl tools are not deprecated in PHP. They're merely not being enabled by default. The pecl tool is the only official way to fetch and compile PHP extensions. Unless there is an official replacement, please continue building the default docker images with the --with-pear flag.

cheers,
Derick
PHP 7.4 Release Manager

Activity

  1. q0rban commented on Nov 24, 2020

    @q0rban

    Related issue #846

  2. tianon commented on Nov 24, 2020

    @tianon
    Member

    Always appreciate folks from upstream joining our conversations ❤️ 🙏

    However, now I'm confused -- we discussed this quite a bit back in #840 (comment) (with @petk 👋) and ./configure --with-pear still appears to warn that the option is deprecated (https://github.com/php/php-src/blob/706241f82d675421766b23fad4923f22b2c8e32c/configure.ac#L1152 from the PHP-7.4 branch and https://github.com/php/php-src/blob/cdd5ec7a3ceb8f3efc12766672c44db65205fdd1/configure.ac#L1114 from the PHP-8.0 branch). 😕

    Is someone working on an official replacement? Is there a plan to keep/support that option indefinitely until there is such a thing? FWIW, it is included in the 7.4 images (just not in 8.0 because, as it notes when it's used, we understood it to be deprecated):

    # in PHP 7.4+, the pecl/pear installers are officially deprecated (requiring an explicit "--with-pear")
    # ... and are removed in PHP 8+; see also https://github.com/docker-library/php/pull/847#issuecomment-505638229
    --with-pear \

    If the official recommendation is that it should still be included, why isn't the default yes instead of no and/or the deprecation warning removed? 😕

    (Is there perhaps an upstream mailing list thread or issue discussion we could read for follow-up discussion from https://externals.io/message/103977 / php/php-src#3781?)

  3. q0rban commented on Nov 24, 2020

    @q0rban

    Great links, thanks @tianon! So there were talks of deprecating pear in 7.4 and removing it entirely in PHP 8.0. The deprecation seems to have happened, however, the removal of it from PHP 8.0 does not seem to have happened. The documentation on Migrating from PHP 7.4.x to PHP 8.0.x makes no mention of Pear being removed.

    It seems to me that the least disruptive thing for folks using the official Docker PHP images is for the --with-pear option to continue to be used until such a time as a community-led best practice is solidified.

    I expect that if this is left as is without a clear community-led direction on how to install pecl packages, the official PHP Docker images are about to get a flood of issues asking how to install things like XDebug on the PHP 8.0-* Docker images.

  4. petk commented on Nov 24, 2020

    @petk
    Contributor

    Hello, +1 for the unfortunate unremoved yet --with-pear flag. PHP is not following semantic versioning and also core developers are overloaded with bugs at the moment so, I think it can be removed in some future PHP version instead. Basically, pear is still needed for installing php extensions (pecl script). At least until a better alternative will be done, either with Composer, or entirely new pecl script written.

  5. q0rban commented on Nov 24, 2020

    @q0rban

    Fantastic, thanks for confirming this for us! 😅

    There's a pull request to bring the --with-pear option back for PHP 8+ Docker images in #1088 .

  6. michaljusiega commented on Nov 24, 2020

    @michaljusiega

    I will also remind for alternatives: #1029

  7. derickr commented on Nov 24, 2020

    @derickr
    Author

    @michaljusiega Please don't push pickle as acceptable alternative yet. It is not finished, has no proper release, has plenty of issues, and is not adopted by the PHP project.

  8. michaljusiega commented on Nov 24, 2020

    @michaljusiega

    @michaljusiega Please don't push pickle as acceptable alternative yet. It is not finished, has no proper release, has plenty of issues, and is not adopted by the PHP project.

    You're right.
    After release of PHP8.0-alpha1 PECL originally was not available so I was looking for solutions and alternatives.
    Since the discussion returned, I would like to return my honor - pickle is not a good solution because I had some problems myself.

  9. tianon commented on Nov 24, 2020

    @tianon
    Member

    Ahhh, makes sense, thank you for the additional detail! ❤️

  10. added a commit that references this issue on Nov 24, 2020
  11. added a commit that references this issue on Nov 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions