-
Notifications
You must be signed in to change notification settings - Fork 460
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
[BUG] after updating to PHP 8.1 it is very slow #655
Comments
Hi there, \PhpImap\Imap::open returns a resource with php 8.0. Source: This causes \PhpImap\Mailbox::initImapStreamWithRetry to retry the connection multiple times. A fix could probably be to change \PhpImap\Imap::ping to something like this:
I think this needs further investigation. |
IMAP stream can be an IMAP resource or IMAP\Connection object. See https://www.php.net/manual/en/migration81.incompatible.php for further information.
…-PHP-8.1.x #655: Add missing PHP 8.1 support
Thanks for the bug report @slewocom ! Also thanks for the hints and solution @christianasche ! I've implemented the suggested change and tested it using different PHP versions. It seems to fix the here reported issue, which I could reproduce before and it does not break on an older PHP version as far as I could see using my tests and the PHP Unit tests. I've released a new version 4.5.1 with this fix. |
Hi there,
we have updated from PHP 7.4 to PHP 8.1 and after the update the PHP Imap email import is very slow.
We have now done a time measurement and particularly concerns the getMail function.
This function took about 3 seconds for the same email with PHP 7.4 and with PHP 8.1 the function takes over 63 seconds.
The system is the same and the PHP settings are the same.
Is this problem known and is there a solution?
The text was updated successfully, but these errors were encountered: