Skip to content

Fake mailbox queries fail when adding any query clauses#87

Merged
stevebauman merged 3 commits intoDirectoryTree:masterfrom
sertxudev:sertxudev/failing-test
Jun 19, 2025
Merged

Fake mailbox queries fail when adding any query clauses#87
stevebauman merged 3 commits intoDirectoryTree:masterfrom
sertxudev:sertxudev/failing-test

Conversation

@sertxudev
Copy link
Contributor

I think I've found a bug, using $folder->messages()->where('Unseen') works, but if I fake it it doesn't work.
Idk if this should work or if there's another way to test it out.

@stevebauman stevebauman added the bug Something isn't working label Jun 19, 2025
@stevebauman stevebauman changed the title Added failing test Fake mailbox queries fail when adding any query clauses Jun 19, 2025
@stevebauman stevebauman merged commit 7943c1c into DirectoryTree:master Jun 19, 2025
@stevebauman
Copy link
Member

Hi @sertxudev, thanks! This was a bug.

However to note: the fake mailbox should be populated with whatever messages that should be returned by any query you're executing. It should not perform any filtering in PHP. Otherwise, we'd have to replicate all IMAP server search functionality in PHP.

@stevebauman
Copy link
Member

Patch is out in v1.15.2.

Run composer update and you're all set!

@sertxudev
Copy link
Contributor Author

Thanks @stevebauman , no problem if there's no filtering on the fake mailbox as that should be handled by the IMAP server.

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

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants