From 4fc0b2c639f1dd3c67a038c532cf98138b813dbe Mon Sep 17 00:00:00 2001 From: Christoph Wurst Date: Tue, 9 Feb 2021 13:53:41 +0100 Subject: [PATCH] Deprecate all remaining event constants Signed-off-by: Christoph Wurst --- lib/public/App/ManagerEvent.php | 12 ++++++++++++ .../Authentication/TwoFactorAuth/IProvider.php | 5 +++++ .../Authentication/TwoFactorAuth/IRegistry.php | 7 +++++++ lib/public/Comments/CommentsEntityEvent.php | 3 +++ lib/public/Comments/CommentsEvent.php | 16 ++++++++++++++++ lib/public/Console/ConsoleEvent.php | 4 ++++ lib/public/IPreview.php | 1 + lib/public/SystemTag/ManagerEvent.php | 12 ++++++++++++ lib/public/SystemTag/MapperEvent.php | 8 ++++++++ lib/public/SystemTag/SystemTagsEntityEvent.php | 4 ++++ lib/public/WorkflowEngine/IManager.php | 10 +++++++++- 11 files changed, 81 insertions(+), 1 deletion(-) diff --git a/lib/public/App/ManagerEvent.php b/lib/public/App/ManagerEvent.php index e2f718a556..58cbdc3d11 100644 --- a/lib/public/App/ManagerEvent.php +++ b/lib/public/App/ManagerEvent.php @@ -32,12 +32,24 @@ use OCP\EventDispatcher\Event; * @since 9.0.0 */ class ManagerEvent extends Event { + /** + * @deprecated 22.0.0 + */ public const EVENT_APP_ENABLE = 'OCP\App\IAppManager::enableApp'; + + /** + * @deprecated 22.0.0 + */ public const EVENT_APP_ENABLE_FOR_GROUPS = 'OCP\App\IAppManager::enableAppForGroups'; + + /** + * @deprecated 22.0.0 + */ public const EVENT_APP_DISABLE = 'OCP\App\IAppManager::disableApp'; /** * @since 9.1.0 + * @deprecated 22.0.0 */ public const EVENT_APP_UPDATE = 'OCP\App\IAppManager::updateApp'; diff --git a/lib/public/Authentication/TwoFactorAuth/IProvider.php b/lib/public/Authentication/TwoFactorAuth/IProvider.php index 1328d60307..83545fa4f6 100644 --- a/lib/public/Authentication/TwoFactorAuth/IProvider.php +++ b/lib/public/Authentication/TwoFactorAuth/IProvider.php @@ -36,8 +36,13 @@ interface IProvider { /** * @since 14.0.0 + * @deprecated 22.0.0 */ public const EVENT_SUCCESS = self::class . '::success'; + + /** + * @deprecated 22.0.0 + */ public const EVENT_FAILED = self::class . '::failed'; /** diff --git a/lib/public/Authentication/TwoFactorAuth/IRegistry.php b/lib/public/Authentication/TwoFactorAuth/IRegistry.php index c98feee254..2e5951aaf2 100644 --- a/lib/public/Authentication/TwoFactorAuth/IRegistry.php +++ b/lib/public/Authentication/TwoFactorAuth/IRegistry.php @@ -39,7 +39,14 @@ use OCP\IUser; * @since 14.0.0 */ interface IRegistry { + /** + * @deprecated 22.0.0 + */ public const EVENT_PROVIDER_ENABLED = self::class . '::enable'; + + /** + * @deprecated 22.0.0 + */ public const EVENT_PROVIDER_DISABLED = self::class . '::disable'; /** diff --git a/lib/public/Comments/CommentsEntityEvent.php b/lib/public/Comments/CommentsEntityEvent.php index 17f3e76a99..7ae2968ead 100644 --- a/lib/public/Comments/CommentsEntityEvent.php +++ b/lib/public/Comments/CommentsEntityEvent.php @@ -32,6 +32,9 @@ use OCP\EventDispatcher\Event; * @since 9.1.0 */ class CommentsEntityEvent extends Event { + /** + * @deprecated 22.0.0 + */ public const EVENT_ENTITY = 'OCP\Comments\ICommentsManager::registerEntity'; /** @var string */ diff --git a/lib/public/Comments/CommentsEvent.php b/lib/public/Comments/CommentsEvent.php index a8a27948e9..9090425aae 100644 --- a/lib/public/Comments/CommentsEvent.php +++ b/lib/public/Comments/CommentsEvent.php @@ -32,9 +32,25 @@ use OCP\EventDispatcher\Event; * @since 9.0.0 */ class CommentsEvent extends Event { + + /** + * @deprecated 22.0.0 + */ public const EVENT_ADD = 'OCP\Comments\ICommentsManager::addComment'; + + /** + * @deprecated 22.0.0 + */ public const EVENT_PRE_UPDATE = 'OCP\Comments\ICommentsManager::preUpdateComment'; + + /** + * @deprecated 22.0.0 + */ public const EVENT_UPDATE = 'OCP\Comments\ICommentsManager::updateComment'; + + /** + * @deprecated 22.0.0 + */ public const EVENT_DELETE = 'OCP\Comments\ICommentsManager::deleteComment'; /** @var string */ diff --git a/lib/public/Console/ConsoleEvent.php b/lib/public/Console/ConsoleEvent.php index 1d946d5035..a12d65c3b1 100644 --- a/lib/public/Console/ConsoleEvent.php +++ b/lib/public/Console/ConsoleEvent.php @@ -32,6 +32,10 @@ use OCP\EventDispatcher\Event; * @since 9.0.0 */ class ConsoleEvent extends Event { + + /** + * @deprecated 22.0.0 + */ public const EVENT_RUN = 'OC\Console\Application::run'; /** @var string */ diff --git a/lib/public/IPreview.php b/lib/public/IPreview.php index aa7bf559df..2ae5d83525 100644 --- a/lib/public/IPreview.php +++ b/lib/public/IPreview.php @@ -48,6 +48,7 @@ interface IPreview { /** * @since 9.2.0 + * @deprecated 22.0.0 */ public const EVENT = self::class . ':' . 'PreviewRequested'; diff --git a/lib/public/SystemTag/ManagerEvent.php b/lib/public/SystemTag/ManagerEvent.php index 4441977580..45cd35fc82 100644 --- a/lib/public/SystemTag/ManagerEvent.php +++ b/lib/public/SystemTag/ManagerEvent.php @@ -37,8 +37,20 @@ use OCP\EventDispatcher\Event; * @since 9.0.0 */ class ManagerEvent extends Event { + + /** + * @deprecated 22.0.0 + */ public const EVENT_CREATE = 'OCP\SystemTag\ISystemTagManager::createTag'; + + /** + * @deprecated 22.0.0 + */ public const EVENT_UPDATE = 'OCP\SystemTag\ISystemTagManager::updateTag'; + + /** + * @deprecated 22.0.0 + */ public const EVENT_DELETE = 'OCP\SystemTag\ISystemTagManager::deleteTag'; /** @var string */ diff --git a/lib/public/SystemTag/MapperEvent.php b/lib/public/SystemTag/MapperEvent.php index 469a381d3c..a8fc30771f 100644 --- a/lib/public/SystemTag/MapperEvent.php +++ b/lib/public/SystemTag/MapperEvent.php @@ -36,7 +36,15 @@ use OCP\EventDispatcher\Event; * @since 9.0.0 */ class MapperEvent extends Event { + + /** + * @deprecated 22.0.0 + */ public const EVENT_ASSIGN = 'OCP\SystemTag\ISystemTagObjectMapper::assignTags'; + + /** + * @deprecated 22.0.0 + */ public const EVENT_UNASSIGN = 'OCP\SystemTag\ISystemTagObjectMapper::unassignTags'; /** @var string */ diff --git a/lib/public/SystemTag/SystemTagsEntityEvent.php b/lib/public/SystemTag/SystemTagsEntityEvent.php index 1ae82f2a7e..33acecdcd2 100644 --- a/lib/public/SystemTag/SystemTagsEntityEvent.php +++ b/lib/public/SystemTag/SystemTagsEntityEvent.php @@ -36,6 +36,10 @@ use OCP\EventDispatcher\Event; * @since 9.1.0 */ class SystemTagsEntityEvent extends Event { + + /** + * @deprecated 22.0.0 + */ public const EVENT_ENTITY = 'OCP\SystemTag\ISystemTagManager::registerEntity'; /** @var string */ diff --git a/lib/public/WorkflowEngine/IManager.php b/lib/public/WorkflowEngine/IManager.php index 5863cf7ce2..579cb4cd14 100644 --- a/lib/public/WorkflowEngine/IManager.php +++ b/lib/public/WorkflowEngine/IManager.php @@ -46,10 +46,18 @@ interface IManager { public const MAX_OPERATION_VALUE_BYTES = 4096; /** - * @deprecated Will be removed in NC19. Use the dedicated events in OCP\WorkflowEngine\Events + * @deprecated 17.0.0 Will be removed in NC19. Use the dedicated events in OCP\WorkflowEngine\Events */ public const EVENT_NAME_REG_OPERATION = 'OCP\WorkflowEngine::registerOperations'; + + /** + * @deprecated 17.0.0 + */ public const EVENT_NAME_REG_ENTITY = 'OCP\WorkflowEngine::registerEntities'; + + /** + * @deprecated 17.0.0 + */ public const EVENT_NAME_REG_CHECK = 'OCP\WorkflowEngine::registerChecks'; /**