Upgrade to Nextcloud 33
Front-end changes
Added APIs
TBD
Changed APIs
TBD
Deprecated APIs
TBD
Removed APIs
The global
md5implementation is removed. It was deprecated since Nextcloud 20 and not used by Nextcloud anymore. If you still need amd5implementation you can just use some external package like crypto-browserify.OC.AppConfigwas deprecated since Nextcloud 16 and was now removed. Instead useOCP.AppConfig.The
OC.SystemTagsapi was removed. If you need to get the list of system tags, check this merge request for how to fetch the tags directly.OC.setandOC.getwere removed. Both are deprecated since Nextcloud 19. Forget, if really needed, use lodash get. And forset, use lodash set.OC.redirectandOC.reloadwere removed. Both were deprecated since Nextcloud 17. To replaceOC.redirectdirectly usewindow.location. To replaceOC.reloaddirectly usewindow.location.reload.OC.fileIsBlacklistedwas removed. It was deprecated since Nextcloud 18. The replacement is to usevalidateFilenamefrom the @nextcloud/files package.The deprecated host methods from OC were deprecated since Nextcloud 17 and are now removed
To replace
OC.getHostusewindow.location.host.To replace
OC.getHostNameusewindow.location.hostname.To replace
OC.getPortusewindow.location.port.To replace
OC.getProtocolusewindow.location.protocol.
The
OCA.Sharing.ExternalLinkActionsAPI was deprecated in Nextcloud 23 and is now removed. It was replaced withOCA.Sharing.ExternalShareActionwhich now have a proper API by usingregisterSidebarActionfrom @nextcloud/sharing instead.
Back-end changes
Support for PHP 8.1 removed
In this release support for PHP 8.1 was removed. Follow the steps below to make your app compatible.
If
appinfo/info.xmlhas a dependency specification for PHP, increase themin-versionto 8.2.
<dependencies>
<php min-version="8.2" max-version="8.4" />
<nextcloud min-version="31" max-version="33" />
</dependencies>
If your app has a
composer.jsonand the file contains the PHP restrictions frominfo.xml, adjust it as well.
{
"require": {
"php": ">=8.2 <=8.4"
}
}
If you have continuous integration set up, remove PHP 8.1 from the matrices of tests and linters.
Default user agent for outgoing requests changed
Starting with this release, the default user agent for requests done by the instance was changed from Nextcloud Server Crawler to Nextcloud-Server-Crawler/X.Y.Z, where X.Y.Z is the current server version.
Added Events
TBD
Added APIs
We now expose
\OCP\DB\IResult::iterateAssociative,\OCP\DB\IResult::iterateNumericfrom doctrine/dbal. These two methods returns iterators that can be directly used in a foreach to iterate over a SQL query result. For example:
$result = $qb->executeQuery();
foreach ($result->iterateAssociative() as $row) {
$id = $row['id'];
}
$result->closeCursor();
Changed APIs
TBD
Deprecated APIs
The
\OCP\DB\IResult::fetchand\OCP\DB\IResult::fetchAllare soft-deprecated. Instead you can use\OCP\DB\IResult::fetchAssociative,\OCP\DB\IResult::fetchNumericand\OCP\DB\IResult::fetchOneas replacement for\OCP\DB\IResult::fetch; and\OCP\DB\IResult::fetchAllAssociative,\OCP\DB\IResult::fetchAllNumericand\OCP\DB\IResult::fetchFirstColumnas replacement for\OCP\DB\IResult::fetchAll. If you use rector, you can use the Nextcloud33 set, to automatically port most of your code to the new methods.
Removed APIs
The
\OCP\BackgroundJob\IJob::executemethod was deprecated since Nextcloud 25 and was now removed. Instead use theIJob::startmethod, available since Nextcloud 25.The
\OCP\Search\PagedProvider,\OCP\Search\Providerand\OCP\Search\Resultclasses were deprecated since Nextcloud 20 and were now removed. Instead use\OCP\Search\SearchResultand\OCP\Search\IProvider, available since Nextcloud 20.