Proposal to unbundle imap/pspell/oci8 extensions for PHP 8.4

php.internals

Derick Rethans

2 years ago
Hi, In a recent chat between the PHP Foundation developers, we discussed unbundling several extensions. ext/imap The library that provides the functionality in this extension, c-client, is no longer updated. The last release from 2007 is no longer available on the original distributor's (University of Washington) website, but there is an unofficial GitHub repository that hasn't been updated for 5 years either (https://github.com/uw-imap/imap). You can't also use this any more with G Suite due to authentication changes (https://github.com/uw-imap/imap/issues/4). There are several user-land packages that are still maintained, and provide superior functionality: - https://github.com/PHPMailer/PHPMailer - https://github.com/zetacomponents/Mail/ - https://github.com/symfony/mailer - https://github.com/laminas/laminas-mail ext/pspell The original underlying library hasn't been updated since 2001 (https://en.wikipedia.org/wiki/Pspell) and it's replacement, aspell not since 2019 (https://ftp.gnu.org/gnu/aspell/). There are other replacements, ispell, and hunspell, but they don't seem to be compatible API-wise. The PECL extension "enchant" was supposed to be able to use with all of these, but is also no longer maintained (last release in 2009, https://pecl.php.net/package/enchant). Again, there are several user land composer packages (https://packagist.org/?query=spell) that can be used instead. ext/oci8 Requires a proprietary library from large commercial enterprise (https://www.oracle.com/database/technologies/instant-client.html) and has many outstanding bugs: https://bugs.php.net/search.php?cmd=display&package_name[]=PDO+OCI&package_name[]=OCI8+related&package_name[]=Oracle+related&order_by=ts1&direction=ASC&limit=30&status=Open&reorder_by=ts1 https://github.com/php/php-src/labels/Extension%3A%20oci8 Most of the recent changes were all to skip tests. It is also one of the larger extensions left that had not had their resource type converted to objects. This is a major effort, and frankly, probably something that should be done by the corporate sponsor of the oracle extensions. Please remember, that unbundling extensions does not mean that they disappear. They will be moved to PECL with a release made. An RFC will of course be forthcoming, but we thought it best to email the list first. cheers, Derick
-- https://derickrethans.nl | https://xdebug.org | https://dram.io Author of Xdebug. Like it? Consider supporting me: https://xdebug.org/support Host of PHP Internals News: https://phpinternals.news mastodon: @derickr@phpc.social @xdebug@phpc.social twitter: @derickr and @xdebug

Vinicius Dias

2 years ago
> ext/imap > > The library that provides the functionality in this extension, c-client, > is no longer updated. The last release from 2007 is no longer available > on the original distributor's (University of Washington) website, but > there is an unofficial GitHub repository that hasn't been updated for 5 > years either (https://github.com/uw-imap/imap). > > You can't also use this any more with G Suite due to authentication > changes (https://github.com/uw-imap/imap/issues/4). > > There are several user-land packages that are still maintained, and > provide superior functionality: > > - https://github.com/PHPMailer/PHPMailer > - https://github.com/zetacomponents/Mail/ > - https://github.com/symfony/mailer > - https://github.com/laminas/laminas-mail >
Those alternatives are for sending e-mails. IMAP is for reading e-mails. They are not equivalent. Am I missing something here? Vinicius Dias, Zend Certified Engineer, iMasters PHP Certified Professional Em qua., 13 de set. de 2023 às 05:50, Derick Rethans <derick@derickrethans.nl> escreveu:

Ayesh - PHP.Watch

2 years ago
> > ext/imap > > > > The library that provides the functionality in this extension, c-client, > > is no longer updated. The last release from 2007 is no longer available > > on the original distributor's (University of Washington) website, but > > there is an unofficial GitHub repository that hasn't been updated for 5 > > years either (https://github.com/uw-imap/imap). > > > > You can't also use this any more with G Suite due to authentication > > changes (https://github.com/uw-imap/imap/issues/4). > > > > There are several user-land packages that are still maintained, and > > provide superior functionality: > > > > - https://github.com/PHPMailer/PHPMailer > > - https://github.com/zetacomponents/Mail/ > > - https://github.com/symfony/mailer > > - https://github.com/laminas/laminas-mail > > > > Those alternatives are for sending e-mails. IMAP is for reading > e-mails. They are not equivalent. > Am I missing something here? >
You are right that PHPMailer, laminas and Symfony Mailer are for sending emails, but Zeta supports retrieving email over IMAP. https://packagist.org/packages/webklex/php-imap is a popular and active alternative as well. Considering the lack of updates from upstream as Derick mentioned, lack of OAuth support (which webklex/php-imap supports), and a somewhat lackluster documentation for ext-imap in php.net, I think unbundling ext-imap (along with the other extensions in the proposal) makes sense.

BohwaZ/PHP

2 years ago
> Considering the lack of updates from upstream as Derick mentioned, > lack of OAuth support (which webklex/php-imap supports), and a > somewhat lackluster documentation for ext-imap in php.net, I think > unbundling ext-imap (along with the other extensions in the proposal) > makes sense.
I don't think that OAuth support is an argument, as most providers don't support OAuth, so the imap package might still be relevant for people who are not using Google. Also, the package currently works, IMAP is a stable protocol, maybe this library is just stable? I'm not against the removal, but having to rely on user-space libraries probably means we'll lose some performance over using the C library. Also, some widely-used libraries like php-imap use it: https://packagist.org/packages/php-imap/php-imap Personally I'm using curl for IMAP, as it is more widely available, but I think removing php-imap might be a bit too early, except if keeping it does require a lot of time / effort?

Hartmut Holzgraefe

2 years ago
On 15.09.23 17:54, BohwaZ wrote:
> I'm not against the removal, but having to rely on user-space libraries > probably means we'll lose some performance over using the C library.
to quote from the message that started this thread: "Please remember, that unbundling extensions does not mean that they disappear. They will be moved to PECL with a release made." I have fond memories of ext/imap back in the days (it basically was one of the key reasons for me getting involved with PHP in the first place back then), but even without the upstream lack of maintenance situation it should probably have long moved to PECL already ...
-- hartmut

Derick Rethans

2 years ago
On Fri, 15 Sep 2023, BohwaZ wrote:
> > Considering the lack of updates from upstream as Derick mentioned, > > lack of OAuth support (which webklex/php-imap supports), and a > > somewhat lackluster documentation for ext-imap in php.net, I think > > unbundling ext-imap (along with the other extensions in the > > proposal) makes sense. > > I don't think that OAuth support is an argument, as most providers > don't support OAuth, so the imap package might still be relevant for > people who are not using Google. > > Also, the package currently works, IMAP is a stable protocol, maybe > this library is just stable? > > I'm not against the removal, but having to rely on user-space > libraries probably means we'll lose some performance over using the C > library. > > Also, some widely-used libraries like php-imap use it: > https://packagist.org/packages/php-imap/php-imap
The ext/imap extension isn't going to disappear, it is not going be unbundled as we can not guarantee the underlaying library is maintained. Not only is it no longer maintained, the original purveyors have removed any mention of it from their website. For most people, there will be little change here. On Debian for example, "php-<packagename>" is used for both bundled and PECL'ed extensions.
> Personally I'm using curl for IMAP, as it is more widely available, > but I think removing php-imap might be a bit too early, except if > keeping it does require a lot of time / effort?
Using Curl seems like a bad alternative, as it would likely have to open a connection for each action that you do. cheers, Derick

BohwaZ/PHP

2 years ago
> The ext/imap extension isn't going to disappear, it is not going be > unbundled as we can not guarantee the underlaying library is > maintained. Not only is it no longer maintained, the original > purveyors have removed any mention of it from their website. > > For most people, there will be little change here. On Debian for > example, "php-<packagename>" is used for both bundled and PECL'ed > extensions.
OK then :)
> Using Curl seems like a bad alternative, as it would likely have to > open a connection for each action that you do.
No, curl is clever and keeping the connection open as long as you don't use curl_close. This is clearly visible when enabling verbose mode: … < A004 OK Fetch completed (0.001 + 0.000 secs). * Connection #0 to host localhost left intact * Found bundle for host localhost: 0x55d0b5c60f50 [serially] * Re-using existing connection! (#0) with host localhost * Connected to localhost (127.0.0.1) port 143 (#0)
> A005 FETCH 1:* FULL
… In my experience, using curl is much faster than using ext/imap :)

Jakub Zelenka

2 years ago
On Wed, Sep 27, 2023, 14:14 Derick Rethans <derick@php.net> wrote:
> On Fri, 15 Sep 2023, BohwaZ wrote: > > > > Considering the lack of updates from upstream as Derick mentioned, > > > lack of OAuth support (which webklex/php-imap supports), and a > > > somewhat lackluster documentation for ext-imap in php.net, I think > > > unbundling ext-imap (along with the other extensions in the > > > proposal) makes sense. > > > > I don't think that OAuth support is an argument, as most providers > > don't support OAuth, so the imap package might still be relevant for > > people who are not using Google. > > > > Also, the package currently works, IMAP is a stable protocol, maybe > > this library is just stable? > > > > I'm not against the removal, but having to rely on user-space > > libraries probably means we'll lose some performance over using the C > > library. > > > > Also, some widely-used libraries like php-imap use it: > > https://packagist.org/packages/php-imap/php-imap > > The ext/imap extension isn't going to disappear, it is not going be > unbundled as we can not guarantee the underlaying library is maintained. > Not only is it no longer maintained, the original purveyors have removed > any mention of it from their website. > > For most people, there will be little change here. On Debian for > example, "php-<packagename>" is used for both bundled and PECL'ed > extensions. >
Although it's unlikely that it gets any maintainer so it will most likely stop building and won't be available in the future PHP versions. I think we should be clear about this and note that those extensions will no longer be supported by PHP core dev team which likely means their end at some point in the future unless someone steps in to maintain them. Cheers Jakub

Derick Rethans

2 years ago
On Thu, 28 Sep 2023, Jakub Zelenka wrote:
> On Wed, Sep 27, 2023, 14:14 Derick Rethans <derick@php.net> wrote: > > > The ext/imap extension isn't going to disappear, it is going be > > unbundled as we can not guarantee the underlaying library is > > maintained. Not only is it no longer maintained, the original > > purveyors have removed any mention of it from their website. > > > > For most people, there will be little change here. On Debian for > > example, "php-<packagename>" is used for both bundled and PECL'ed > > extensions. > > > > Although it's unlikely that it gets any maintainer so it will most > likely stop building and won't be available in the future PHP > versions. I think we should be clear about this and note that those > extensions will no longer be supported by PHP core dev team which > likely means their end at some point in the future unless someone > steps in to maintain them.
I have added words describing that to the RFC. cheers, Derick
-- https://derickrethans.nl | https://xdebug.org | https://dram.io Author of Xdebug. Like it? Consider supporting me: https://xdebug.org/support Host of PHP Internals News: https://phpinternals.news mastodon: @derickr@phpc.social @xdebug@phpc.social twitter: @derickr and @xdebug

Remi Collet

2 years ago
Le 13/09/2023 à 10:50, Derick Rethans a écrit :
> Hi, > > In a recent chat between the PHP Foundation developers, we discussed > unbundling several extensions. > > > ext/imap
+1
> ext/pspell
+1
> There are other replacements, ispell, and hunspell, but they don't seem > to be compatible API-wise. The PECL extension "enchant" was supposed > to be able to use with all of these, but is also no longer maintained > (last release in 2009, https://pecl.php.net/package/enchant).
Notice that enchant is part of php-src (since 5.3) and use libenchant v2 which is actively maintained. Support for v1 is still there and should probably be dropped
> ext/oci8
+1 Remi