Skip to content

Commit a4c2aee

Browse files
authored
Merge pull request #34329 from nextcloud/fix/cleanup-long-time-deprecated-stuff
Remove some constants and functions which have been long deprecated
2 parents f317025 + 4123eee commit a4c2aee

File tree

4 files changed

+2
-50
lines changed

4 files changed

+2
-50
lines changed

lib/private/ContactsManager.php

-18
Original file line numberDiff line numberDiff line change
@@ -147,24 +147,6 @@ public function unregisterAddressBook(IAddressBook $addressBook) {
147147
unset($this->addressBooks[$addressBook->getKey()]);
148148
}
149149

150-
/**
151-
* Return a list of the user's addressbooks display names
152-
* ! The addressBook displayName are not unique, please use getUserAddressBooks
153-
*
154-
* @return IAddressBook[]
155-
* @since 6.0.0
156-
* @deprecated 16.0.0 - Use `$this->getUserAddressBooks()` instead
157-
*/
158-
public function getAddressBooks() {
159-
$this->loadAddressBooks();
160-
$result = [];
161-
foreach ($this->addressBooks as $addressBook) {
162-
$result[$addressBook->getKey()] = $addressBook->getDisplayName();
163-
}
164-
165-
return $result;
166-
}
167-
168150
/**
169151
* Return a list of the user's addressbooks
170152
*

lib/public/Contacts/IManager.php

-9
Original file line numberDiff line numberDiff line change
@@ -159,15 +159,6 @@ public function unregisterAddressBook(\OCP\IAddressBook $address_book);
159159
*/
160160
public function register(\Closure $callable);
161161

162-
/**
163-
* Return a list of the user's addressbooks display names
164-
*
165-
* @return array
166-
* @since 6.0.0
167-
* @deprecated 16.0.0 - Use `$this->getUserAddressBooks()` instead
168-
*/
169-
public function getAddressBooks();
170-
171162
/**
172163
* Return a list of the user's addressbooks
173164
*

lib/public/Util.php

-21
Original file line numberDiff line numberDiff line change
@@ -56,27 +56,6 @@
5656
* @since 4.0.0
5757
*/
5858
class Util {
59-
/**
60-
* @deprecated 14.0.0 use \OCP\ILogger::DEBUG
61-
*/
62-
public const DEBUG = 0;
63-
/**
64-
* @deprecated 14.0.0 use \OCP\ILogger::INFO
65-
*/
66-
public const INFO = 1;
67-
/**
68-
* @deprecated 14.0.0 use \OCP\ILogger::WARN
69-
*/
70-
public const WARN = 2;
71-
/**
72-
* @deprecated 14.0.0 use \OCP\ILogger::ERROR
73-
*/
74-
public const ERROR = 3;
75-
/**
76-
* @deprecated 14.0.0 use \OCP\ILogger::FATAL
77-
*/
78-
public const FATAL = 4;
79-
8059
/** @var \OCP\Share\IManager */
8160
private static $shareManager;
8261

tests/lib/ContactsManagerTest.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -232,9 +232,9 @@ public function testAddressBookEnumeration() {
232232

233233
// register the address book
234234
$this->cm->registerAddressBook($addressbook);
235-
$all_books = $this->cm->getAddressBooks();
235+
$all_books = $this->cm->getUserAddressBooks();
236236

237237
$this->assertEquals(1, count($all_books));
238-
$this->assertEquals('A very simple Addressbook', $all_books['SIMPLE_ADDRESS_BOOK']);
238+
$this->assertEquals($addressbook, $all_books['SIMPLE_ADDRESS_BOOK']);
239239
}
240240
}

0 commit comments

Comments
 (0)