Upgrade to Nextcloud 27
Critical changes were collected on GitHub. See the original ticket for links to the pull requests and tickets.
Make sure your
appinfo/info.xml allows for Nextcloud 27.
<dependencies> <nextcloud min-version="25" max-version="27" /> </dependencies>
.mjsfile extension. For backwards compatibilty you can provide files with the same name but the
.jsfile extension which will be loaded for Nextcloud versions before 27.
A new Files Router API allows you to control the files router service and update views, querys or param without page reload. See Files
Optimized class loader
This documentation previously recommended using any composer class loader optimization in Replacing Nextcloud’s autoloader. Unfortunately authoritative class maps do not work with the upgrade process of Nextcloud apps. When app code is replaced during an app upgrade, the autoloader has to load new classes as well. Authoritative class loaders don’t do that by design. Use the simple class map optimization only.
Removal of PSR-0 class loader
\OCP\Accounts\IAccountManager::PROPERTY_DISPLAYNAME_LEGACYwas added to keep the provisioning API compatible. (nextcloud/server#36665)
A new system config
ratelimit.protection.enabled(boolean, default true) was added to allow developers to disable rate limiting. It is not recommended to disable this on a production/live system. (nextcloud/server#37542)
A new OCP API under
\OCP\SpeechToTextwas introduced to allow automatic transcription of media (nextcloud/server#37674)
Added a new interface
\OCP\BackgroundJob\Jobnow 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)
$actionLabelhas been added to the
\OCP\Files\Template\TemplateFileCreatorclass with a respective setter
TemplateFileCreator::getActionLabel. (nextcloud/server#37929 + nextcloud/server#37955)
A new interface
\OCP\Group\Backend\ISearchableGroupBackendwas added for group backends supporting new method
searchInGroupto search among a group users in an efficient way. (nextcloud/server#32866)
\OCP\App\IAppManagerhas the following new methods (nextcloud/server#36591):
loadApp(string $app): voidLoad an app, if not already loaded
isAppLoaded(string $app): boolCheck if an app is loaded
loadApps(array $types = ): boolLoads all apps. If $types is set to non-empty array, only apps of those types will be loaded.
isType(string $app, array $types): boolCheck if an app is of a specific type
int|floatto support 32-bit systems. (nextcloud/server#38104)
\OCP\Files\FileInfo::getOwnerdocumented return type is now nullable, to match what was already returned by the implementation (nextcloud/server#36836)
\OCP\Files\SimpleFS\ISimpleFile::readdocumented return types are now nullable, to match what was already returned by the implementations (nextcloud/server#36836)
\OCP\Files\File::getContentmay now also throw a
GenericFileExceptionin cases where it would previously return false (while documented to always return a string, which should now be the case - nextcloud/server#37943).
\OCP\AppFramework\Utility\ITimeFactory::getDateTime()were deprecated, because the interface is now a
\PSR\Clock\ClockInterfacefollowing the PSR-20standard. (nextcloud/server#35872)
\OCP\GroupInterface::usersInGroup()is deprecated in favor of newly added
\OC_App, the following methods are deprecated:
isType. Use the new methods from
Intermediate transition event classes
\OCP\WorkflowEngine\IOperationCompathave been removed as advertised for 2023 (nextcloud/server#37040)
\OCP\Files\Cache\CacheEntryRemovedEventwill now be dispatched for all files and folders inside the deleted node. (nextcloud/server#34773)
\OCP\AppFramework\Db\IMapperExceptiondoes now implement
\Throwable, previously either
\OCP\AppFramework\Db\MultipleObjectsReturnedExceptionhad to be caught explicitly. (nextcloud/server#37324)
HTTP request that do not pass the lax and strict cookie check return a HTTP status 412 consistently now. It was HTTP 412 and 503 before depending on the endpoint. (nextcloud/server#37316)
The OCS translation API was extended to return the
fromlanguage attribute so in case no from was given, clients can afterwards show in the UI which language was detected and used for translating. (nextcloud/server#38003)