Repository navigation
Critical changes for developers & admins for Nextcloud 14 #7827
Copy link
Copy link
Closed
Labels
Milestone
Description
This ticket is to collect the critical changes for developers for Nextcloud 14.
- PHP 7.0, 7.1 and 7.2 is supported (PHP 7.0+ for Nextcloud 14 #7368)
- we will introduce type hinting for scalar types to our public API and fix according to the PHPDoc:
AppFramework\Http\Request::getHeadernow really only returns string (and notnull) anymore (Request->getHeader() should always return a string #7813)Security\ICrypto::decryptnow accepts strings only and also returns string only (Adds type hinting for scalar types in ICrypto->decrypt #7825)OCP\AppFramework\Utility\ITimeFactoryis strictly typed now (Make the ITimeFactory strict + return types #7838)OCP\IL10Nis strickly types which means that thetfunction expects an array (Make OCP\IL10N strict #8476) - see also Relax what t accepts so we don't break it all #8497 for a relaxed version
Removed from public interface
- several deprecated functions from
OCP\AppFramework/IAppContainer(Remove deprecated functions from DI Container #7839) OCP\Config(Remove deprecated \OCP\Config #7840)- search function from
OCP\ISearch(Removed deprecated search function from ISearch #7842) - formatDate and generateRandomBytes from
OCP\Util(Remove deprecated functions for OCP\Util #7843) - deprecated
OCPconstantes (Remove deprecated constants #7844) - remove deprecated template functions from OCP directly (Remove deprecated template functions from OCP directly #7857)
- several deprecated functions from
OCP\Util(Remove unused and deprecated methods from OCP\Util #8783) -sendMail,encryptedFiles,getServerHost,getServerProtocol,getRequestUri,getScriptName - remove deprecated interface
OCP\IHelper(Remove unused and deprecated class and interface AppHelper #8784) - remove deprecated
insertIfNotExistfromOCP\DB(Use insertIfNotExist of the new interface #8786) - remove more deprecated methods of
OCP\DB(Remove deprecated and unsused methods of OCP\DB #8787) -insertid,rollback,isError - remove some deprecated methods of
OCP\Response(Remove unused methods of OC_Response #8792) - removed deprecated HTTPHelper (Remove deprecated HTTPHelper #8804)
- removed urlgenerator functions form
OCP\Util(Remove deprecated URL functions for OCP\Util #8811) - removed deprecated
OCP\Contacts(Remove deprecated OCP\Contacts #8816) - removed deprecated
OCP\BackgroundJob::registerJob(Remove old deprecated function from the BackgroundJob #8877) - removed deprecated
OCP\Files::tmpFileandOCP\Files::tmpFolder(Remove deprecated tmpFile/tmpFolder #8878) - removed deprecated
OCP\JSON(Remove unused deprecated functions from OCP\JSON #8879 & Remove \OCP\JSON #8943) - remove deprecated
beginTransaction,commitandgetErrorMessagefromOCP\DB(Remove unused and deprecated methods of OCP\DB #8914) - remove deprecated
OCP\Response(Remove deprecated and unused OCP\Response #8918) - remove deprecated method
OCP\User::getDisplayNames(Remove deprecated and unused method OCP\User::getDisplayNames #8919) - remove
OCP\Share::resolveReshare(Remove unused resolveReshare of old sharing code #8853) - removed deprecated
OCP\DB(Cleanup ocp db #8985)
Changed occ command interface:
occ upgradedoes not have the option--no-app-disableanymore (it is used for PHP 7+ anyways already) (Remove not needed 3rdparty app disabling during upgrade for PHP 5.x #7955)
Changed available dependencies:
$fromMailAddresswill not be available anymore - just define it in your apps dependency container if you need it (Cleanup unused parameter #8336)
Changed public interfaces (that could be implemented by an app):
\OCP\Mailand the email templates got proper type hints: Make \OCP\Mail strict #8614OCP\Authentication\TwoFactorAuthgot typehints and return types: Strict 2FA #8981OCP\Migration\IMigrationStephas two new methods Add human readable description to migration steps #9167 (covered if the apps use the abstract classSimpleMigrationStepwhich is the default)OCA.Searchis nowOCA.Search.Core. New standard for global search New search standard and user search #9912EMailTemplatechild classes should use the%$1snotation for replacements to be future compatible and be able to reuse parameters EMailTemplate: Fix button background in Lotus Notes #10291
Structural changes:
- Structure of the whole nextcloud instance has been revised: Cleanup structure #9982
with-app-sidebarnot required anymore to open the sidebar only usedisappearon the sidebarsvgclasse not required anymorewith-settings,with-iconnot 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 Allow public page access to apps with group restrictions #8593
- OCS API method
AddUserPOST:/usersnow allow empty password iff email is set and valid Allow admin to create users without password by sending mail automatic… #8856 - email texts are not automatically escaped anymore in all cases Allow custom HTML in HTML Emails #8026
Changed config:
- When using Swift Objectstore as home storage make sure that to set the
bucket/containerparameter. See Swift usescontainternotbucket#8793 mail_smtpmodecan no longer be set tophp. As this option is lost with the upgrade of phpmailer Upgrade to swiftmailer-6 #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_Backendgot removed: Remove deprecated OC_Group_Backend #8988OC_Response::setStatusand the constants for status codes have been removed Replace hard coded HTTP status codes with proper calls to http_response_code #10009
Added APIs:
- OCS API got a details endpoint for the user list Add userdetails to ocs api #8847
- OCS API got a details endpoint for the groups list Return groups displayname in provisioning api #8865
Deprecated APIs:
OCP\Filesis deprecated Deprecated some methods of OCP\Files #8922- Setting custom client URLs in a custom
OC_Themeclass is deprecated, settings in config.php should be used Deprecate theme sync clients #8994 - OCS API
getGroupmethod replaced bygetGroupUsersApi: return users details by groups #8904 - log levels in
OCP\Utilare deprecated and moved to theILoggerinterface Move log constants to ILogger #9308 OCP\AppFramework\Db\Mapperis deprecated move toOCP\AppFramework\Db\QBMapperAdd a QueryBuilder based Mapper #9444
Changed outside facing stuff:
- log format for exception was improved (no double nested JSON anymore) Log exceptions as nested array instead of encoded json #8946
Admin:
- updated Nginx config: Use $request_uri instead of $uri in nginx config documentation#786
- syslog tag was changed from
ownCloudtoNextcloud: Systemd Logger #10048 - when running
occ maintenance:mode --on/--offand it was already in this state if will printMaintenance mode already enabledinstead of theMaintenance mode enabledwhich was printed always before this change Updates the maintenance command output #10070
Reactions are currently unavailable
Activity
jospoortvliet commentedon Feb 19, 2018
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
nickvergessen commentedon Feb 20, 2018
@jospoortvliet mind removing the actual changes, so we have only one place where we need to update stuff?
MorrisJobke commentedon Feb 20, 2018
Fixed it in the forums.
MorrisJobke commentedon Feb 22, 2018
We just added:
But also check the OP to have the full list of changes we made so far.
MorrisJobke commentedon Mar 5, 2018
@MariusBluem We also need to update the "theme email template docs" then for 14 😉
MorrisJobke commentedon Mar 8, 2018
@jospoortvliet Also something for the release notes.
MorrisJobke commentedon Mar 12, 2018
Latest changes.
MorrisJobke commentedon Mar 12, 2018
Added a note about the private namespace
MorrisJobke commentedon Mar 12, 2018
MorrisJobke commentedon Mar 14, 2018
MorrisJobke commentedon Mar 14, 2018
3 remaining items
MorrisJobke commentedon Mar 20, 2018
MorrisJobke commentedon Mar 21, 2018
MorrisJobke commentedon Mar 22, 2018
juliusknorr commentedon Mar 27, 2018
Added from #8994
Fmstrat commentedon Aug 17, 2018
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
prepareis gone, meaning a rewrite of DB interactions. Can we start a process for blog posts on this early in the first beta?MorrisJobke commentedon Aug 21, 2018
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.
MorrisJobke commentedon Aug 21, 2018
But sorry, that we missed to reach out to you :/ We try our best in the future.
MorrisJobke commentedon Aug 21, 2018
@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.
Fmstrat commentedon Aug 21, 2018
@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!
MorrisJobke commentedon Aug 21, 2018
We will have a look at this. Thanks for this valuable feedback.
MorrisJobke commentedon Aug 24, 2018
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.
Fmstrat commentedon Aug 24, 2018
@MorrisJobke Awesome, thank you! Posting the overview ticket here would be very helpful. I'll subscribe to that when it comes.
MorrisJobke commentedon Dec 7, 2018
The Nextcloud 16 version of this is in #12915