Upgrading from SabreDAV 1.5 to 1.6

To keep a clean codebase, and not one that's stuck in the past compatbility breaks are needed.

1.6 is leap forward in a number of areas, so as a result there are also an number of breaks.

If for some reason you cannot upgrade to 1.6, 1.5 will be maintained for as long as there's demand.

This document describes the breaks. Items in this list are ordered by how likely you are to be affected by it. Every section starts with a paragraph explaining why it would be relevant to you.

But we'll start with the good news.

New features

We just released SabreDAV 1.6.0. This version contains a bunch of new features, and a ton of "under the hood" changes. It is fair to say that this release has seen the most effort yet.

The main changes are:

A big release like this also means that there's a fair number of compatibility breaks, which may especially affect you if you customized your SabreDAV setup.

Read the full Changelog for more details.

SabreDAV now requires PHP 5.3

There are a number of features that depend on functionality that has been introduced with PHP 5.3. Among these items are the DateTime-related additions and closures.

If your system runs an older version than 5.2, you must stick with the SabreDAV 1.5.* versions. 1.5.* will still be actively maintained, but will not receive any new features.

Database changes

If you use Sabre_DAVACL_PrincipalBackend_PDO or have a 'principals' table, you must run the following script to keep it compatible:

-- MySQL
ALTER TABLE principals ADD vcardurl VARCHAR(80);

-- SQLite
ALTER TABLE principals ADD vcardurl TEXT;

This new field stores a url to a vcard associated with a specific principal. This enables the "Make this My Card" feature in OS/X's Addressbook.

If you're authenticated, you can read other people\'s FREE-BUSY information

Since 1.6 support for the 'freebusy' report is added. The default that was added was to give any use who's authenticated, access to these reports.

So although no calendars are shared, it is shared when people have events scheduled at certain times.

lib/Sabre.includes.php is deprecated

Every package now has a specific includes file:

The 'old' includes file only includes the first two items. In 1.7 this includes file will be removed.

Sabre_DAV_Exception_FileNotFound is now Sabre_DAV_Exception_NotFound

We renamed this exception because it makes more sense. The Sabre_DAV_Exception_FileNotFound exception still exists, but it extends Sabre_DAV_Exception_NotFound.

The old exception will be removed in version 1.7.

Sabre_CalDAV_Server is deprecated

This class always kind of served as an example class to implement custom server classes, and was intentionally inflexible. In 1.6 this is is marked as deprecated, and it will be removed in 1.7.

To fix this, we suggest users to simply copy the old class, and change the class name. If you don't want to do this, take a look at the "calendarserver.php" file in the examples/ directory. This file contains a full explanation of how to setup a calendar server.

Sabre_DAVACL_IPrincipalBackend has new methods

The Sabre_DAVACL_IPrincipalBackend interface now has two new methods:

Refer to the interface for documentation about these two new methods. This may also apply to you if you extend Sabre_DAVACL_PrincipalBackend_PDO.

Removed Sabre_DAV_ILockable

Before 1.6 it was possible to implement locking-functionality directly in nodes, by implementing Sabre_DAV_ILockable. This was found to be problematic and barely used, so this functionality is completely removed.

If you relied on this feature, you have no ther option but to migrate your custom implementation to a Sabre_DAV_Locks_Backend_Abstract-based class.

If you have trouble with this, head over to the mailing list, we're we'll gladly figure out a solution for your use-case.

Validation of iCalendar objects no longer happens in Sabre_CalDAV_Calendar

A syntax check of iCalendar objects used to be done in:

This functionality has been moved to Sabre_CalDAV_Plugin. The new check is a bit more strict, so this should be very helpful to reduce corruption of data.

Added method to Sabre_DAVACL_IACL interface

If you implemented Sabre_DAVACL_IACL directly, you must now also implement a getSupportedPrivilegeSet method. This method allows you to specify a custom set of priviliges per node.

To simply retain the old behaviour, you can simply return null. This will cause the default permission set to kick in.

Removed classes in CalDAV plugin

Renamed some VObject classes

The old classes still exist, and still work but will be removed in a future version.

calendars/username now contains an outbox node

The calendars/[username] collection always listed just the users' calendars. Now it also contains an 'outbox', which is currently used by iCal to send event invitations. In the future this outbox will be used more heavily to support other scheduling-related features.