Nextcloud PHP API (master)

Deprecated

Table of Contents

lib/public/Accounts/IAccount.php
lib/public/Accounts/IAccountManager.php
lib/public/App/ManagerEvent.php
lib/public/AppFramework/App.php
lib/public/AppFramework/Db/Entity.php
lib/public/AppFramework/Http/Attribute/IgnoreOpenAPI.php
lib/public/AppFramework/Http/EmptyContentSecurityPolicy.php
lib/public/AppFramework/Http/RedirectToDefaultAppResponse.php
lib/public/AppFramework/Http/StrictContentSecurityPolicy.php
lib/public/AppFramework/Http/StrictEvalContentSecurityPolicy.php
lib/public/AppFramework/Http/StrictInlineContentSecurityPolicy.php
lib/public/AppFramework/IAppContainer.php
lib/public/AppFramework/QueryException.php
lib/public/AppFramework/Utility/IControllerMethodReflector.php
lib/public/Authentication/TwoFactorAuth/IRegistry.php
lib/public/Authentication/TwoFactorAuth/RegistryEvent.php
lib/public/Authentication/TwoFactorAuth/TwoFactorProviderDisabled.php
lib/public/Authentication/TwoFactorAuth/TwoFactorProviderForUserDisabled.php
lib/public/Authentication/TwoFactorAuth/TwoFactorProviderForUserEnabled.php
lib/public/BackgroundJob/IJob.php
lib/public/BackgroundJob/IJobList.php
lib/public/BackgroundJob/QueuedJob.php
lib/public/BackgroundJob/TimedJob.php
lib/public/Calendar/IManager.php
lib/public/Calendar/Resource/IManager.php
lib/public/Calendar/Room/IManager.php
lib/public/Collaboration/AutoComplete/AutoCompleteEvent.php
lib/public/Collaboration/Resources/IManager.php
lib/public/Comments/CommentsEntityEvent.php
lib/public/Comments/CommentsEvent.php
lib/public/Console/ConsoleEvent.php
lib/public/Dashboard/RegisterWidgetEvent.php
lib/public/DB/IPreparedStatement.php
lib/public/DB/IResult.php
lib/public/DB/QueryBuilder/IQueryBuilder.php
lib/public/Defaults.php
lib/public/EventDispatcher/GenericEvent.php
lib/public/EventDispatcher/IEventDispatcher.php
lib/public/Files/Cache/CacheInsertEvent.php
lib/public/Files/Cache/CacheUpdateEvent.php
lib/public/Files/Cache/ICache.php
lib/public/Files/Storage.php
lib/public/Files/Template/TemplateFileCreator.php
lib/public/Files.php
lib/public/Group/Backend/ABackend.php
lib/public/Group/Events/BeforeUserRemovedEvent.php
lib/public/GroupInterface.php
lib/public/ICache.php
lib/public/IContainer.php
lib/public/IDBConnection.php
lib/public/IInitialStateService.php
lib/public/ILogger.php
lib/public/IPreview.php
lib/public/ISearch.php
lib/public/IServerContainer.php
lib/public/IUser.php
lib/public/Log/ILogFactory.php
lib/public/Notification/IManager.php
lib/public/Preview/BeforePreviewFetchedEvent.php
lib/public/Preview/IProvider.php
lib/public/Remote/Api/IApiCollection.php
lib/public/Remote/Api/IApiFactory.php
lib/public/Remote/Api/ICapabilitiesApi.php
lib/public/Remote/Api/IUserApi.php
lib/public/Remote/ICredentials.php
lib/public/Remote/IInstance.php
lib/public/Remote/IInstanceFactory.php
lib/public/Remote/IUser.php
lib/public/Route/IRouter.php
lib/public/Search/PagedProvider.php
lib/public/Search/Provider.php
lib/public/Search/Result.php
lib/public/Security/Bruteforce/IThrottler.php
lib/public/Security/IContentSecurityPolicyManager.php
lib/public/Share.php
lib/public/Support/CrashReport/IRegistry.php
lib/public/Support/Subscription/IRegistry.php
lib/public/SystemTag/ManagerEvent.php
lib/public/SystemTag/MapperEvent.php
lib/public/SystemTag/SystemTagsEntityEvent.php
lib/public/User/Backend/ABackend.php
lib/public/UserInterface.php
lib/public/Util.php
lib/public/WorkflowEngine/IRuleMatcher.php

IAccount.php

Line Element Reason
71 IAccount::getProperties()

use getAllProperties()

IAccountManager.php

Line Element Reason
77 IAccountManager::VISIBILITY_PRIVATE
84 IAccountManager::VISIBILITY_CONTACTS_ONLY
91 IAccountManager::VISIBILITY_PUBLIC

ManagerEvent.php

Line Element Reason
37 ManagerEvent::EVENT_APP_ENABLE
42 ManagerEvent::EVENT_APP_ENABLE_FOR_GROUPS
47 ManagerEvent::EVENT_APP_DISABLE
53 ManagerEvent::EVENT_APP_UPDATE

App.php

Line Element Reason
142 App::registerRoutes()

Just return an array from your routes.php

Entity.php

Line Element Reason
274 Entity::slugify()

IgnoreOpenAPI.php

Line Element Reason
36 IgnoreOpenAPI

Use OpenAPI with OpenAPI::SCOPE_IGNORE instead: #[OpenAPI(scope: OpenAPI::SCOPE_IGNORE)]

EmptyContentSecurityPolicy.php

Line Element Reason
130 EmptyContentSecurityPolicy::allowEvalScript()

Eval should not be used anymore. Please update your scripts. This function will stop functioning in a future version of Nextcloud.

352 EmptyContentSecurityPolicy::addAllowedChildSrcDomain()

use addAllowedWorkerSrcDomains or addAllowedFrameDomain

365 EmptyContentSecurityPolicy::disallowChildSrcDomain()

use the WorkerSrcDomains or FrameDomain

RedirectToDefaultAppResponse.php

Line Element Reason
42 RedirectToDefaultAppResponse

Use RedirectResponse() with IURLGenerator::linkToDefaultPageUrl() instead

51 RedirectToDefaultAppResponse::__construct()

Use RedirectResponse() with IURLGenerator::linkToDefaultPageUrl() instead

StrictContentSecurityPolicy.php

Line Element Reason
44 StrictContentSecurityPolicy

StrictEvalContentSecurityPolicy.php

Line Element Reason
44 StrictEvalContentSecurityPolicy

StrictInlineContentSecurityPolicy.php

Line Element Reason
44 StrictInlineContentSecurityPolicy

IAppContainer.php

Line Element Reason
44 IAppContainer
51 IAppContainer::getAppName()
58 IAppContainer::getServer()
66 IAppContainer::registerMiddleWare()

use \OCP\AppFramework\Bootstrap\IRegistrationContext::registerMiddleware

75 IAppContainer::registerCapability()

use \OCP\AppFramework\Bootstrap\IRegistrationContext::registerCapability

QueryException.php

Line Element Reason
40 QueryException

catch \Psr\Container\ContainerExceptionInterface

IControllerMethodReflector.php

Line Element Reason
39 IControllerMethodReflector

will be obsolete with native attributes in PHP8

47 IControllerMethodReflector::reflect()

Reflect should not be called multiple times and only be used internally. This will be removed in Nextcloud 18

59 IControllerMethodReflector::getType()

this method is only used internally

66 IControllerMethodReflector::getParameters()

this method is only used internally

77 IControllerMethodReflector::hasAnnotation()

will be obsolete with native attributes in PHP8

IRegistry.php

Line Element Reason
44 IRegistry::EVENT_PROVIDER_ENABLED
49 IRegistry::EVENT_PROVIDER_DISABLED

RegistryEvent.php

Line Element Reason
38 RegistryEvent

Use TwoFactorProviderForUserRegistered or TwoFactorProviderForUserUnregistered instead

TwoFactorProviderDisabled.php

Line Element Reason
35 TwoFactorProviderDisabled

Use \OCP\Authentication\TwoFactorAuth\TwoFactorProviderUserDeleted instead

TwoFactorProviderForUserDisabled.php

Line Element Reason
36 TwoFactorProviderForUserDisabled

Use \OCP\Authentication\TwoFactorAuth\TwoFactorProviderChallengeFailed instead

TwoFactorProviderForUserEnabled.php

Line Element Reason
36 TwoFactorProviderForUserEnabled

Use \OCP\Authentication\TwoFactorAuth\TwoFactorProviderChallengePassed instead

IJob.php

Line Element Reason
58 IJob::execute()

since 25.0.0 Use start() instead. This method will be removed with the ILogger interface

IJobList.php

Line Element Reason
99 IJobList::getJobs()

Use getJobsIterator instead to avoid duplicated job objects

QueuedJob.php

Line Element Reason
46 QueuedJob::execute()

since 25.0.0 Use start() instead. This method will be removed with the ILogger interface

TimedJob.php

Line Element Reason
91 TimedJob::execute()

since 25.0.0 Use start() instead

IManager.php

Line Element Reason
75 IManager::search()

use \OCP\Calendar\IManager::searchForPrincipal

84 IManager::isEnabled()
94 IManager::registerCalendar()

use \OCP\AppFramework\Bootstrap\IRegistrationContext::registerCalendarProvider

104 IManager::unregisterCalendar()
115 IManager::register()

use \OCP\AppFramework\Bootstrap\IRegistrationContext::registerCalendarProvider

122 IManager::getCalendars()

use \OCP\Calendar\IManager::getCalendarsForPrincipal

131 IManager::clear()

IManager.php

Line Element Reason
32 IManager
41 IManager::registerBackend()

use \OCP\AppFramework\Bootstrap\IRegistrationContext::registerCalendarResourceBackend

51 IManager::unregisterBackend()
58 IManager::getBackends()
66 IManager::getBackend()
74 IManager::clear()

IManager.php

Line Element Reason
32 IManager
41 IManager::registerBackend()

use \OC\AppFramework\Bootstrap::registerCalendarRoomBackend

51 IManager::unregisterBackend()
58 IManager::getBackends()
66 IManager::getBackend()
74 IManager::clear()

AutoCompleteEvent.php

Line Element Reason
34 AutoCompleteEvent

Use AutoCompleteFilterEvent instead

IManager.php

Line Element Reason
125 IManager::registerResourceProvider()

Use IProviderManager::registerResourceProvider instead

CommentsEntityEvent.php

Line Element Reason
38 CommentsEntityEvent::EVENT_ENTITY
  • Listen to the typed event instead.

CommentsEvent.php

Line Element Reason
37 CommentsEvent::EVENT_ADD
42 CommentsEvent::EVENT_PRE_UPDATE
47 CommentsEvent::EVENT_UPDATE
52 CommentsEvent::EVENT_DELETE

ConsoleEvent.php

Line Element Reason
37 ConsoleEvent::EVENT_RUN

RegisterWidgetEvent.php

Line Element Reason
41 RegisterWidgetEvent

IPreparedStatement.php

Line Element Reason
51 IPreparedStatement::closeCursor()

use \OCP\DB\IResult::closeCursor on the \OCP\DB\IResult returned by \OCP\IDBConnection::prepare

61 IPreparedStatement::fetch()

use \OCP\DB\IResult::fetch on the \OCP\DB\IResult returned by \OCP\IDBConnection::prepare

71 IPreparedStatement::fetchAll()

use \OCP\DB\IResult::fetchAll on the \OCP\DB\IResult returned by \OCP\IDBConnection::prepare

79 IPreparedStatement::fetchColumn()

use \OCP\DB\IResult::fetchColumn on the \OCP\DB\IResult returned by \OCP\IDBConnection::prepare

87 IPreparedStatement::fetchOne()

use \OCP\DB\IResult::fetchOne on the \OCP\DB\IResult returned by \OCP\IDBConnection::prepare

134 IPreparedStatement::rowCount()

use \OCP\DB\IResult::rowCount on the \OCP\DB\IResult returned by \OCP\IDBConnection::prepare

IResult.php

Line Element Reason
78 IResult::fetchColumn()

use \OCP\DB\IResult::fetchOne

IQueryBuilder.php

Line Element Reason
174 IQueryBuilder::execute()

Use executeQuery or executeStatement

Defaults.php

Line Element Reason
139 Defaults::getHTMLName()

GenericEvent.php

Line Element Reason
45 GenericEvent

use \OCP\EventDispatcher\Event

58 GenericEvent::__construct()
70 GenericEvent::getSubject()
81 GenericEvent::getArgument()
95 GenericEvent::setArgument()
106 GenericEvent::getArguments()
116 GenericEvent::setArguments()
127 GenericEvent::hasArgument()
138 GenericEvent::getIterator()
149 GenericEvent::offsetExists()
161 GenericEvent::offsetGet()
173 GenericEvent::offsetSet()
184 GenericEvent::offsetUnset()
47 GenericEvent::$subject
50 GenericEvent::$arguments

IEventDispatcher.php

Line Element Reason
82 IEventDispatcher::dispatch()

use \OCP\EventDispatcher\IEventDispatcher::dispatchTyped

CacheInsertEvent.php

Line Element Reason
34 CacheInsertEvent

use CacheEntryInsertedEvent instead

CacheUpdateEvent.php

Line Element Reason
34 CacheUpdateEvent

use CacheEntryUpdatedEvent instead

ICache.php

Line Element Reason
216 ICache::search()

due to lack of pagination, not all backends might implement this

227 ICache::searchByMime()

due to lack of pagination, not all backends might implement this

Storage.php

Line Element Reason
49 Storage

use \OCP\Files\Storage\IStorage instead

TemplateFileCreator.php

Line Element Reason
47 TemplateFileCreator::$actionLabel

Files.php

Line Element Reason
44 Files
51 Files::rmdirr()
63 Files::getMimeType()
74 Files::searchByMime()
86 Files::streamCopy()
99 Files::buildNotExistingFileName()

use getNonExistingName of the OCP\Files\Folder object

111 Files::getStorage()

use IAppData instead

ABackend.php

Line Element Reason
42 ABackend::implementsActions()

BeforeUserRemovedEvent.php

Line Element Reason
40 BeforeUserRemovedEvent
  • it can't be guaranteed that this event is triggered in all case (e.g. for LDAP users this isn't possible) - if there is a valid use case please reach out in the issue tracker at https://github.com/nextcloud/server/issues
51 BeforeUserRemovedEvent::__construct()
62 BeforeUserRemovedEvent::getGroup()
71 BeforeUserRemovedEvent::getUser()

GroupInterface.php

Line Element Reason
121 GroupInterface::usersInGroup()

Use searchInGroup instead, for performance reasons

ICache.php

Line Element Reason
61 ICache::hasKey()

Directly read from GET to prevent race conditions

IContainer.php

Line Element Reason
46 IContainer

use \Psr\Container\ContainerInterface

61 IContainer::resolve()

use \Psr\Container\ContainerInterface::get

79 IContainer::query()

use \Psr\Container\ContainerInterface::get

90 IContainer::registerParameter()

use \OCP\AppFramework\Bootstrap\IRegistrationContext::registerParameter

106 IContainer::registerService()

use \OCP\AppFramework\Bootstrap\IRegistrationContext::registerService

117 IContainer::registerAlias()

use \OCP\AppFramework\Bootstrap\IRegistrationContext::registerServiceAlias

IDBConnection.php

Line Element Reason
115 IDBConnection::executeUpdate()

use executeStatement

142 IDBConnection::lastInsertId()

use \OCP\DB\QueryBuilder\IQueryBuilder::getLastInsertId

159 IDBConnection::insertIfNotExist()
  • use unique index and "try { $db->insert() } catch (UniqueConstraintViolationException $e) }" instead, because it is more reliable and does not have the risk for deadlocks - see https://github.com/nextcloud/server/pull/12371
245 IDBConnection::getError()

doesn't return anything meaningful

254 IDBConnection::errorCode()

doesn't return anything anymore

263 IDBConnection::errorInfo()

doesn't return anything anymore

IInitialStateService.php

Line Element Reason
36 IInitialStateService

Use OCP\AppFramework\Services\IInitialState or OCP\AppFramework\Services\InitialStateProvider

51 IInitialStateService::provideInitialState()

Use OCP\AppFramework\Services\IInitialState or OCP\AppFramework\Services\InitialStateProvider

69 IInitialStateService::provideLazyInitialState()

Use OCP\AppFramework\Services\IInitialState or OCP\AppFramework\Services\InitialStateProvider

ILogger.php

Line Element Reason
42 ILogger

use the PSR-3 logger \Psr\Log\LoggerInterface

78 ILogger::emergency()

use \Psr\Log\LoggerInterface::emergency

89 ILogger::alert()

use \Psr\Log\LoggerInterface::alert

100 ILogger::critical()

use \Psr\Log\LoggerInterface::critical

112 ILogger::error()

use \Psr\Log\LoggerInterface::error

123 ILogger::warning()

use \Psr\Log\LoggerInterface::warning

134 ILogger::notice()

use \Psr\Log\LoggerInterface::notice

145 ILogger::info()

use \Psr\Log\LoggerInterface::info

156 ILogger::debug()

use \Psr\Log\LoggerInterface::debug

168 ILogger::log()

use \Psr\Log\LoggerInterface::log

187 ILogger::logException()

use the exception entry in the context of any method in \Psr\Log\LoggerInterface

47 ILogger::DEBUG
52 ILogger::INFO
57 ILogger::WARN
62 ILogger::ERROR
67 ILogger::FATAL

IPreview.php

Line Element Reason
58 IPreview::registerProvider()

Register your provider via the IRegistrationContext when booting the app

ISearch.php

Line Element Reason
33 ISearch
44 ISearch::searchPaged()
53 ISearch::registerProvider()
61 ISearch::removeProvider()
68 ISearch::clearProviders()

IServerContainer.php

Line Element Reason
61 IServerContainer
70 IServerContainer::getCalendarManager()

have it injected or fetch it through \Psr\Container\ContainerInterface::get

80 IServerContainer::getCalendarResourceBackendManager()

have it injected or fetch it through \Psr\Container\ContainerInterface::get

90 IServerContainer::getCalendarRoomBackendManager()

have it injected or fetch it through \Psr\Container\ContainerInterface::get

100 IServerContainer::getContactsManager()

have it injected or fetch it through \Psr\Container\ContainerInterface::get

111 IServerContainer::getRequest()

have it injected or fetch it through \Psr\Container\ContainerInterface::get

120 IServerContainer::getPreviewManager()

have it injected or fetch it through \Psr\Container\ContainerInterface::get

130 IServerContainer::getTagManager()

have it injected or fetch it through \Psr\Container\ContainerInterface::get

139 IServerContainer::getRootFolder()

have it injected or fetch it through \Psr\Container\ContainerInterface::get

150 IServerContainer::getUserFolder()

have it injected or fetch it through \Psr\Container\ContainerInterface::get

159 IServerContainer::getUserManager()

have it injected or fetch it through \Psr\Container\ContainerInterface::get

168 IServerContainer::getGroupManager()

have it injected or fetch it through \Psr\Container\ContainerInterface::get

177 IServerContainer::getUserSession()

have it injected or fetch it through \Psr\Container\ContainerInterface::get

186 IServerContainer::getNavigationManager()

have it injected or fetch it through \Psr\Container\ContainerInterface::get

195 IServerContainer::getConfig()

have it injected or fetch it through \Psr\Container\ContainerInterface::get

204 IServerContainer::getCrypto()

have it injected or fetch it through \Psr\Container\ContainerInterface::get

213 IServerContainer::getHasher()

have it injected or fetch it through \Psr\Container\ContainerInterface::get

222 IServerContainer::getSecureRandom()

have it injected or fetch it through \Psr\Container\ContainerInterface::get

231 IServerContainer::getCredentialsManager()

have it injected or fetch it through \Psr\Container\ContainerInterface::get

240 IServerContainer::getAppConfig()

have it injected or fetch it through \Psr\Container\ContainerInterface::get

247 IServerContainer::getL10NFactory()

have it injected or fetch it through \Psr\Container\ContainerInterface::get

257 IServerContainer::getL10N()

have it injected or fetch it through \Psr\Container\ContainerInterface::get

264 IServerContainer::getEncryptionManager()

have it injected or fetch it through \Psr\Container\ContainerInterface::get

271 IServerContainer::getEncryptionFilesHelper()

have it injected or fetch it through \Psr\Container\ContainerInterface::get

278 IServerContainer::getEncryptionKeyStorage()

have it injected or fetch it through \Psr\Container\ContainerInterface::get

287 IServerContainer::getURLGenerator()

have it injected or fetch it through \Psr\Container\ContainerInterface::get

296 IServerContainer::getCache()

have it injected or fetch it through \Psr\Container\ContainerInterface::get

305 IServerContainer::getMemCacheFactory()

have it injected or fetch it through \Psr\Container\ContainerInterface::get

314 IServerContainer::getSession()

have it injected or fetch it through \Psr\Container\ContainerInterface::get

323 IServerContainer::getActivityManager()

have it injected or fetch it through \Psr\Container\ContainerInterface::get

332 IServerContainer::getDatabaseConnection()

have it injected or fetch it through \Psr\Container\ContainerInterface::get

341 IServerContainer::getAvatarManager()

have it injected or fetch it through \Psr\Container\ContainerInterface::get

350 IServerContainer::getJobList()

have it injected or fetch it through \Psr\Container\ContainerInterface::get

359 IServerContainer::getLogger()

have it injected or fetch it through \Psr\Container\ContainerInterface::get

368 IServerContainer::getLogFactory()

have it injected or fetch it through \Psr\Container\ContainerInterface::get

377 IServerContainer::getRouter()

have it injected or fetch it through \Psr\Container\ContainerInterface::get

386 IServerContainer::getSearch()
395 IServerContainer::getCertificateManager()

have it injected or fetch it through \Psr\Container\ContainerInterface::get

404 IServerContainer::getHTTPClientService()

have it injected or fetch it through \Psr\Container\ContainerInterface::get

413 IServerContainer::getEventLogger()

have it injected or fetch it through \Psr\Container\ContainerInterface::get

424 IServerContainer::getQueryLogger()

have it injected or fetch it through \Psr\Container\ContainerInterface::get

433 IServerContainer::getTempManager()

have it injected or fetch it through \Psr\Container\ContainerInterface::get

442 IServerContainer::getAppManager()

have it injected or fetch it through \Psr\Container\ContainerInterface::get

451 IServerContainer::getWebRoot()

have it injected or fetch it through \Psr\Container\ContainerInterface::get

458 IServerContainer::getMountProviderCollection()

have it injected or fetch it through \Psr\Container\ContainerInterface::get

467 IServerContainer::getIniWrapper()

have it injected or fetch it through \Psr\Container\ContainerInterface::get

473 IServerContainer::getCommandBus()

have it injected or fetch it through \Psr\Container\ContainerInterface::get

482 IServerContainer::getMailer()

have it injected or fetch it through \Psr\Container\ContainerInterface::get

491 IServerContainer::getLockingProvider()

have it injected or fetch it through \Psr\Container\ContainerInterface::get

498 IServerContainer::getMountManager()

have it injected or fetch it through \Psr\Container\ContainerInterface::get

507 IServerContainer::getMimeTypeDetector()

have it injected or fetch it through \Psr\Container\ContainerInterface::get

516 IServerContainer::getMimeTypeLoader()

have it injected or fetch it through \Psr\Container\ContainerInterface::get

525 IServerContainer::getNotificationManager()

have it injected or fetch it through \Psr\Container\ContainerInterface::get

532 IServerContainer::getCommentsManager()

have it injected or fetch it through \Psr\Container\ContainerInterface::get

542 IServerContainer::getSystemTagManager()

have it injected or fetch it through \Psr\Container\ContainerInterface::get

552 IServerContainer::getSystemTagObjectMapper()

have it injected or fetch it through \Psr\Container\ContainerInterface::get

561 IServerContainer::getShareManager()

have it injected or fetch it through \Psr\Container\ContainerInterface::get

568 IServerContainer::getContentSecurityPolicyManager()

Use the AddContentSecurityPolicyEvent

575 IServerContainer::getDateTimeZone()

have it injected or fetch it through \Psr\Container\ContainerInterface::get

582 IServerContainer::getDateTimeFormatter()

have it injected or fetch it through \Psr\Container\ContainerInterface::get

589 IServerContainer::getCloudIdManager()

have it injected or fetch it through \Psr\Container\ContainerInterface::get

596 IServerContainer::getGlobalScaleConfig()

have it injected or fetch it through \Psr\Container\ContainerInterface::get

603 IServerContainer::getCloudFederationFactory()

have it injected or fetch it through \Psr\Container\ContainerInterface::get

610 IServerContainer::getCloudFederationProviderManager()

have it injected or fetch it through \Psr\Container\ContainerInterface::get

617 IServerContainer::getRemoteApiFactory()

have it injected or fetch it through \Psr\Container\ContainerInterface::get

624 IServerContainer::getRemoteInstanceFactory()

have it injected or fetch it through \Psr\Container\ContainerInterface::get

631 IServerContainer::getStorageFactory()

have it injected or fetch it through \Psr\Container\ContainerInterface::get

IUser.php

Line Element Reason
226 IUser::setEMailAddress()

use setSystemEMailAddress() or setPrimaryEMailAddress()

ILogFactory.php

Line Element Reason
50 ILogFactory::getCustomLogger()

Use \OCP\Log\ILogFactory::getCustomPsrLogger

IManager.php

Line Element Reason
49 IManager::registerNotifier()

use registerNotifierService instead.

57 IManager::registerNotifierService()

use the IBootStrap registration context

BeforePreviewFetchedEvent.php

Line Element Reason
42 BeforePreviewFetchedEvent::$width

null deprecated *

44 BeforePreviewFetchedEvent::$height

null deprecated *

46 BeforePreviewFetchedEvent::$crop

null deprecated *

48 BeforePreviewFetchedEvent::$mode

null deprecated *

IProvider.php

Line Element Reason
33 IProvider

use IProviderV2 instead

IApiCollection.php

Line Element Reason
31 IApiCollection
38 IApiCollection::getUserApi()
46 IApiCollection::getCapabilitiesApi()

IApiFactory.php

Line Element Reason
32 IApiFactory
41 IApiFactory::getApiCollection()

ICapabilitiesApi.php

Line Element Reason
29 ICapabilitiesApi
36 ICapabilitiesApi::getCapabilities()

IUserApi.php

Line Element Reason
31 IUserApi
39 IUserApi::getUser()

ICredentials.php

Line Element Reason
31 ICredentials
38 ICredentials::getUsername()
46 ICredentials::getPassword()

IInstance.php

Line Element Reason
31 IInstance
38 IInstance::getUrl()
46 IInstance::getFullUrl()
54 IInstance::getVersion()
62 IInstance::getProtocol()
72 IInstance::isActive()

IInstanceFactory.php

Line Element Reason
29 IInstanceFactory
37 IInstanceFactory::getInstance()

IUser.php

Line Element Reason
31 IUser
38 IUser::getUserId()
46 IUser::getEmail()
54 IUser::getDisplayName()
62 IUser::getPhone()
70 IUser::getAddress()
78 IUser::getWebsite()
86 IUser::getTwitter()
94 IUser::getGroups()
102 IUser::getLanguage()
110 IUser::getUsedSpace()
118 IUser::getFreeSpace()
126 IUser::getTotalSpace()
134 IUser::getQuota()

IRouter.php

Line Element Reason
34 IRouter
46 IRouter::create()

PagedProvider.php

Line Element Reason
34 PagedProvider
48 PagedProvider::__construct()
59 PagedProvider::search()
73 PagedProvider::searchPaged()
40 PagedProvider::SIZE_ALL

Provider.php

Line Element Reason
34 Provider
55 Provider::__construct()
66 Provider::getOption()
84 Provider::providesResultsFor()
96 Provider::search()
39 Provider::OPTION_APPS
47 Provider::$options

Result.php

Line Element Reason
33 Result
77 Result::__construct()
41 Result::$id
50 Result::$name
58 Result::$link
67 Result::$type

IThrottler.php

Line Element Reason
89 IThrottler::getAttempts()

This method is considered internal as of Nextcloud 28. Use showBruteforceWarning() to decide whether a warning should be shown.

110 IThrottler::getDelay()

This method is considered internal as of Nextcloud 28. Use showBruteforceWarning() to decide whether a warning should be shown.

129 IThrottler::resetDelayForIP()

This method is considered internal as of Nextcloud 28. Use resetDelay() and only reset the entries of your action and metadata

140 IThrottler::sleepDelay()

Use sleepDelayOrThrowOnMax() instead and abort handling the request when it throws

45 IThrottler::MAX_DELAY
51 IThrottler::MAX_DELAY_MS
57 IThrottler::MAX_ATTEMPTS

IContentSecurityPolicyManager.php

Line Element Reason
37 IContentSecurityPolicyManager

listen to the AddContentSecurityPolicyEvent to add a policy

56 IContentSecurityPolicyManager::addDefaultPolicy()

listen to the AddContentSecurityPolicyEvent to add a policy

Share.php

Line Element Reason
44 Share
55 Share::getItemSharedWithUser()
70 Share::getItemSharedWithBySource()
83 Share::getShareByToken()
99 Share::getItemsShared()
118 Share::getItemShared()

Refactoring notes:

  • defacto $parameters and $format is always the default and therefore is removed in the subsequent call
133 Share::setSendMailStatus()

IRegistry.php

Line Element Reason
36 IRegistry

used internally only

46 IRegistry::register()

use IRegistrationContext::registerCrashReporter

58 IRegistry::delegateBreadcrumb()

used internally only

69 IRegistry::delegateReport()

used internally only

82 IRegistry::delegateMessage()

used internally only

91 IRegistry::hasReporters()

use internally only

IRegistry.php

Line Element Reason
47 IRegistry::register()

use registerService

ManagerEvent.php

Line Element Reason
42 ManagerEvent::EVENT_CREATE
47 ManagerEvent::EVENT_UPDATE
52 ManagerEvent::EVENT_DELETE

MapperEvent.php

Line Element Reason
41 MapperEvent::EVENT_ASSIGN
46 MapperEvent::EVENT_UNASSIGN

SystemTagsEntityEvent.php

Line Element Reason
42 SystemTagsEntityEvent::EVENT_ENTITY

Listen to the typed event instead

ABackend.php

Line Element Reason
44 ABackend::implementsActions()

UserInterface.php

Line Element Reason
47 UserInterface::implementsActions()

Switch to the interfaces from OCP\User\Backend

Util.php

Line Element Reason
114 Util::isSharingDisabledForUser()

Use \OC::$server->getShareManager()->sharingDisabledForUser

388 Util::connectHook()

use \OCP\EventDispatcher\IEventDispatcher::addListener

403 Util::emitHook()

use \OCP\EventDispatcher\IEventDispatcher::dispatchTypedEvent

478 Util::recursiveArraySearch()
522 Util::isValidFileName()

use \OC\Files\View::verifyPath()

IRuleMatcher.php

Line Element Reason
45 IRuleMatcher::getMatchingOperations()

Search results