php-imap is deprecated
php-imap is now officially deprecated: https://www.php.net/manual/en/intro.imap.php
Warning: This extension is DEPRECATED and UNBUNDLED as of PHP 8.4.0.
What will this mean for the future of this library? Will we adapt to something else?
I have no idea. Personally I use PHP from docker, with extensions compiled and loaded by https://github.com/mlocati/docker-php-extension-installer which doesn't care if it's bundled or not, and it works fine in 8.4 too
@Slamdunk it is now also deprecated, not only unbundled. If something is broken/defective/bugged it will never be fixed. Also future compatibility with php8.5+ is not guaranteed.
Also, features like XOAUTH2 will never be integrated. I've made a PR for it with php-imap a while back which started the discussion on the future of this extension.
I already know, thank you.
I'll think about a solution if and when a problem arises.
@Slamdunk I looked up the RFC responsible for this deprecation: https://wiki.php.net/rfc/unbundle_imap_pspell_oci8 Which also mentions a possible solution:
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://packagist.org/packages/zetacomponents/mail https://packagist.org/packages/webklex/php-imap
The code repositories https://github.com/zetacomponents/Mail https://github.com/Webklex/php-imap
The last one has by far the most installs and has way more recent updates.
For those looking for a solution also check https://github.com/ddeboer/imap/issues/586
@8ctopus Thanks for your reply. So actually, if php-imap is installed as required by composer, this issue is actually a non-issue and can be closed?
Well, this is not related to this issue. Of course there is a way through pecl to keep installing the imap extension. But it still does not get any updates, bugfixes nor security fixes. It should be abandoned and not trusted upon for new implementations.
@LeoZandvliet It's fixable = you can use it in php 8.4/8.5 but the main issue that the extension has not been updated remains.
Longer term "solution" would be to make an adapter that would use another pure php package under the hood. But this is a large project...
I believe this package can act as a polyfill or a near-polyfill: https://github.com/javanile/php-imap2