Nextcloud 21 and php8

Hello fellow devs,

I’d like to give a little heads-up for the next release. This will be the first version where we can support the brand new php8. As exciting as this is, there are a few tiny thing that we had to adjust/fix in our code. Part of that was a large pack of dependency updates. While apps mostly use our OCP public API, there are traces of 3rdparty libraries in some apps, which could potentially cause issues.

As always we are trying our best at keeping the important changes in our dev docs, so please take a peak at App upgrade guide — Nextcloud latest Developer Manual latest documentation.

That page is under constant update right now, so also make sure to re-check it.

Also I would love to hear feedback about php8 and app development if anyone was eager and tried it already :slight_smile:

Cheers

4 Likes

FYI type constants are now also found in the OCP API. I’ll update the docs accordingly. Apps won’t have to use the Doctrine Type/Types class anymore.

Add our own db column types via the public API by ChristophWurst · Pull Request #25089 · nextcloud/server · GitHub for details of the change

Another important change will be that we are adding our own exception abstraction, just to be as independent of dbal as possible. That one is still pending and needs a review: Add our own DB exception abstraction by ChristophWurst · Pull Request #25091 · nextcloud/server · GitHub

1 Like

I seem to recall NextCloud 21 will also require MySQL 8. So, PHP 8 and MySQL 8, neither of which is available on my shared linux hosting and my hosting provider is unwilling, at this stage, to either provide a shared server on which these versions are installed nor update the existing server, for fear of disrupting other customers.

Will NextCloud work at all with MySQL 5.6.50 and PHP 7.2 or is it a lost cause with these versions?
I only use basic features (calendar, contacts, files, media and bookmarks) and my instance is very low usage, private in fact.

If I absolutely must have PHP 8 and MySQL 8, then, in order to continue to use the current version of NextCloud, I will have to change either hosting providers or upgrade to some form of VPS into which I can install these requirements, both of which, from my initial investigations, will involve additional cost per month.

I am sure I am not the only one facing these difficulties.

@lyallp please beware we are discussing a development topic here and not the overall support matrix of Nextcloud. But you are right, php7.2 was dropped for good reason and we also moved on with mysql.

So you either stay on an older release of Nextcloud and hope that your hoster eventually cares about updating an unmaintained and unpatched version of php, or you switch to a more trustworthy one right away.

1 Like

The good thing is that now that server is updated, app support for php8 seems really easy. Calendar, Mail and Two-Factor TOTP were successfully updated.

1 Like

@ChristophWurst Any idea WHEN nc21 (including the php8 support) will be available?
And since I can’t run my nc20 anymore (mistakenly already upgraded to php8): HOW can I upgrade my nc20 to nc21 when I cannot start the nc20 anymore (and therefor cannot start the upgrade-wizard in the web GUI)? Would an upgrade work with the occ commandline tool (even though it’s already php8)? Or is it possible to just pull some files and overwrite the old ones?

Please use ℹ️ Support - Nextcloud community for support questions, this is the developer section.