App.php 1

Element Line Description
\OCP\App::addNavigationEntry() 67 Use \OC::$server->getNavigationManager()->add() instead to register a closure, this helps to speed up all requests against ownCloud
\OCP\App::setActiveNavigationEntry() 84 Use \OC::$server->getNavigationManager()->setActiveEntry() instead
\OCP\App::checkAppEnabled() 141 ownCloud core will handle disabled apps and redirects to valid URLs

Route/IRouter.php 1

Element Line Description
\OCP\Route\IRouter 37
\OCP\Route\IRouter::getRoutingFiles() 46
\OCP\Route\IRouter::getCacheKey() 53
\OCP\Route\IRouter::loadRoutes() 62
\OCP\Route\IRouter::useCollection() 72
\OCP\Route\IRouter::getCurrentCollection() 81
\OCP\Route\IRouter::create() 94
\OCP\Route\IRouter::match() 105
\OCP\Route\IRouter::getGenerator() 113
\OCP\Route\IRouter::generate() 125

JSON.php 1

Element Line Description
\OCP\JSON 41 Use a AppFramework JSONResponse instead
\OCP\JSON::encodedPrint() 48 Use a AppFramework JSONResponse instead
\OCP\JSON::checkLoggedIn() 66 Use annotation based ACLs from the AppFramework instead
\OCP\JSON::callCheck() 89 Use annotation based CSRF checks from the AppFramework instead
\OCP\JSON::success() 103 Use a AppFramework JSONResponse instead
\OCP\JSON::error() 126 Use a AppFramework JSONResponse instead
\OCP\JSON::setContentTypeHeader() 135 Use a AppFramework JSONResponse instead
\OCP\JSON::checkAppEnabled() 155 Use the AppFramework instead. It will automatically check if the app is enabled.
\OCP\JSON::checkAdminUser() 174 Use annotation based ACLs from the AppFramework instead
\OCP\JSON::encode() 184 Use a AppFramework JSONResponse instead
\OCP\JSON::checkUserExists() 193 Use a AppFramework JSONResponse instead

IAppConfig.php 1

Element Line Description
\OCP\IAppConfig::getValue() 54 use method getAppValue of \OCP\IConfig This function gets a value from the appconfig table. If the key does not exist the default value will be returned
\OCP\IAppConfig::deleteKey() 64 use method deleteAppValue of \OCP\IConfig
\OCP\IAppConfig::getKeys() 76 use method getAppKeys of \OCP\IConfig This function gets all keys of an app. Please note that the values are not returned.
\OCP\IAppConfig::setValue() 99 use method setAppValue of \OCP\IConfig Sets a value. If the key did not exist before it will be created.
\OCP\IAppConfig::deleteApp() 120 use method deleteAppValue of \OCP\IConfig Removes all keys in appconfig belonging to the app.

Security/StringUtils.php 1

Element Line Description
\OCP\Security\StringUtils::equals() 44 Use hash_equals

Security/ISecureRandom.php 1

Element Line Description
\OCP\Security\ISecureRandom::getLowStrengthGenerator() 57 Use \OC\Security\SecureRandom::generate directly or random_bytes() / random_int()
\OCP\Security\ISecureRandom::getMediumStrengthGenerator() 70 Use \OC\Security\SecureRandom::generate directly or random_bytes() / random_int()

Response.php 1

Element Line Description
\OCP\Response 45 - Use AppFramework controllers instead and modify the response object
\OCP\Response::sendFile() 112 - Use \OCP\AppFramework\Http\StreamResponse or another AppFramework controller instead

Activity/IManager.php 1

Element Line Description
\OCP\Activity\IManager::publishActivity() 86 Grab an IEvent from generateEvent() instead and use the publish() method

Files.php 1

Element Line Description
\OCP\Files::tmpFile() 98 use getTemporaryFile() of \OCP\ITempManager - \OC::$server->getTempManager()
\OCP\Files::tmpFolder() 110 use getTemporaryFolder() of \OCP\ITempManager - \OC::$server->getTempManager()

User.php 1

