PHPackages                             horde/itip - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. horde/itip

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

horde/itip
==========

iTip invitation response library

v3.0.0(3d ago)11.2k↑213.3%23LGPL-2.1-onlyPHPPHP ^8.1

Since May 21Pushed 3d ago5 watchersCompare

[ Source](https://github.com/horde/Itip)[ Packagist](https://packagist.org/packages/horde/itip)[ Docs](https://www.horde.org/libraries/Horde_Itip)[ RSS](/packages/horde-itip/feed)WikiDiscussions FRAMEWORK\_6\_0 Synced today

READMEChangelog (3)Dependencies (15)Versions (18)Used By (3)

Horde iTIP
==========

[](#horde-itip)

`horde/itip` is a pure decision engine for iTIP (RFC 5546) scheduling. It processes incoming iCalendar messages with METHOD (REQUEST, REPLY, CANCEL) and returns structured results describing what should change, without performing any I/O.

Installation
------------

[](#installation)

```
composer require horde/itip
```

Requires PHP 8.1+.

Architecture
------------

[](#architecture)

### Design Principles

[](#design-principles)

- **Pure logic, no side effects** — the engine returns decisions, not mutations
- **App applies results** — the calling application decides what to persist and when to dispatch events
- **Transport-agnostic** — email (iMIP), CalDAV, ActiveSync are listener concerns, not engine concerns
- **PSR-14 ready** — domain events are dispatched by the app layer via `horde/eventdispatcher`

### Layers

[](#layers)

LayerNamespacePurposeEngine`Horde\Itip`ItipProcessor, ItipMessage, ItipResultInterfaces`Horde\Itip`CalendarState, SchedulingPolicyChanges`Horde\Itip\Change`Proposed calendar mutations (CreateEvent, UpdateEvent, CancelEvent, etc.)Actions`Horde\Itip\Action`Required outbound actions (SendReply, SendRequest, SendCancel)Conflicts`Horde\Itip\Conflict`Problems detected (OutdatedSequence, UnknownAttendee, MissingRequiredProperty)Events`Horde\Itip\Event`PSR-14 domain events for listener dispatchGenerators`Horde\Itip\Generator`Build outgoing METHOD=REQUEST/REPLY/CANCEL VCalendar messages### Processing Flow

[](#processing-flow)

```
Incoming VCalendar with METHOD
        │
        ▼
  ItipMessage::fromCalendar()
        │
        ▼
  ItipProcessor::process()
        │  - validates required properties
        │  - checks SEQUENCE ordering
        │  - consults CalendarState for existing data
        │  - consults SchedulingPolicy for decisions
        │
        ▼
  ItipResult
        │  - changes[]    (what should be persisted)
        │  - actions[]    (what should be sent)
        │  - conflicts[]  (why processing failed)
        │
        ▼
  Application applies changes, then dispatches PSR-14 events
        │
        ▼
  Listeners handle transport (iMIP, CalDAV, logging)

```

### Boundaries

[](#boundaries)

This library is responsible for:

- Deciding what calendar mutations an iTIP message implies
- Validating SEQUENCE ordering and required properties
- Consulting application-provided policy for accept/reject decisions
- Generating outbound iTIP VCalendar messages (REQUEST, REPLY, CANCEL)
- Defining PSR-14 event types for scheduling notifications

This library is **not** responsible for:

- Parsing iCalendar byte streams. See `horde/icalendar`
- Sending email (iMIP/MIME construction), relegated to the upcoming `horde/imip` package
- Persisting data. This is handled by application layers (Kronolith, Nag)
- CalDAV schedule-outbox/inbox. See `horde/dav`
- Event dispatch itself. The app layer calls `$dispatcher->dispatch()`

### Collaboration Partners

[](#collaboration-partners)

PackageRelationship`horde/icalendar`Provides VCalendar, Vevent, Attendee, Organizer, and open enums consumed by the engine`horde/eventdispatcher`PSR-14 dispatcher used by apps to notify listeners after applying results`horde/imip` (planned)Will listen for PSR-14 events and handle MIME email construction/delivery`horde/dav`CalDAV layer that may feed iTIP messages into the engine and act on resultsKronolith / NagApplication layers that implement CalendarState and SchedulingPolicy### Upcoming: horde/imip

[](#upcoming-hordeimip)

A separate `horde/imip` package will handle the iMIP (RFC 6047) transport layer:

- Listens for `InvitationSending`, `ReplySending`, `CancellationSending` PSR-14 events
- Constructs MIME messages with `text/calendar` parts
- Delivers via configured mail transport
- Parses incoming iMIP messages from mailbox into `ItipMessage` for processing

This separation keeps `horde/itip` transport-free and testable without email infrastructure.

Upgrading
---------

[](#upgrading)

See [doc/UPGRADING.md](doc/UPGRADING.md) for migration guidance from `Horde_Itip` (PSR-0) to the modern `Horde\Itip` (PSR-4) engine.

Usage
-----

[](#usage)

### Processing an Incoming Request

[](#processing-an-incoming-request)

```
use Horde\Itip\ItipMessage;
use Horde\Itip\ItipProcessor;
use Horde\Itip\NullCalendarState;
use Horde\Itip\DefaultSchedulingPolicy;
use Horde\Itip\Change\CreateEvent;
use Horde\Itip\Change\UpdateEvent;

$processor = new ItipProcessor(
    new MyCalendarState($calendarBackend),  // implements CalendarState
    new DefaultSchedulingPolicy(),
);

$message = ItipMessage::fromCalendar($vcalendar, 'me@example.com');
$result = $processor->process($message);

if ($result->hasConflicts()) {
    // Handle conflicts (outdated sequence, missing properties, etc.)
    foreach ($result->conflicts as $conflict) { ... }
    return;
}

// Apply proposed changes
foreach ($result->changes as $change) {
    match (true) {
        $change instanceof CreateEvent => $backend->create($change->event),
        $change instanceof UpdateEvent => $backend->update($change->uid, $change->updatedEvent),
        // ...
    };
}

// Dispatch PSR-14 event for listeners (iMIP, logging, etc.)
$dispatcher->dispatch(new InvitationReceived($message, $result));
```

### Generating an Outbound Reply

[](#generating-an-outbound-reply)

```
use Horde\Icalendar\Enum\ParticipationStatus;

$replyCal = $processor->generateReply(
    $existingEvent,
    'me@example.com',
    ParticipationStatus::from('ACCEPTED'),
);

// $replyCal is a VCalendar with METHOD=REPLY, ready for transport
```

### Implementing CalendarState

[](#implementing-calendarstate)

```
use Horde\Itip\CalendarState;
use Horde\Icalendar\Calendar\Vevent;
use Horde\Icalendar\Enum\ParticipationStatus;

class KronolithCalendarState implements CalendarState
{
    public function findEventByUid(string $uid): ?Vevent { ... }
    public function getAttendeeStatus(string $uid, string $email): ?ParticipationStatus { ... }
    public function getEventSequence(string $uid): ?int { ... }
}
```

Legacy horde/itip lib/ content
------------------------------

[](#legacy-hordeitip-lib-content)

The package ships with its legacy, largely horde 5 compatible API to tie into the horde/icalendar legacy lib/ API. This older API mixes iTip and iMip concerns.

License
-------

[](#license)

LGPL-2.1 — see [LICENSE](LICENSE).

###  Health Score

60

↑

FairBetter than 98% of packages

Maintenance99

Actively maintained with recent releases

Popularity22

Limited adoption so far

Community31

Small or concentrated contributor base

Maturity80

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 71.5% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~402 days

Recently: every ~484 days

Total

12

Last Release

3d ago

Major Versions

2.1.2 → 3.0.0alpha22021-02-24

PHP version history (5 changes)2.0.6PHP &gt;=5.3.0,&lt;=6.0.0alpha1

2.1.1PHP &gt;=5.3.0,&lt;=8.0.0alpha1

3.0.0alpha2PHP ^7

v3.0.0alpha4PHP ^7.4 || ^8

v3.0.0RC1PHP ^8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/c943a083635c28520599075eaea7ede2d743b7697b76e84d6bdc37e52cc8249b?d=identicon)[yunosh](/maintainers/yunosh)

![](https://www.gravatar.com/avatar/c931cd02664859360478593450d6c473a05bb12b209dfacfc534cd13257cc7ef?d=identicon)[ralflang](/maintainers/ralflang)

![](https://www.gravatar.com/avatar/e4f6c6771993db2ed500959b42353f6cf6a2ca0406d9617f7ae680f4504faa4a?d=identicon)[horde](/maintainers/horde)

![](https://www.gravatar.com/avatar/a7767adb66b45f2f05bcd44d49bc4e67efacd9ce05b161ce2d481d5dd6af025c?d=identicon)[mrubinsk](/maintainers/mrubinsk)

![](https://www.gravatar.com/avatar/816e2b926f25f8cd2939054c7a7173011b4303d690e25ab61bf33cf8c7cf71ae?d=identicon)[tdannhauer](/maintainers/tdannhauer)

---

Top Contributors

[![yunosh](https://avatars.githubusercontent.com/u/379318?v=4)](https://github.com/yunosh "yunosh (168 commits)")[![ralflang](https://avatars.githubusercontent.com/u/646976?v=4)](https://github.com/ralflang "ralflang (26 commits)")[![wrobel](https://avatars.githubusercontent.com/u/10232?v=4)](https://github.com/wrobel "wrobel (16 commits)")[![mrubinsk](https://avatars.githubusercontent.com/u/66822?v=4)](https://github.com/mrubinsk "mrubinsk (12 commits)")[![slusarz](https://avatars.githubusercontent.com/u/381003?v=4)](https://github.com/slusarz "slusarz (7 commits)")[![TDannhauer](https://avatars.githubusercontent.com/u/6716033?v=4)](https://github.com/TDannhauer "TDannhauer (3 commits)")[![renan](https://avatars.githubusercontent.com/u/28046?v=4)](https://github.com/renan "renan (2 commits)")[![sathieu](https://avatars.githubusercontent.com/u/741106?v=4)](https://github.com/sathieu "sathieu (1 commits)")

---

Tags

invitationsitip

### Embed Badge

![Health badge](/badges/horde-itip/health.svg)

```
[![Health](https://phpackages.com/badges/horde-itip/health.svg)](https://phpackages.com/packages/horde-itip)
```

###  Alternatives

[horde/kronolith

Calendar and scheduling application

101.5k4](/packages/horde-kronolith)[horde/imap_client

IMAP client library

275.5k19](/packages/horde-imap-client)[horde/horde

Horde base application

583.0k70](/packages/horde-horde)[horde/imp

Webmail application

261.3k](/packages/horde-imp)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
