php icon indicating copy to clipboard operation
php copied to clipboard

Add PECL wrapper commands

Open zeriyoshi opened this issue 3 years ago • 2 comments
trafficstars

PECL use is currently supported, but PECL by default does not support parallel compilation like the -j option, and huge extensions such as gRPC take a huge amount of build time.

To solve this problem, we add a script that wraps PECL.

This is useful because so far PECL is the only native extension package manager for PHP and has many useful and essential extensions for production environments (gRPC, protobuf, APCu, Redis, etc.).

zeriyoshi avatar Nov 08 '22 04:11 zeriyoshi

See #919, especially https://github.com/docker-library/php/issues/919#issuecomment-564737047 -- I haven't seen the deprecation of pecl being part of the PHP distribution be pushed forward (as in, full removal), but I haven't seen the deprecation be cancelled either (indeed, the --with-pear flag appears to still be officially deprecated: https://github.com/php/php-src/blob/f6c9a90e19d648355c39da84af9bc59b2ff60c15/configure.ac#L1216).

To add just a little bit more meat here, my biggest concern is maintaining yet-more code above and beyond what is distributed by the PHP project, especially for something that is in most cases reasonably straightforward already, even with cleanup of dependencies (https://github.com/docker-library/php/issues/919#issuecomment-562359749), and even more especially that does so in an unconventional way (we've got a few of those, and they're definitely sources of friction for users and maintainers).

I imagine the number of extensions where -j is going to be useful/necessary is probably relatively small? (If it isn't, that seems like a great feature request to pecl itself :eyes:)

tianon avatar Nov 10 '22 18:11 tianon

@tianon Yes, I too believe that this feature should originally be implemented in pecl.

However, since PECL is already in maintenance mode and deprecated, I do not see any new functionality being incorporated. That said, PECL is currently the only repository for PHP extensions, and many extensions are hosted in PECL.

For the above reasons, docker-php still expects to support PECL even after its deprecation. In light of this situation, we believe it would be appropriate to incorporate a follow-up to PECL on the docker-php side.

On the other hand, PHP certainly needs to resolve the issue of hosting Native Extensions.

zeriyoshi avatar Nov 23 '22 03:11 zeriyoshi

For the above reasons, docker-php still expects to support PECL even after its deprecation.

I'm sorry, but we do not expect this, actually -- if PECL is finally removed, we will not be doing anything but removing any reference to it. :sweat_smile:

tianon avatar Dec 19 '23 00:12 tianon