Upgrading from SabreDAV 1.7 to 1.8
Only a month after the 1.7 release, 1.8 now follows.
The #1 biggest difference is that we completely moved from the old 'prefix-style' namespacing, to true PHP 5.3 namespaces.
We wanted to get this release quickly out, so we can easily maintain 1.7 and 1.8 side-by-side. They should not diverge much feature-wise.
This document helps explaining the differences, and how to upgrade.
We're now using PHP 5.3 namespaces
What does this mean? Simple: wherever you wrote
Sabre_DAV_Server before, you
Sabre\DAV\Server. This applies to every class in the SabreDAV
Check out the PHP documentation to figure out what benefits this brings.
So for most classnames this is simply a change from
\, but there are
a few exceptions.
A class named
MyPackage_Abstract is a legal class in PHP, but
MyPackage\Abstract is not, because the
abstract here is a keyword. So a few
classes have gotten new names.
As you can see we also improved consistency. Every 'backend package' now has a
BackendInterface as well as an
Changed a few constructor signatures
This is only relevant to you if you instantiated one of the following classes directly:
All three of these now have a slightly different constructor signature. They no longer need the PrincipalBackend, and receive more principal information through the constructor.
Make sure you read the updated API documentation and fix this.
Sabre\CalDAV\ISharedCalendar now has a getShares() method
ISharedCalendar now also
has a getShares() method.
With this method, it is possible for clients to find out to whom a calendar is shared with (aside from themselves). Returning something is optional, but this method must be implemented.
The other implication is that if you implement
Sabre\CalDAV\Backend\SharingSupport, the getShares() method will now also be
called by non-owners.