Element Line Description
\OCP\User::getUser() 54 Use \OC::$server->getUserSession()->getUser()->getUID()
\OCP\User::getUsers() 67 use method search() of \OCP\IUserManager - \OC::$server->getUserManager()
\OCP\User::getDisplayName() 79 fetch \OCP\IUser (has getDisplayName()) by using method get() of \OCP\IUserManager - \OC::$server->getUserManager()
\OCP\User::getDisplayNames() 92 use method searchDisplayName() of \OCP\IUserManager - \OC::$server->getUserManager()
\OCP\User::userExists() 113 use method userExists() of \OCP\IUserManager - \OC::$server->getUserManager()
\OCP\User::logout() 122 Use \OC::$server->getUserSession()->logout();
\OCP\User::checkPassword() 136 Use \OC::$server->getUserManager()->checkPassword();

ICache.php 1

Element Line Description
\OCP\ICache::hasKey() 66 Directly read from GET to prevent race conditions

AppFramework/Controller.php 1

Element Line Description
\OCP\AppFramework\Controller::params() 174 write your parameters as method arguments instead
\OCP\AppFramework\Controller::getParams() 186 use $this->request instead
\OCP\AppFramework\Controller::method() 197 use $this->request instead
\OCP\AppFramework\Controller::getUploadedFile() 209 use $this->request instead
\OCP\AppFramework\Controller::env() 221 use $this->request instead
\OCP\AppFramework\Controller::cookie() 233 use $this->request instead
\OCP\AppFramework\Controller::render() 249 return a template response instead

AppFramework/IApi.php 1

Element Line Description
\OCP\AppFramework\IApi 37
\OCP\AppFramework\IApi::getUserId() 45 Use \OC::$server->getUserSession()->getUser()->getUID()
\OCP\AppFramework\IApi::addScript() 55 include javascript and css in template files
\OCP\AppFramework\IApi::addStyle() 65 include javascript and css in template files
\OCP\AppFramework\IApi::add3rdPartyScript() 74 include javascript and css in template files shorthand for addScript for files in the 3rdparty directory
\OCP\AppFramework\IApi::add3rdPartyStyle() 83 include javascript and css in template files shorthand for addStyle for files in the 3rdparty directory
\OCP\AppFramework\IApi::isAppEnabled() 95 communication between apps should happen over built in callbacks or interfaces (check the contacts and calendar managers) Checks if an app is enabled also use \OC::$server->getAppManager()->isEnabledForUser($appName)

AppFramework/IAppContainer.php 1

Element Line Description
\OCP\AppFramework\IAppContainer::getCoreApi() 52 implements only deprecated methods
\OCP\AppFramework\IAppContainer::isLoggedIn() 72 use IUserSession->isLoggedIn()
\OCP\AppFramework\IAppContainer::isAdminUser() 79 use IGroupManager->isAdmin($userId)
\OCP\AppFramework\IAppContainer::log() 88 use the ILogger instead

ISearch.php 1

Element Line Description
\OCP\ISearch::search() 44 use searchPaged() with page and size

Config.php 1

Element Line Description
\OCP\Config 48 use methods of \OCP\IConfig
\OCP\Config::getSystemValue() 59 use method getSystemValue of \OCP\IConfig This function gets the value from config.php. If it does not exist, $default will be returned.
\OCP\Config::setSystemValue() 73 use method setSystemValue of \OCP\IConfig This function sets the value and writes the config.php. If the file can not be written, false will be returned.
\OCP\Config::deleteSystemValue() 89 use method deleteSystemValue of \OCP\IConfig This function deletes the value from config.php.
\OCP\Config::getAppValue() 104 use method getAppValue of \OCP\IConfig This function gets a value from the appconfig table. If the key does not exist the default value will be returned
\OCP\Config::setAppValue() 118 use method setAppValue of \OCP\IConfig Sets a value. If the key did not exist before it will be created.
\OCP\Config::getUserValue() 139 use method getUserValue of \OCP\IConfig This function gets a value from the preferences table. If the key does not exist the default value will be returned
\OCP\Config::setUserValue() 155 use method setUserValue of \OCP\IConfig Adds a value to the preferences. If the key did not exist before, it will be added automagically.

Constants.php 1

Element Line Description
\OCP\PERMISSION_CREATE 33 Use \OCP\Constants::PERMISSION_CREATE instead
\OCP\PERMISSION_READ 36 Use \OCP\Constants::PERMISSION_READ instead
\OCP\PERMISSION_UPDATE 39 Use \OCP\Constants::PERMISSION_UPDATE instead
\OCP\PERMISSION_DELETE 42 Use \OCP\Constants::PERMISSION_DELETE instead
\OCP\PERMISSION_SHARE 45 Use \OCP\Constants::PERMISSION_SHARE instead
\OCP\PERMISSION_ALL 48 Use \OCP\Constants::PERMISSION_ALL instead
\OCP\FILENAME_INVALID_CHARS 51 Use \OCP\Constants::FILENAME_INVALID_CHARS instead

DB.php 1

Element Line Description
\OCP\DB 46 use methods of \OCP\IDBConnection - \OC::$server->getDatabaseConnection()
\OCP\DB::prepare() 58 use prepare() of \OCP\IDBConnection - \OC::$server->getDatabaseConnection()
\OCP\DB::insertIfNotExist() 75 use insertIfNotExist() of \OCP\IDBConnection - \OC::$server->getDatabaseConnection()
\OCP\DB::insertid() 91 use lastInsertId() of \OCP\IDBConnection - \OC::$server->getDatabaseConnection()
\OCP\DB::beginTransaction() 100 use beginTransaction() of \OCP\IDBConnection - \OC::$server->getDatabaseConnection()
\OCP\DB::commit() 109 use commit() of \OCP\IDBConnection - \OC::$server->getDatabaseConnection()
\OCP\DB::rollback() 118 use rollback() of \OCP\IDBConnection - \OC::$server->getDatabaseConnection()
\OCP\DB::isError() 129 Doctrine returns false on error (and throws an exception)
\OCP\DB::getErrorMessage() 141 use getError() of \OCP\IDBConnection - \OC::$server->getDatabaseConnection()

IHelper.php 1

Element Line Description
\OCP\IHelper 39
\OCP\IHelper::getUrlContent() 48 Use \OCP\IServerContainer::getHTTPClientService

Files/Cache/ICache.php 1

Element Line Description
\OCP\Files\Cache\ICache::search() 201 due to lack of pagination, not all backends might implement this
\OCP\Files\Cache\ICache::searchByMime() 212 due to lack of pagination, not all backends might implement this
\OCP\Files\Cache\ICache::searchByTag() 225 due to lack of pagination, not all backends might implement this

Files/Storage.php 1

Element Line Description
\OCP\Files\Storage 48 use \OCP\Files\Storage\IStorage instead

Files/External/IStoragesBackendService.php 1

Element Line Description
\OCP\Files\External\IStoragesBackendService::registerBackend() 71 use registerBackendProvider()
\OCP\Files\External\IStoragesBackendService::registerBackends() 77 use registerBackendProvider()
\OCP\Files\External\IStoragesBackendService::registerAuthMechanism() 85 use registerAuthMechanismProvider()
\OCP\Files\External\IStoragesBackendService::registerAuthMechanisms() 91 use registerAuthMechanismProvider()

BackgroundJob/IJobList.php 1

Element Line Description
\OCP\BackgroundJob\IJobList::getAll() 70 - This method is dangerous since it can cause load and memory problems when creating too many instances.
\OCP\BackgroundJob\IJobList::getLastJob() 112 - The functionality behind the value is deprecated, it only tells you which job finished last, but since we now allow multiple executors to run in parallel, it's not used to calculate the next job.

BackgroundJob.php 1

Element Line Description
\OCP\BackgroundJob::registerJob() 89 Use \OC::$server->getJobList()->add() instead
\OCP\BackgroundJob::addRegularTask() 102 creates a regular task
\OCP\BackgroundJob::allRegularTasks() 117 gets all regular tasks
\OCP\BackgroundJob::findQueuedTask() 128 Gets one queued task
\OCP\BackgroundJob::allQueuedTasks() 139 Gets all queued tasks
\OCP\BackgroundJob::queuedTaskWhereAppIs() 150 Gets all queued tasks of a specific app
\OCP\BackgroundJob::addQueuedTask() 164 queues a task
\OCP\BackgroundJob::deleteQueuedTask() 178 deletes a queued task

Util.php 1

Element Line Description
\OCP\Util::sendMail() 114 Use \OCP\Mail\IMailer instead
\OCP\Util::logException() 168 use logException of \OCP\ILogger
\OCP\Util::isSharingDisabledForUser() 179 Use \OC::$server->getShareManager()->sharingDisabledForUser
\OCP\Util::formatDate() 256 Use \OC::$server->query('DateTimeFormatter') instead
\OCP\Util::encryptedFiles() 267 No longer required
\OCP\Util::linkTo() 334 Use \OC::$server->getURLGenerator()->linkTo($app, $file, $args)
\OCP\Util::getServerHost() 344 Use \OCP\IRequest::getServerHost
\OCP\Util::getServerProtocol() 401 Use \OCP\IRequest::getServerProtocol
\OCP\Util::getRequestUri() 411 Use \OCP\IRequest::getRequestUri
\OCP\Util::getScriptName() 421 Use \OCP\IRequest::getScriptName
\OCP\Util::imagePath() 433 Use \OC::$server->getURLGenerator()->imagePath($app, $image)
\OCP\Util::callCheck() 515 Use annotations based on the app framework.
\OCP\Util::mb_substr_replace() 575 Use substr_replace() instead.
\OCP\Util::mb_str_replace() 591 Use str_replace() instead.
\OCP\Util::isValidFileName() 647 use \OC\Files\View::verifyPath()
\OCP\Util::generateRandomBytes() 658 Use \OC::$server->getSecureRandom()->getMediumStrengthGenerator()->generate($length); instead

Contacts.php 1

Element Line Description
\OCP\Contacts 52 use methods of \OCP\Contacts\IManager - \OC::$server->getContactsManager();
\OCP\Contacts::search() 98 use search() of \OCP\Contacts\IManager - \OC::$server->getContactsManager();
\OCP\Contacts::delete() 112 use delete() of \OCP\Contacts\IManager - \OC::$server->getContactsManager();
\OCP\Contacts::createOrUpdate() 127 use createOrUpdate() of \OCP\Contacts\IManager - \OC::$server->getContactsManager();
\OCP\Contacts::isEnabled() 139 use isEnabled() of \OCP\Contacts\IManager - \OC::$server->getContactsManager();
\OCP\Contacts::registerAddressBook() 149 use registerAddressBook() of \OCP\Contacts\IManager - \OC::$server->getContactsManager();
\OCP\Contacts::unregisterAddressBook() 159 use unregisterAddressBook() of \OCP\Contacts\IManager - \OC::$server->getContactsManager();
\OCP\Contacts::getAddressBooks() 169 use getAddressBooks() of \OCP\Contacts\IManager - \OC::$server->getContactsManager();
\OCP\Contacts::clear() 179 use clear() of \OCP\Contacts\IManager - \OC::$server->getContactsManager();

Template.php 1

Element Line Description
\OCP\image_path() 51 Use \OCP\Template::image_path() instead
\OCP\mimetype_icon() 62 Use \OCP\Template::mimetype_icon() instead
\OCP\preview_icon() 72 Use \OCP\Template::preview_icon() instead
\OCP\publicPreview_icon() 84 Use \OCP\Template::publicPreview_icon() instead
\OCP\human_file_size() 95 Use \OCP\Template::human_file_size() instead
\OCP\relative_modified_date() 108 Use \OCP\Template::relative_modified_date() instead
\OCP\simple_file_size() 119 Use \OCP\Template::human_file_size() instead
\OCP\html_select_options() 132 Use \OCP\Template::html_select_options() instead

IServerContainer.php 1

Element Line Description
\OCP\IServerContainer::getDb() 198 use getDatabaseConnection, will be removed in ownCloud 10
\OCP\IServerContainer::getHTTPHelper() 360 Use \OCP\Http\Client\IClientService