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

PHP 8 Compatibility #481

Closed
zorro1199 opened this issue Nov 28, 2020 · 1 comment · Fixed by #483
Closed

PHP 8 Compatibility #481

zorro1199 opened this issue Nov 28, 2020 · 1 comment · Fixed by #483

Comments

@zorro1199
Copy link

Hello,

After upgrading from PHP 7.4 to PHP 8.0, the library stopped working for me and I'm not able to retrieve message numbers using getNumber() any longer.

Here's my code:

$server = new Server(EMAIL_SERVER, EMAIL_PORT, EMAIL_FLAG);
$connection = $server->authenticate(EMAIL_USERNAME, EMAIL_PASSWORD);
$mailbox = $connection->getMailbox(EMAIL_MAILBOX);
$search = new SearchExpression();
$messages = $mailbox->getMessages($search, \SORTDATE, true);
foreach ($messages as $message) {
	$messageNumber = $message->getNumber();
}

Here comes the stack trace:

Ddeboer\Imap\Exception\MessageDoesNotExistException: Message "12345" does not exist
imap_alerts (0):
imap_errors (0): in C:\XXX\ddeboer\vendor\ddeboer\imap\src\Message.php:119
Stack trace:
#0 C:\XXX\ddeboer\vendor\ddeboer\imap\src\Message\AbstractPart.php(163): Ddeboer\Imap\Message->assertMessageExists()
#1 C:\XXX\test.php(42): Ddeboer\Imap\Message\AbstractPart->getNumber()
#2 {main}

Can you please upgrade the library so it gets compatible with PHP 8?

Thank you so much in advance.

Best,

Ben

@Slamdunk
Copy link
Collaborator

Released in 1.11.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants