chore: Add proper deprecation dates where missing

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
This commit is contained in:
Ferdinand Thiessen 2024-09-18 23:51:06 +02:00
parent e7f8ab1c3b
commit a8f46af20f
No known key found for this signature in database
GPG key ID: 45FAE7268762B400
22 changed files with 45 additions and 45 deletions

View file

@ -255,7 +255,7 @@ class InstalledVersions
/**
* Returns the raw installed.php data for custom implementations
*
* @deprecated Use getAllRawData() instead which returns all datasets for all autoloaders present in the process. getRawData only returns the first dataset loaded, which may not be what you expect.
* @deprecated 23.0.0 Use getAllRawData() instead which returns all datasets for all autoloaders present in the process. getRawData only returns the first dataset loaded, which may not be what you expect.
* @return array[]
* @psalm-return array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}
*/

View file

@ -1295,7 +1295,7 @@ class AppConfig implements IAppConfig {
* @param string $default = null, default value if the key does not exist
*
* @return string the value or $default
* @deprecated - use getValue*()
* @deprecated 29.0.0 use getValue*()
*
* This function gets a value from the appconfig table. If the key does
* not exist the default value will be returned
@ -1316,7 +1316,7 @@ class AppConfig implements IAppConfig {
* @return bool True if the value was inserted or updated, false if the value was the same
* @throws AppConfigTypeConflictException
* @throws AppConfigUnknownKeyException
* @deprecated
* @deprecated 29.0.0
*/
public function setValue($app, $key, $value) {
/**
@ -1422,7 +1422,7 @@ class AppConfig implements IAppConfig {
* @param string $app
*
* @return string[]
* @deprecated data sensitivity should be set when calling setValue*()
* @deprecated 29.0.0 data sensitivity should be set when calling setValue*()
*/
private function getSensitiveKeys(string $app): array {
$sensitiveValues = [
@ -1533,7 +1533,7 @@ class AppConfig implements IAppConfig {
* Clear all the cached app config values
* New cache will be generated next time a config value is retrieved
*
* @deprecated use {@see clearCache()}
* @deprecated 29.0.0 use {@see clearCache()}
*/
public function clearCachedConfig(): void {
$this->clearCache();

View file

@ -86,11 +86,11 @@ class DIContainer extends SimpleContainer implements IAppContainer {
$this->server->registerAppContainer($appName, $this);
// aliases
/** @deprecated inject $appName */
/** @deprecated 26.0.0 inject $appName */
$this->registerAlias('AppName', 'appName');
/** @deprecated inject $webRoot*/
/** @deprecated 26.0.0 inject $webRoot*/
$this->registerAlias('WebRoot', 'webRoot');
/** @deprecated inject $userId */
/** @deprecated 26.0.0 inject $userId */
$this->registerAlias('UserId', 'userId');
/**
@ -359,7 +359,7 @@ class DIContainer extends SimpleContainer implements IAppContainer {
}
/**
* @deprecated use IUserSession->isLoggedIn()
* @deprecated 12.0.0 use IUserSession->isLoggedIn()
* @return boolean
*/
public function isLoggedIn() {
@ -367,7 +367,7 @@ class DIContainer extends SimpleContainer implements IAppContainer {
}
/**
* @deprecated use IGroupManager->isAdmin($userId)
* @deprecated 12.0.0 use IGroupManager->isAdmin($userId)
* @return boolean
*/
public function isAdminUser() {

View file

@ -430,7 +430,7 @@ class PublicKeyTokenProvider implements IProvider {
}
/**
* @deprecated Fallback for instances where the secret might not have been set by accident
* @deprecated 26.0.0 Fallback for instances where the secret might not have been set by accident
*/
private function hashTokenWithEmptySecret(string $token): string {
return hash('sha512', $token);

View file

@ -14,7 +14,7 @@ use OCP\ICache;
*
* Uses a simple FIFO expiry mechanism
* @template T
* @deprecated use OCP\Cache\CappedMemoryCache instead
* @deprecated 25.0.0 use OCP\Cache\CappedMemoryCache instead
*/
class CappedMemoryCache implements ICache, \ArrayAccess {
private $capacity;

View file

@ -282,7 +282,7 @@ class Connection extends PrimaryReadReplicaConnection {
* Gets the QueryBuilder for the connection.
*
* @return \Doctrine\DBAL\Query\QueryBuilder
* @deprecated please use $this->getQueryBuilder() instead
* @deprecated 8.0.0 please use $this->getQueryBuilder() instead
*/
public function createQueryBuilder() {
$backtrace = $this->getCallerBacktrace();
@ -295,7 +295,7 @@ class Connection extends PrimaryReadReplicaConnection {
* Gets the ExpressionBuilder for the connection.
*
* @return \Doctrine\DBAL\Query\Expression\ExpressionBuilder
* @deprecated please use $this->getQueryBuilder()->expr() instead
* @deprecated 8.0.0 please use $this->getQueryBuilder()->expr() instead
*/
public function getExpressionBuilder() {
$backtrace = $this->getCallerBacktrace();

View file

@ -1113,7 +1113,7 @@ class Cache implements ICache {
*
* @param int $id
* @return array first element holding the storage id, second the path
* @deprecated use getPathById() instead
* @deprecated 17.0.0 use getPathById() instead
*/
public static function getById($id) {
$query = \OC::$server->getDatabaseConnection()->getQueryBuilder();

View file

@ -530,7 +530,7 @@ class Share implements IShare {
*
* @param int $parent
* @return IShare
* @deprecated The new shares do not have parents. This is just here for legacy reasons.
* @deprecated 12.0.0 The new shares do not have parents. This is just here for legacy reasons.
*/
public function setParent($parent) {
$this->parent = $parent;
@ -541,7 +541,7 @@ class Share implements IShare {
* Get the parent of this share.
*
* @return int
* @deprecated The new shares do not have parents. This is just here for legacy reasons.
* @deprecated 12.0.0 The new shares do not have parents. This is just here for legacy reasons.
*/
public function getParent() {
return $this->parent;

View file

@ -260,7 +260,7 @@ class Manager extends PublicEmitter implements IUserManager {
* @param int $limit
* @param int $offset
* @return IUser[]
* @deprecated since 27.0.0, use searchDisplayName instead
* @deprecated 27.0.0, use searchDisplayName instead
*/
public function search($pattern, $limit = null, $offset = null) {
$users = [];

View file

@ -417,7 +417,7 @@ class OC_Helper {
/**
* Checks if a function is available
*
* @deprecated Since 25.0.0 use \OCP\Util::isFunctionEnabled instead
* @deprecated 25.0.0 use \OCP\Util::isFunctionEnabled instead
*/
public static function is_function_enabled(string $function_name): bool {
return \OCP\Util::isFunctionEnabled($function_name);
@ -425,7 +425,7 @@ class OC_Helper {
/**
* Try to find a program
* @deprecated Since 25.0.0 Use \OC\BinaryFinder directly
* @deprecated 25.0.0 Use \OC\BinaryFinder directly
*/
public static function findBinaryPath(string $program): ?string {
$result = \OCP\Server::get(IBinaryFinder::class)->findBinaryPath($program);

View file

@ -12,7 +12,7 @@ class OC_JSON {
/**
* Check if the app is enabled, send json error msg if not
* @param string $app
* @deprecated Use the AppFramework instead. It will automatically check if the app is enabled.
* @deprecated 12.0.0 Use the AppFramework instead. It will automatically check if the app is enabled.
* @suppress PhanDeprecatedFunction
*/
public static function checkAppEnabled($app) {
@ -25,7 +25,7 @@ class OC_JSON {
/**
* Check if the user is logged in, send json error msg if not
* @deprecated Use annotation based ACLs from the AppFramework instead
* @deprecated 12.0.0 Use annotation based ACLs from the AppFramework instead
* @suppress PhanDeprecatedFunction
*/
public static function checkLoggedIn() {
@ -41,7 +41,7 @@ class OC_JSON {
/**
* Check an ajax get/post call if the request token is valid, send json error msg if not.
* @deprecated Use annotation based CSRF checks from the AppFramework instead
* @deprecated 12.0.0 Use annotation based CSRF checks from the AppFramework instead
* @suppress PhanDeprecatedFunction
*/
public static function callCheck() {
@ -59,7 +59,7 @@ class OC_JSON {
/**
* Check if the user is a admin, send json error msg if not.
* @deprecated Use annotation based ACLs from the AppFramework instead
* @deprecated 12.0.0 Use annotation based ACLs from the AppFramework instead
* @suppress PhanDeprecatedFunction
*/
public static function checkAdminUser() {
@ -72,7 +72,7 @@ class OC_JSON {
/**
* Send json error msg
* @deprecated Use a AppFramework JSONResponse instead
* @deprecated 12.0.0 Use a AppFramework JSONResponse instead
* @suppress PhanDeprecatedFunction
* @psalm-taint-escape html
*/
@ -84,7 +84,7 @@ class OC_JSON {
/**
* Send json success msg
* @deprecated Use a AppFramework JSONResponse instead
* @deprecated 12.0.0 Use a AppFramework JSONResponse instead
* @suppress PhanDeprecatedFunction
* @psalm-taint-escape html
*/
@ -96,7 +96,7 @@ class OC_JSON {
/**
* Encode JSON
* @deprecated Use a AppFramework JSONResponse instead
* @deprecated 12.0.0 Use a AppFramework JSONResponse instead
*/
private static function encode($data) {
return json_encode($data, JSON_HEX_TAG);

View file

@ -251,7 +251,7 @@ class OC_User {
/**
* Check if the user is logged in, considers also the HTTP basic credentials
*
* @deprecated use \OC::$server->getUserSession()->isLoggedIn()
* @deprecated 12.0.0 use \OC::$server->getUserSession()->isLoggedIn()
* @return bool
*/
public static function isLoggedIn() {
@ -353,7 +353,7 @@ class OC_User {
* @return string
*
* returns the path to the users home directory
* @deprecated Use \OC::$server->getUserManager->getHome()
* @deprecated 12.0.0 Use \OC::$server->getUserManager->getHome()
*/
public static function getHome($uid) {
$user = \OC::$server->getUserManager()->get($uid);
@ -373,7 +373,7 @@ class OC_User {
* @return array associative array with all display names (value) and corresponding uids (key)
*
* Get a list of all display names and user ids.
* @deprecated Use \OC::$server->getUserManager->searchDisplayName($search, $limit, $offset) instead.
* @deprecated 12.0.0 Use \OC::$server->getUserManager->searchDisplayName($search, $limit, $offset) instead.
*/
public static function getDisplayNames($search = '', $limit = null, $offset = null) {
$displayNames = [];

View file

@ -236,7 +236,7 @@ class OC_Util {
}
/**
* @deprecated the value is of no use anymore
* @deprecated 11.0.0 the value is of no use anymore
* @return string
*/
public static function getEditionString() {

View file

@ -106,7 +106,7 @@ class EmptyContentSecurityPolicy {
* @param bool $state
* @return $this
* @since 8.1.0
* @deprecated Eval should not be used anymore. Please update your scripts. This function will stop functioning in a future version of Nextcloud.
* @deprecated 17.0.0 Eval should not be used anymore. Please update your scripts. This function will stop functioning in a future version of Nextcloud.
*/
public function allowEvalScript($state = true) {
$this->evalScriptAllowed = $state;

View file

@ -10,7 +10,7 @@ namespace OCP\BackgroundJob;
use OCP\ILogger;
/**
* This interface represend a backgroud job run with cron
* This interface represents a background job run with cron
*
* To implement a background job, you must extend either \OCP\BackgroundJob\Job,
* \OCP\BackgroundJob\TimedJob or \OCP\BackgroundJob\QueuedJob
@ -33,7 +33,7 @@ interface IJob {
* @param IJobList $jobList The job list that manages the state of this job
* @param ILogger|null $logger
* @since 7.0.0
* @deprecated since 25.0.0 Use start() instead. This method will be removed
* @deprecated 25.0.0 Use start() instead. This method will be removed
* with the ILogger interface
*/
public function execute(IJobList $jobList, ?ILogger $logger = null);

View file

@ -39,7 +39,7 @@ abstract class Job implements IJob, IParallelAwareJob {
* @return void
*
* @since 15.0.0
* @deprecated since 25.0.0 Use start() instead. This method will be removed
* @deprecated 25.0.0 Use start() instead. This method will be removed
* with the ILogger interface
*/
public function execute(IJobList $jobList, ?ILogger $logger = null) {

View file

@ -22,7 +22,7 @@ abstract class QueuedJob extends Job {
* @param ILogger|null $logger
*
* @since 15.0.0
* @deprecated since 25.0.0 Use start() instead. This method will be removed
* @deprecated 25.0.0 Use start() instead. This method will be removed
* with the ILogger interface
*/
final public function execute($jobList, ?ILogger $logger = null) {

View file

@ -67,7 +67,7 @@ abstract class TimedJob extends Job {
* @param ILogger|null $logger
*
* @since 15.0.0
* @deprecated since 25.0.0 Use start() instead
* @deprecated 25.0.0 Use start() instead
*/
final public function execute(IJobList $jobList, ?ILogger $logger = null) {
$this->start($jobList);

View file

@ -12,7 +12,7 @@ use OCP\EventDispatcher\GenericEvent;
/**
* @since 16.0.0
* @deprecated Use {@see AutoCompleteFilterEvent} instead
* @deprecated 28.0.0 Use {@see AutoCompleteFilterEvent} instead
*/
class AutoCompleteEvent extends GenericEvent {
/**

View file

@ -35,7 +35,7 @@ interface GroupInterface {
/**
* @since 12.0.0
* @deprecated 29.0.0
* @deprecated 29.0.0
*/
public const REMOVE_FROM_GOUP = 0x00001000; // oops

View file

@ -30,7 +30,7 @@ interface Share_Backend {
* Get a unique name of the item for the specified user
* @param string $itemSource
* @param string|false $shareWith User the item is being shared with
* @param array|null $exclude List of similar item names already existing as shared items @deprecated since version OC7
* @param array|null $exclude List of similar item names already existing as shared items @deprecated 7.0.0
* @return string Target name
*
* This function needs to verify that the user does not already have an item with this name.

View file

@ -14,7 +14,7 @@ use Throwable;
/**
* @since 13.0.0
* @deprecated used internally only
* @deprecated 20.0.0 used internally only
*/
interface IRegistry {
/**
@ -35,7 +35,7 @@ interface IRegistry {
* @param string $category
* @param array $context
*
* @deprecated used internally only
* @deprecated 20.0.0 used internally only
* @since 15.0.0
*/
public function delegateBreadcrumb(string $message, string $category, array $context = []): void;
@ -46,7 +46,7 @@ interface IRegistry {
* @param Exception|Throwable $exception
* @param array $context
*
* @deprecated used internally only
* @deprecated 20.0.0 used internally only
* @since 13.0.0
*/
public function delegateReport($exception, array $context = []);
@ -59,7 +59,7 @@ interface IRegistry {
*
* @return void
*
* @deprecated used internally only
* @deprecated 20.0.0 used internally only
* @since 17.0.0
*/
public function delegateMessage(string $message, array $context = []): void;
@ -68,7 +68,7 @@ interface IRegistry {
* Check if any reporter has been registered to delegate to
*
* @return bool
* @deprecated use internally only
* @deprecated 20.0.0 use internally only
* @since 26.0.0
*/
public function hasReporters(): bool;