Conversation
| } | ||
|
|
||
| try { | ||
| return $this->carddavBackend->moveCard($sourceNode->getAddressbookId(), (int)$this->addressBookInfo['id'], $sourceNode->getUri(), $sourceNode->getOwner()); |
Check notice
Code scanning / Psalm
PossiblyNullArgument
| $sourceShares = $this->getShares($sourceAddressBookId); | ||
| $targetShares = $this->getShares($targetAddressBookId); | ||
| $sourceAddressBookRow = $this->getAddressBookById($sourceAddressBookId); | ||
| $this->dispatcher->dispatchTyped(new CardMovedEvent($sourceAddressBookId, $sourceAddressBookRow, $targetAddressBookId, $targetAddressBookRow, $sourceShares, $targetShares, $object)); |
Check notice
Code scanning / Psalm
PossiblyNullArgument
7ac0d9a to
b4520e9
Compare
miaulalala
approved these changes
Apr 24, 2023
Contributor
|
/rebase |
b4520e9 to
7011490
Compare
Contributor
|
Psalm isn't happy Drone failure is contacts-menu as usual |
7011490 to
92f90dc
Compare
Member
Author
|
For the psalm issue, I guess I need to update the baseline to add this. Done. For the contacts menu test failure, this time it might be related. Does it fails elsewhere currently? |
92f90dc to
50b652d
Compare
come-nc
approved these changes
Apr 27, 2023
50b652d to
a252526
Compare
This was referenced May 3, 2023
Merged
Closed
Merged
Contributor
|
conflicts |
…ddressBook This allows to just UPDATE the card row instead of deleting it and reinsert it. It's very similar to #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: nextcloud/contacts#1722 (in SocialApiService), but this is debatable. Signed-off-by: Thomas Citharel <tcit@tcit.fr>
a252526 to
13a3ebd
Compare
Contributor
|
CI failure unrelated afaics |
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This allows to just
UPDATEthe card row instead of deleting it and reinsert it. It's very similar to #30120 for calendars. It's in a transaction as well since there are multiple operations.As we need the
addressbookidexposed, this introducesOCA\DAV\CardDAV\Cardthat extends Sabre's.I chose specifically NOT to auto-inject
LoggerInterfaceinAddressbooklike in #30120 because the chain of DI is huge just for ONE simple call and it would break an existing dirty call (OCA\ContactscallingOCA\DAV) ofContactsManagerin Contacts: nextcloud/contacts#1722 (inSocialApiService), but this is debatable (and we can prioritize making the public interfaces correct first).Checklist