From 965ce1ce8d403fe92f8cdfd8f24f25f422e2e4f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4me=20Chilliet?= Date: Tue, 30 May 2023 15:36:14 +0200 Subject: [PATCH 1/2] Document app loading refactor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Côme Chilliet --- .../app_upgrade_guide/upgrade_to_27.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/developer_manual/app_publishing_maintenance/app_upgrade_guide/upgrade_to_27.rst b/developer_manual/app_publishing_maintenance/app_upgrade_guide/upgrade_to_27.rst index 97bd5725d21..3024019b54b 100644 --- a/developer_manual/app_publishing_maintenance/app_upgrade_guide/upgrade_to_27.rst +++ b/developer_manual/app_publishing_maintenance/app_upgrade_guide/upgrade_to_27.rst @@ -45,6 +45,11 @@ Added APIs * Added a new interface ``\OCP\BackgroundJob\IParallelAwareJob`` that ``\OCP\BackgroundJob\Job`` now implements. It can be used to allow specifying that multiple instances of a job should not be run at the same time. Also added ``\OCP\BackgroundJob\IJobList#hasReservedJob(?string $className = null)`` method to check the condition (`nextcloud/server#37835 `_) * New property ``$actionLabel`` has been added to the ``\OCP\Files\Template\TemplateFileCreator`` class with a respective setter ``TemplateFileCreator::setActionLabel`` and getter ``TemplateFileCreator::getActionLabel``. (`nextcloud/server#37929 `_ + `nextcloud/server#37955 `_) * A new interface ``\OCP\Group\Backend\ISearchableGroupBackend`` was added for group backends supporting new method ``searchInGroup`` to search among a group users in an efficient way. (`nextcloud/server#32866 `_) +* ``\OCP\App\IAppManager`` has the following new methods: + * ``loadApp(string $app): void`` Load an app, if not already loaded + * ``isAppLoaded(string $app): bool`` Check if an app is loaded + * ``loadApps(array $types = []): bool`` Loads all apps. If $types is set to non-empty array, only apps of those types will be loaded. + * ``isType(string $app, array $types): bool`` Check if an app is of a specific type Changed APIs ^^^^^^^^^^^^ @@ -59,6 +64,7 @@ Deprecated APIs * ``\OCP\AppFramework\Utility\ITimeFactory::getTime()`` and ``\OCP\AppFramework\Utility\ITimeFactory::getDateTime()`` were deprecated, because the interface is now a ``\PSR\Clock\ClockInterface`` following the `PSR-20standard `_. (`nextcloud/server#35872 `_) * ``\OCP\GroupInterface::usersInGroup()`` is deprecated in favor of newly added ``\OCP\Group\Backend\ISearchableGroupBackend`` interface. (`nextcloud/server#32866 `_) +* In ``\OC_App``, the following methods are deprecated: ``isAppLoaded``, ``loadApp``, ``isType``. Use the new methods from ``\OCP\App\IAppManager`` instead. Removed APIs ^^^^^^^^^^^^ From 07a2268ac3672398b867f31c4cf35c4360be5741 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4me=20Chilliet?= Date: Thu, 1 Jun 2023 10:58:33 +0200 Subject: [PATCH 2/2] Add PR numbers for app loading refactor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Côme Chilliet --- .../app_upgrade_guide/upgrade_to_27.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/developer_manual/app_publishing_maintenance/app_upgrade_guide/upgrade_to_27.rst b/developer_manual/app_publishing_maintenance/app_upgrade_guide/upgrade_to_27.rst index 3024019b54b..91458c19e22 100644 --- a/developer_manual/app_publishing_maintenance/app_upgrade_guide/upgrade_to_27.rst +++ b/developer_manual/app_publishing_maintenance/app_upgrade_guide/upgrade_to_27.rst @@ -45,7 +45,7 @@ Added APIs * Added a new interface ``\OCP\BackgroundJob\IParallelAwareJob`` that ``\OCP\BackgroundJob\Job`` now implements. It can be used to allow specifying that multiple instances of a job should not be run at the same time. Also added ``\OCP\BackgroundJob\IJobList#hasReservedJob(?string $className = null)`` method to check the condition (`nextcloud/server#37835 `_) * New property ``$actionLabel`` has been added to the ``\OCP\Files\Template\TemplateFileCreator`` class with a respective setter ``TemplateFileCreator::setActionLabel`` and getter ``TemplateFileCreator::getActionLabel``. (`nextcloud/server#37929 `_ + `nextcloud/server#37955 `_) * A new interface ``\OCP\Group\Backend\ISearchableGroupBackend`` was added for group backends supporting new method ``searchInGroup`` to search among a group users in an efficient way. (`nextcloud/server#32866 `_) -* ``\OCP\App\IAppManager`` has the following new methods: +* ``\OCP\App\IAppManager`` has the following new methods (`nextcloud/server#36591 `_): * ``loadApp(string $app): void`` Load an app, if not already loaded * ``isAppLoaded(string $app): bool`` Check if an app is loaded * ``loadApps(array $types = []): bool`` Loads all apps. If $types is set to non-empty array, only apps of those types will be loaded. @@ -64,7 +64,7 @@ Deprecated APIs * ``\OCP\AppFramework\Utility\ITimeFactory::getTime()`` and ``\OCP\AppFramework\Utility\ITimeFactory::getDateTime()`` were deprecated, because the interface is now a ``\PSR\Clock\ClockInterface`` following the `PSR-20standard `_. (`nextcloud/server#35872 `_) * ``\OCP\GroupInterface::usersInGroup()`` is deprecated in favor of newly added ``\OCP\Group\Backend\ISearchableGroupBackend`` interface. (`nextcloud/server#32866 `_) -* In ``\OC_App``, the following methods are deprecated: ``isAppLoaded``, ``loadApp``, ``isType``. Use the new methods from ``\OCP\App\IAppManager`` instead. +* In ``\OC_App``, the following methods are deprecated: ``isAppLoaded``, ``loadApp``, ``isType``. Use the new methods from ``\OCP\App\IAppManager`` instead (`nextcloud/server#36591 `_). Removed APIs ^^^^^^^^^^^^