Server: Critical changes for developers & admins for Nextcloud 14

Created on 12 Jan 2018  路  25Comments  路  Source: nextcloud/server

This ticket is to collect the critical changes for developers for Nextcloud 14.

  • PHP 7.0, 7.1 and 7.2 is supported (#7368)
  • 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 (https://github.com/nextcloud/server/pull/8476) - see also #8497 for a relaxed version

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) - sendMail, encryptedFiles, getServerHost, getServerProtocol, getRequestUri, getScriptName
  • remove deprecated interface OCP\IHelper (#8784)
  • remove deprecated insertIfNotExist from OCP\DB (#8786)
  • remove more deprecated methods of OCP\DB(#8787) - insertid, rollback, isError
  • 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 (#8879 & #8943)
  • remove deprecated beginTransaction, commit 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 (https://github.com/nextcloud/server/pull/8985)

Changed occ command interface:

  • occ upgrade does not have the option --no-app-disable anymore (it is used for PHP 7+ anyways already) (#7955)

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: https://github.com/nextcloud/server/pull/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

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-settings, with-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 config:

  • 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 https://github.com/nextcloud/server/pull/9791

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: https://github.com/nextcloud/server/pull/8988
  • OC_Response::setStatus and the constants for status codes have been removed #10009

Added APIs:

Deprecated APIs:

Changed outside facing stuff:

  • log format for exception was improved (no double nested JSON anymore) #8946

Admin:

  • 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
2. developing overview

All 25 comments

I put this on our forum so app devs can give input:
https://help.nextcloud.com/t/changes-coming-in-nc-14-time-to-prepare/27790/2

@jospoortvliet mind removing the actual changes, so we have only one place where we need to update stuff?

@jospoortvliet mind removing the actual changes, so we have only one place where we need to update stuff?

Fixed it in the forums.

We just added:

OCP\IL10N is strickly types which means that the t function expects an array (https://github.com/nextcloud/server/pull/8476) - see also #8497 for a relaxed version

But also check the OP to have the full list of changes we made so far.

OCP\Mail and the email templates got proper type hints: #8614

@MariusBluem We also need to update the "theme email template docs" then for 14 馃槈

apps that are enabled for groups can now provide public pages, that are available even if a user is not logged in - see #8593

@jospoortvliet Also something for the release notes.

  • several deprecated functions from OCP\Util (#8783) - sendMail, encryptedFiles, getServerHost, getServerProtocol, getRequestUri, getScriptName
  • remove deprecated interface OCP\IHelper (#8784)
  • remove deprecated insertIfNotExist from OCP\DB (#8786)
  • remove more deprecated methods of OCP\DB(#8787) - insertid, rollback, isError

Latest changes.

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.

Added a note about the private namespace

remove some deprecated methods of OCP\Response (#8792)

removed urlgenerator functions form OCP\Util (#8811)

remove deprecated OCP\Contacts (#8816)

  • removed deprecated OCP\BackgroundJob::registerJob (#8877)
  • removed deprecated OCP\Files::tmpFile and OCP\Files::tmpFolder (#8878)
  • removed deprecated OCP\JSON::encodedPrint, OCP\JSON:: setContentTypeHeader and OCP\JSON:: checkUserExists (#8879)

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

  • remove deprecated beginTransaction, commit and getErrorMessage from OCP\DB (#8914)
  • remove deprecated OCP\Response (#8918)
  • removed deprecated OCP\JSON (#8879 & #8943)
  • remove deprecated method OCP\User::getDisplayNames (#8919)
  • remove OCP\Share::resolveReshare (#8853)

Added from https://github.com/nextcloud/server/pull/8994

Blog posts about this right when 14 hit would have been great. I caught the one that just came out recently, and am just now realizing the OCP/DB's prepare is gone, meaning a rewrite of DB interactions. Can we start a process for blog posts on this early in the first beta?

Can we start a process for blog posts on this early in the first beta?

That was the plan, but somehow slipped through and was done quite late. Also as you can see we tried to reach out to people early if we found their projects on some hosting platform (we check GitHub and Gitlab and even emailed some).

Also the prepare statement was annotated with the deprecation text for 3 years now. Typically IDEs show this to you inline so that you are aware of this.

But sorry, that we missed to reach out to you :/ We try our best in the future.

@Fmstrat Also the plan is to have such an overview ticket for every major release to which developer could subscribe and get the information as soon as possible.

@morrisjobke That all sounds excellent! As for IDEs, I'm old school with vim in a terminal, so no real assistance there. 馃槈

It would also be great if there was one ticket for all releases that was locked down, then when you open a new ticket for the next release place a link in the master one. That way developers can subscribe to the master issue and not miss when the new one is created. Thanks!

It would also be great if there was one ticket for all releases that was locked down, then when you open a new ticket for the next release place a link in the master one. That way developers can subscribe to the master issue and not miss when the new one is created. Thanks!

We will have a look at this. Thanks for this valuable feedback.

For 14 this one is done. I will post here also the overview ticket that is planned and then we continue with this kind of ticket in 15.

@MorrisJobke Awesome, thank you! Posting the overview ticket here would be very helpful. I'll subscribe to that when it comes.

The Nextcloud 16 version of this is in #12915

Was this page helpful?
0 / 5 - 0 ratings