refactor(activesync): centralize client quirks in Device::hasQuirk() - #89
Merged
Merged
Conversation
Replace the hard-coded WindowsOutlook15 deviceType comparison in State_Base::getChanges() with a new QUIRK_REASSIGNS_UID_ON_MOVE constant resolved through Horde_ActiveSync_Device::hasQuirk(), so all client-conditional branches live in one place. Document the quirk policy in the Device class docblock: hard client branches go through hasQuirk(); universally safe workarounds stay client-agnostic.
🔍 CI ResultsOverall: ❌ 12/12 lanes failed TL;DR: ❌ Quality issues: PHPStan: 243 unique errors in 11 lanes; PHP-CS-Fixer: 25 files. Summary by PHP Version
Quality Metrics
❌ Failed Lanesphp8.0-dev
php8.0-stable
php8.1-dev
php8.1-stable
php8.2-dev
php8.2-stable
php8.3-dev
php8.3-stable
php8.4-dev
php8.4-stable
php8.5-dev
php8.5-stable
CI powered by horde-components • View full results |
ralflang
approved these changes
Jul 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Horde_ActiveSync_Device::hasQuirk()mechanism.Deviceclass docblock.Motivation
Client workarounds should be discoverable and testable in one place.
Device::hasQuirk()withQUIRK_*constants already exists (picturetag handling, TNEF support), but the Outlook 2013 MOVEITEMS workaround
in
State_Base::getChanges()still compared the deviceType stringinline.
Changes
QUIRK_REASSIGNS_UID_ON_MOVEconstant +hasQuirk()case(Outlook 2013 reassigns the existing email the new UID on MOVEITEMS
instead of duplicating it, so the ADD must not be sent).
State_Base::getChanges()uses the quirk instead of the hard-codedWindowsOutlook15comparison; behavior is unchanged.Test plan
testReassignsUidOnMoveQuirk(OL2013 true, iOS false)