Skip to content

Update from upstream#3

Open
Xenira wants to merge 70 commits into
IServ-GmbH:iservfrom
horde:FRAMEWORK_6_0
Open

Update from upstream#3
Xenira wants to merge 70 commits into
IServ-GmbH:iservfrom
horde:FRAMEWORK_6_0

Conversation

@Xenira

@Xenira Xenira commented Jan 29, 2025

Copy link
Copy Markdown

No description provided.

ChristophWurst and others added 30 commits December 18, 2021 15:12
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
This is deprecated in php8

Ref https://php.watch/versions/8.0/deprecate-required-param-after-optional

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
    - maintain usage of json encoding to save cache storage where possible
    - remove associative arrays in favor of numerically indexed arrays
      when serializing.
After reviewing performance on newer PHP versions it
doesn't appear that this optimization is worth it, and
could in fact perform worse.
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
…__serialize() and Cannot redeclare Horde_Imap_Client_Cache_Backend_Cache::__serialize()
Apple's iCloud IMAP server (and possibly others, although I haven't tested it) want brackets around any
FLAG command params as shown in the examples of [RFC3501](https://datatracker.ietf.org/doc/html/rfc3501#section-6.4.6])
If the brackets aren't added, the command fails with BAD Parse Error
To fix this, wrap the params of a STORE command in a Horde_Imap_Client_Data_Format_List
Otherwise, the \Delete FLAG, \Seen FLAG and possibly all other PERMFLAGs aren't added, even if the
STORE command doesn't return a BAD response.

Signed-off-by: Anna Larch <anna@nextcloud.com>
jstanden and others added 30 commits May 28, 2025 17:59
Implemented XOAUTH2 authentication for POP3
Commit 0738f13 introduced a regression by hardcoding utf8 encoding
instead of using dynamic encoding selection. This breaks compatibility
with IMAP servers not announcing UTF8=ACCEPT (like Cyrus), making it
impossible to access or create mailboxes with accented characters
(e.g., "Envoyé", "testé").

The fix restores dynamic encoding based on $this->_encoding:
- Servers with UTF8=ACCEPT use Mailbox_Utf8 (utf8)
- RFC-compliant servers use Mailbox (utf7imap)

Also adapts testBadInput to handle PHP 8.2+ behavior where
mb_convert_encoding now encodes null bytes as '&AAA-' instead of
truncating the string.

Fixes: 0738f13 (Fix Mailbox testBadInput test on PHP 8.2)
Fix mailbox encoding regression for accented folder names
Fixes PHP 8+ deprecation warning when encoding URLs with null mailbox.

Error: `rawurlencode(): Passing null to parameter #1 ($string) of type string is deprecated`

The `mailbox` property is initialized to `null` and can remain null for certain URL types. Use null coalescing operator to pass empty string instead of null to `rawurlencode()`.
fix: PHP 8+ deprecation: handle null mailbox in URL encoding
…-fetching

Added new function to allow keeping the flags original case
* chore: update metadata. Require PHP 8.1+

* fix: Passed null where string was expected

* test: Refactor test suite for PHPUnit 11-13
Release version 3.0.0-beta1

feat/modernize test suite (#40)
style: php-cs-fixer
chore(metadata): Commit metadata change due to tool mishap
Original-Author: Anna Larch <anna@nextcloud.com> (Ids int cast, ceafee1)
Original-Author: Richard Steinmetz <richard@steinmetz.cloud> (Tokenize resource leak, e72ae63)
Original-Author: Daniel Kesselberg <mail@danielkesselberg.de> (Socket read timeout exception, 33dc825)
Original-Author: Daniel Kesselberg <mail@danielkesselberg.de> (Socket vanished chunking, 69a022d)
Original-Author: Kieran Brahney <kieran.brahney@gmail.com> (Pop3 null date cast, fed98c8)
Original-Author: Kieran Brahney <kieran.brahney@gmail.com> (Exception constructor defaults, bdb0e46)
Original-Author: Daniel Kesselberg <mail@danielkesselberg.de> (Connection debug message, f66eeb6)
Port 5 tests from bytestream fork to modern PHPUnit format:
- IdsTest: testForcedIntForRange, testForcedIntForSequence,
  testAddingWithForcedIntConversion (Anna Larch, ceafee1)
- SocketTest: testVanishedCommand, testVanishedCommandChunks
  (Daniel Kesselberg, 69a022d)

Fix pre-existing SocketTest bugs: assertFalse(instanceof) should
be assertInstanceOf — passed only because unqualified class name
resolved to wrong namespace.

Harden Tokenize __destruct/__clone interaction: nullify _stream
in __clone before throwing to prevent double-close TypeError.
Release version 3.0.0-beta2

test: port bytestream tests and fix pre-existing test bugs
fix: backport community fixes from bytestream fork
chore: metadata .horde.yml add PSR dependencies directly
test: Modern implementation's test suite
feat: PSR-4 / PSR-16 / PSR-14 Modern PHP Re-Packaging of ImapClient
feat: Add connection tests
Check if fetch result is null before accessing UID.
fix(imap_client): status gaps on selected mailboxes — missing messages key and null getUid
Release version 3.0.0-RC1

Merge pull request #45 from horde/fix/undefined_array_key_messages
Handle null fetch result in Socket.php
Handle cases with no messages in IMAP client
Add fallback to STATUS query for non-cached status
When saving modified IMAP cache slices, ensure the full slice is loaded into working memory before serializing. Skip and remove stale UIDs that remain in the slicemap but have no cached data, avoiding PHP 8+
"Undefined array key" warnings in IMP.
Release version 3.0.0-RC2

fix(imap_client): load slice data before persisting cache updates
refactor(Imap_Client): deprecate Cache_Backend_Hashtable in favor of Cache_Backend_Cache
chore: Update workflow dependency
Remove a stray '2.30.6: ~' entry that was nested inside the notes
mapping of 3.0.0alpha2 due to incorrect indentation in an earlier
write. The placeholder had no real content and was treated as a
sub-key of the entry rather than a top-level version, so it
neither rendered as a release nor sorted correctly.
Release version 3.0.0

chore: update CI
docs(changelog): cleanup misaligned artifact
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.