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

Enable pear/pecl by default for PHP 8 #1087

Closed
derickr opened this issue Nov 24, 2020 · 9 comments · Fixed by #1088
Closed

Enable pear/pecl by default for PHP 8 #1087

derickr opened this issue Nov 24, 2020 · 9 comments · Fixed by #1088

Comments

@derickr
Copy link

derickr commented Nov 24, 2020

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

@q0rban
Copy link
Contributor

q0rban commented Nov 24, 2020

Related issue #846

@tianon
Copy link
Member

tianon commented Nov 24, 2020

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?)

@q0rban
Copy link
Contributor

q0rban commented Nov 24, 2020

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.

@petk
Copy link
Contributor

petk commented Nov 24, 2020

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.

@q0rban
Copy link
Contributor

q0rban commented Nov 24, 2020

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 .

@michaljusiega
Copy link

I will also remind for alternatives: #1029

@derickr
Copy link
Author

derickr commented Nov 24, 2020

@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
Copy link

michaljusiega commented Nov 24, 2020

@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.

@tianon
Copy link
Member

tianon commented Nov 24, 2020

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

docker-library-bot added a commit to docker-library-bot/official-images that referenced this issue Nov 24, 2020
Changes:

- docker-library/php@cf3943e: Merge pull request docker-library/php#1088 from q0rban/1087-8.0-pear
- docker-library/php@470ab97: Update put-shared link/badge
- docker-library/php@03a9fae: Update templates.
- docker-library/php@0fdd2f0: Configure PHP with pear/pecl installers for PHP 8.0 docker-library/php#1087
- docker-library/php@fa26844: Remove messages about pear being removed in PHP 8+.
cjbj referenced this issue in php/php-src Nov 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants