]> source.dussan.org Git - nextcloud-server.git/commit
feat(CardDAV): Add Sabre\DAV\IMoveTarget support to OCA\DAV\CardDAV\AddressBook 37326/head
authorThomas Citharel <tcit@tcit.fr>
Tue, 21 Mar 2023 17:11:56 +0000 (18:11 +0100)
committerThomas Citharel <tcit@tcit.fr>
Tue, 16 May 2023 09:38:57 +0000 (11:38 +0200)
commit13a3ebd4cc4ca172e37e61f5dc9d91e46ae56890
tree8c1e24ef83de8eb8ad43a34482161668a321147b
parent25dd264965905316672631db95707e9051d57d69
feat(CardDAV): Add Sabre\DAV\IMoveTarget support to OCA\DAV\CardDAV\AddressBook

This allows to just UPDATE the card row instead of deleting it and reinsert it. It's very similar to https://github.com/nextcloud/server/pull/30120 for calendars.

As we need the addressbookid exposed, this introduces OCA\DAV\CardDAV\Card that extends Sabre's.

I chose specifically NOT to auto-inject LoggerInterface in Addressbook like in #30120 because the chain of DI is huge just for ONE simple call and it would break an existing dirty call (OCA\Contacts calling OCA\DAV) of ContactsManager in Contacts: https://github.com/nextcloud/contacts/pull/1722 (in SocialApiService), but this is debatable.

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
apps/dav/composer/composer/autoload_classmap.php
apps/dav/composer/composer/autoload_static.php
apps/dav/lib/CardDAV/AddressBook.php
apps/dav/lib/CardDAV/Card.php [new file with mode: 0644]
apps/dav/lib/CardDAV/CardDavBackend.php
apps/dav/lib/Events/CardMovedEvent.php [new file with mode: 0644]
apps/dav/tests/unit/CardDAV/AddressBookTest.php
build/psalm-baseline.xml