Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove some constants and functions which have been long deprecated #34329

Merged
merged 2 commits into from
Oct 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 0 additions & 18 deletions lib/private/ContactsManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -147,24 +147,6 @@ public function unregisterAddressBook(IAddressBook $addressBook) {
unset($this->addressBooks[$addressBook->getKey()]);
}

/**
* Return a list of the user's addressbooks display names
* ! The addressBook displayName are not unique, please use getUserAddressBooks
*
* @return IAddressBook[]
* @since 6.0.0
* @deprecated 16.0.0 - Use `$this->getUserAddressBooks()` instead
*/
public function getAddressBooks() {
$this->loadAddressBooks();
$result = [];
foreach ($this->addressBooks as $addressBook) {
$result[$addressBook->getKey()] = $addressBook->getDisplayName();
}

return $result;
}

/**
* Return a list of the user's addressbooks
*
Expand Down
9 changes: 0 additions & 9 deletions lib/public/Contacts/IManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -159,15 +159,6 @@ public function unregisterAddressBook(\OCP\IAddressBook $address_book);
*/
public function register(\Closure $callable);

/**
* Return a list of the user's addressbooks display names
*
* @return array
* @since 6.0.0
* @deprecated 16.0.0 - Use `$this->getUserAddressBooks()` instead
*/
public function getAddressBooks();

/**
* Return a list of the user's addressbooks
*
Expand Down
21 changes: 0 additions & 21 deletions lib/public/Util.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,27 +56,6 @@
* @since 4.0.0
*/
class Util {
/**
* @deprecated 14.0.0 use \OCP\ILogger::DEBUG
*/
public const DEBUG = 0;
/**
* @deprecated 14.0.0 use \OCP\ILogger::INFO
*/
public const INFO = 1;
/**
* @deprecated 14.0.0 use \OCP\ILogger::WARN
*/
public const WARN = 2;
/**
* @deprecated 14.0.0 use \OCP\ILogger::ERROR
*/
public const ERROR = 3;
/**
* @deprecated 14.0.0 use \OCP\ILogger::FATAL
*/
public const FATAL = 4;

/** @var \OCP\Share\IManager */
private static $shareManager;

Expand Down
4 changes: 2 additions & 2 deletions tests/lib/ContactsManagerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -232,9 +232,9 @@ public function testAddressBookEnumeration() {

// register the address book
$this->cm->registerAddressBook($addressbook);
$all_books = $this->cm->getAddressBooks();
$all_books = $this->cm->getUserAddressBooks();

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