Upgrading from SabreDAV 1.4 to 1.5
To keep the codebase clean and consistent, a few compatibility breaks were needed. They are small and simple this time though.
This document describes each. 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.
The old autoloader script is now deleted
If you are still including Sabre.autoload.php
in the lib/ directory, you must
now change this to:
include 'Sabre/autoload.php';
//or:
include 'lib/Sabre/autoload.php';
This change was made a long time ago, but the old autoloader has been kept around for backwards compatibility purposes.
The actual script is virtually identical.
Sabre_DAV_Directory
is deprecated in favor of Sabre_DAV_Collection
To make naming conventions consistent, Sabre_DAV_Directory
has been renamed
to Sabre_DAV_Collection
. The old class still exists for backwards
compatibility purposes, but it will be removed in version 1.6.
To fix this, simply change all occurrences of Sabre_DAV_Directory
in your
codebase to Sabre_DAV_Collection
.
Sabre_DAV_SimpleDirectory is deprecated in favor of Sabre_DAV_SimpleCollection
To make naming conventions consistent, Sabre_DAV_SimpleDirectory
has been
renamed to Sabre_DAV_SimpleCollection
. The old class still exists for
backwards compatibility purposes, but it will be removed in version 1.6.
To fix this, simply change all occurrences of Sabre_DAV_SimpleDirectory
in
your codebase to Sabre_DAV_SimpleCollection
.
Sabre_VObject changes to 'parameter access'
When adding new parameters to any property, the new parameter now overwrites the old one, rather than creating a new one. This makes it consistent with how properties are set on components.
What this means is that if you set the same parameter twice, you will lose the original value. To ensure that you're adding parameters rather than replacing them, change the following sample code:
$vcalendar->vevent->property['param'] = 'value1';
$vcalendar->vevent->property['param'] = 'value2';
To:
$vcalendar->vevent->property['param'] = 'value1';
$vcalendar->vevent->property->add('param', 'value2');
Sabre_CalDAV_CalendarObject no longer implements Sabre_DAV_IProperties
If you used Sabre_CalDAV_CalendarObject
directly, or did anything with
the setProperties or getProperties method on this object, this no longer
works.
The only functionality it implemented was providing a 'calendardata'
property, which can still be fetched using the get()
method.
This functionality has now migrated to Sabre_CalDAV_Plugin
.