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
Related issue #846
Always appreciate folks from upstream joining our conversations :heart: :pray:
However, now I'm confused -- we discussed this quite a bit back in https://github.com/docker-library/php/pull/840#issuecomment-502251019 (with @petk :wave:) _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). :confused:
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):
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? :confused:
(Is there perhaps an upstream mailing list thread or issue discussion we could read for follow-up discussion from https://externals.io/message/103977 / https://github.com/php/php-src/pull/3781?)
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.
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.
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 .
I will also remind for alternatives: https://github.com/docker-library/php/issues/1029
@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.
@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.
Ahhh, makes sense, thank you for the additional detail! :heart:
Most helpful comment
@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.