Skip to content

fix(imp): repair PHP 8.4 use imports and iTip handling for calendar r…#64

Merged
ralflang merged 2 commits into
FRAMEWORK_6_0from
fix/iTip_handling
Jun 12, 2026
Merged

fix(imp): repair PHP 8.4 use imports and iTip handling for calendar r…#64
ralflang merged 2 commits into
FRAMEWORK_6_0from
fix/iTip_handling

Conversation

@TDannhauer

Copy link
Copy Markdown
Contributor

Fix IMP iTip handling and PHP 8.4 use imports for calendar replies

Package: horde/imp
Author: Torben Dannhauer torben@dannhauer.de

Summary

Fixes webmail handling of calendar invitation replies (iTip REPLY) and a PHP 8.4 fatal error that prevented opening confirmation mails in IMP after an attendee accepts via ActiveSync.

Motivation

After an iPhone user accepts a meeting via EAS MeetingResponse, the organizer receives an iTip REPLY message. Opening that message in IMP failed with:

PHP Fatal error: Could not check compatibility between
IMP_Ajax_Imple_ItipRequest::_handle(Variables|Horde_Variables $vars) ...
because class Variables is not available

The root cause was use Horde\Util\Variables; placed inside PHPDoc blocks instead of after the opening <?php tag. IMP also did not register application/ics for the iTip mime driver, so some invitation layouts were not rendered.

Changes

PHP 8.4 compatibility

Move use Horde\Util\Variables; out of docblocks into valid PHP scope:

  • lib/Ajax/Imple/ItipRequest.php
  • lib/Ajax/Imple/PassphraseDialog.php
  • lib/Ajax/Imple/VcardImport.php
  • lib/Ajax/Imple/ImportEncryptKey.php

iTip viewer

  • lib/Mime/Viewer/Itip.php: safer From-header parsing via _senderFromHeader() for auto-update / reply handling
  • config/mime_drivers.php: register application/ics for the itip mime driver (alongside text/calendar)

Files

File Change
lib/Ajax/Imple/ItipRequest.php Fix use import placement
lib/Ajax/Imple/PassphraseDialog.php Fix use import placement
lib/Ajax/Imple/VcardImport.php Fix use import placement
lib/Ajax/Imple/ImportEncryptKey.php Fix use import placement
lib/Mime/Viewer/Itip.php From-header helper for iTip processing
config/mime_drivers.php Handle application/ics in iTip driver

Test plan

  • php -l on all modified PHP files
  • Open an iTip REPLY message in IMP webmail — no PHP fatal error
  • iTip accept/decline block visible for application/ics invitation parts
  • Accept/decline via webmail updates Kronolith attendee status
  • Run vendor/bin/phpunit test/Imp/Unit/Mime/Viewer/ItipTest.php if available

Commit message

fix(imp): repair PHP 8.4 use imports and iTip handling for calendar replies

Move Horde\Util\Variables imports out of docblocks to fix PHP 8.4
compatibility fatals in Ajax Imple classes. Register application/ics
for the iTip mime driver and improve From-header parsing in Itip viewer.

@TDannhauer TDannhauer requested a review from ralflang June 12, 2026 10:27

@ralflang ralflang left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't change order of parameter types allowd. Don't catch random throwables. Catch what you know you can handle specifically.

Comment thread lib/Ajax/Imple/ImportEncryptKey.php
…eplies

Move Horde\Util\Variables imports out of docblocks to fix PHP 8.4
compatibility fatals in Ajax Imple classes. Register application/ics
for the iTip mime driver and improve From-header parsing in Itip viewer.
@TDannhauer

Copy link
Copy Markdown
Contributor Author

i applied changes. thanks for the review

@ralflang ralflang merged commit b27885f into FRAMEWORK_6_0 Jun 12, 2026
0 of 6 checks passed
@TDannhauer TDannhauer deleted the fix/iTip_handling branch June 13, 2026 21:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants