Changes for developers in Nextcloud 14, beta 4 ready for testing

Undo file deletions on Android

For developers, Nextcloud 14 introduces a series of changes that will impact their apps. Many have already been updated and we’re working with community members to update the over 120 apps on our app store. Besides changes and removal of old API elements, there are of course also new capabilities to be taken advantage off. One of those is an API for file versions and trash, which have been implemented in the upcoming release of our Android app! With the release of Beta 4 today, it is a good time to go over what was added, removed and changed in Nextcloud!

Help test beta 4!

With beta 4 out, we think we’ve caught most issues. There are a few more we plan to fix before the first release candidate gets published (see issue #10713) and we need your help to find out what else could cause problems!

Note that it is impossible to test every possible way in which users use Nextcloud and the main reason Nextcloud 13 has been so reliable is because many community members put in time to test it in their specific situation. If you want to guarantee a reliable, smooth upgrade to Nextcloud 14 for yourself, your best bet is to help us test now, so we can fix problems before the final release!

What is new for admins

Some changes will be visible to system administrators. We already hinted at a number of them in our blog about Swiftv3 support earlier this week and there is more. For one, Nextcloud 14 will support PHP 7.0, 7.1 and 7.2 (#7368) and we are working on supporting the upcoming 7.3 release as well. Other changes:

  • updated Nginx config: nextcloud/documentation#786
  • syslog tag was changed from ownCloud to Nextcloud#10048
  • when running occ maintenance:mode --on/--off and it was already in this state if will print Maintenance mode already enabled instead of the Maintenance mode enabled which was printed always before this change #10070
  • occ upgrade does not have the option --no-app-disable anymore (it is used for PHP 7+ anyways already) (#7955)
  • When using Swift Objectstore as home storage make sure that to set the bucket/container parameter. See #8793
  • mail_smtpmode can no longer be set to php. As this option is lost with the upgrade of phpmailer #9791
  • log format for exception was improved (no double nested JSON anymore) #8946
  • Recovery of encrypted files in case of lost password is now an OCC command instead of in the UI to avoid time-outs. #10718

Track version changes

For developers

There have been many changes, additions and deprecations. New is access to the versioning and trash features through our API, already prompting work for desktop and mobile clients to integrate these functions in upcoming releases. The upcoming Android client release will already support retrieving older versions of files and undo file deletions.

There is now support for the new and improved ARGON2I hashing algorithm and Federation 2.0 enables developers to support exchanging calendars, contacts, Talk calls, chat and other content between Nextcloud servers in app releases over the coming months. Below you can find the full list of what’s been added, changed and removed!

Changes

  • we will introduce type hinting for scalar types to our public API and fix according to the PHPDoc:
    • AppFramework\Http\Request::getHeader now really only returns string (and not null) anymore (#7813)
    • Security\ICrypto::decrypt now accepts strings only and also returns string only (#7825)
    • OCP\AppFramework\Utility\ITimeFactory is strictly typed now (#7838)
    • OCP\IL10N is strickly types which means that the t function expects an array (#8497 for a relaxed version

Structural changes:

  • Structure of the whole nextcloud instance has been revised: #9982
  • with-app-sidebar not required anymore to open the sidebar only use disappear on the sidebar
  • svg classe not required anymore
  • with-settingswith-icon not needed anymore

Changed behaviour:

  • apps that are enabled for groups can now provide public pages, that are available even if a user is not logged in – see #8593
  • OCS API method AddUser POST:/users now allow empty password iff email is set and valid #8856
  • email texts are not automatically escaped anymore in all cases #8026

Changed available dependencies:

  • $fromMailAddress will not be available anymore – just define it in your apps dependency container if you need it (#8336)

Changed public interfaces (that could be implemented by an app):

  • \OCP\Mail and the email templates got proper type hints: #8614
  • OCP\Authentication\TwoFactorAuth got typehints and return types: #8981
  • OCP\Migration\IMigrationStep has two new methods #9167 (covered if the apps use the abstract class SimpleMigrationStep which is the default)
  • OCA.Search is now OCA.Search.Core. New standard for global search #9912
  • EMailTemplate child classes should use the %$1s notation for replacements to be future compatible and be able to reuse parameters #10291

Added APIs:

  • OCS API got a details endpoint for the user list #8847
  • OCS API got a details endpoint for the groups list #8865

Deprecations

A series of API’s and pieces of our public interface have been removed. We generally announce plans to deprecate API elements XXX in advance

Removed from public interface:

  • several deprecated functions from OCP\AppFramework/IAppContainer (#7839)
  • OCP\Config (#7840)
  • search function from OCP\ISearch (#7842)
  • formatDate and generateRandomBytes from OCP\Util (#7843)
  • deprecated OCP constantes (#7844)
  • remove deprecated template functions from OCP directly (#7857)
  • several deprecated functions from OCP\Util (#8783) – sendMailencryptedFilesgetServerHostgetServerProtocolgetRequestUrigetScriptName
  • remove deprecated interface OCP\IHelper (#8784)
  • remove deprecated insertIfNotExist from OCP\DB (#8786)
  • remove more deprecated methods of OCP\DB(#8787) – insertidrollbackisError
  • remove some deprecated methods of OCP\Response (#8792)
  • removed deprecated HTTPHelper (#8804)
  • removed urlgenerator functions form OCP\Util (#8811)
  • removed deprecated OCP\Contacts (#8816)
  • removed deprecated OCP\BackgroundJob::registerJob (#8877)
  • removed deprecated OCP\Files::tmpFile and OCP\Files::tmpFolder (#8878)
  • removed deprecated OCP\JSON (#8943)
  • remove deprecated beginTransactioncommit and getErrorMessage from OCP\DB (#8914)
  • remove deprecated OCP\Response (#8918)
  • remove deprecated method OCP\User::getDisplayNames (#8919)
  • remove OCP\Share::resolveReshare (#8853)
  • removed deprecated OCP\DB (#8985)

Deprecated APIs:

  • OCP\Files is deprecated #8922
  • Setting custom client URLs in a custom OC_Theme class is deprecated, settings in config.php should be used #8994
  • OCS API getGroup method replaced by getGroupUsers #8904
  • log levels in OCP\Util are deprecated and moved to the ILogger interface #9308
  • OCP\AppFramework\Db\Mapper is deprecated move to OCP\AppFramework\Db\QBMapper #9444

Internals stuff:

  • cleanup of OC_* namespace – we removed quite some classes, methods and constants from our internal namespace. If it was used by any app in the App Store we notified the owner of that app. Keep in mind that using the OC_ namespace is not official supported and can break any time without notice. So better not use it in your app.
  • OC_Group_Backend got removed: #8988
  • OC_Response::setStatus and the constants for status codes have been removed #10009

That’s all?

It is a massive list, indeed. Nextcloud 14 makes a big leap forward, allowing app developers to build great new apps with better-than-ever integration in the rest of Nextcloud. This means apps have to be adjusted, and our team is opening issues and helping app developers do this right now. You can see some of the progress on github. If you are an app developer and need help, let us know! You can always ask for help in our changes-for-14 tracking issue, or ping us on IRC.

Start the discussion at the
Nextcloud forums

Go to Forums