PHP v7.4 vs v8.x

With the latest Nextcloud 25.0.2 update, I’m getting a gentle warning that PHP 7.4.33 needs to be updated. Is PHP 7.4 indeed “old”, as PHP: Supported Versions seems to indicate?

yes, this will become a global challenge for everyone running Debian Bullseye und using PHP package available via apt package manager. This is not dedicated to us. PHP 7.4 is the version available on Bullseye Debian -- Package Search Results -- php

8.x will become available on Bookworm or with 3rd party repositories only.

Something we are aware already. Our main developer is active on NC community as well. Let’s see how far we can get with this.

There’s kinda same problem with Home Assistant and Python.
They will drop support for Python 3.9 with version 2023.2, but Python 3.10 will be only available with Debian Bookworm.

Thx. Maybe someone will at some point provide a backport to help reduce the always-recurring pressure on upgrading things which by themselves work just fine.

No “pressure” from me anyway. I’m totally happy with the way things work today :slight_smile:

Note that Debian itself keeps up support for the PHP versions it ships with supported Debian versions, with security patches and bug fixes. And one of the major benefits of PHP 8.x, JIT, isn’t supported on ARM.

It has not yet ultimately been decided whether Nextcloud really drops support for PHP 7.4 with NC26, there are quite some voices against it, including mine, until Debian Bookworm has been released. We’ll see. In case, we’ll keep installing latest NC25 on Bullseye systems.

Luckily in case of Home Assistant, we use pyenv and are hence not bound to the Python version of the distro. I’ll keep Python 3.9 in place as long as possible, since, on ARMv6 and ARMv7 Bullseye systems, it allows the installation with much less dependencies (Rust compiler and others), but good to know that we need to switch with our January release… ah did it already now: v8.12 · MichaIng/DietPi@09dd869 · GitHub

1 Like

I have the same issues , updated to 25.0.2 I also getting this error but luckily I have backup eMMC and I can roll back to 25.0.1 until dietpi released the new image with new version php 8.1 / 8.2 .

AFAICT, it’s only a warning. Nextcloud 25.0.2 works fine with 7.4.33 - the msg I see is:

You are currently running PHP 7.4.33. Upgrade your PHP version to take advantage of performance and security updates provided by the PHP Group :arrow_upper_right: as soon as your distribution supports it.

Yes this is a warning only, not impacting any operation. Btw, Debian Bookworm will not be released before summer 2023 officially :wink:

But if you like to be on bleeding edge, for some SBC we have Bookworm testing images available already.

1 Like

Generally, take the admin panel warnings more as hints/suggestions. The ones left on DietPi installs about missing modules e.g. can be ignored as well, as long as you do not need the specific features they offer.

We will offer a guide or script for upgrading to Bookworm once Nextcloud 26 is released and if it really drops PHP 7.4 support (which has not yet been ultimately decided).


PHP 7.4 support has been dropped for Nextcloud 26 now: Drop PHP 7.4 on master by come-nc · Pull Request #34997 · nextcloud/server · GitHub

That’s bad news. Usually this should impact everyone, not only DietPi, running stock PHP from Debian Bullseye repository :frowning:

being a PHP dev myself (and new to DietPi), I was also wondering the same: version 7.4 is End Of Life, version 8.0 is already in a phase where it is only receiving security fixes, so version 8.1 is what it should be at.
But switching is not that easy as 8.1 will like break older php scripts that where running fine on version 7.x

My advise would be to have multiple php versions installed and that you then select which version to use per e.g. virtual host / directory

On my server i have scripts (like nextcloud) that require 8.x but also scripts that only run on 7.x so I set the version per script.

not something that would be easilly build in into DietPi (I think this is a to specific use case)

Indeed. However, Nextcloud does not yet required PHP 8.x, and NC25 will be supported until Oktober, so sufficient to upgrade to Bookworm and new PHP when Bookworm is released: Maintenance and Release Schedule · nextcloud/server Wiki · GitHub

But indeed many applications at least still show a bunch of deprecation warnings with PHP 8.2 or even earlier PHP 8.x versions. These however can be muted and do not affect operation. The other way round, PHP 8.2 complying syntax is fully backwards compatible to PHP 7, so developers of any serious PHP application are advised to add required type definitions etc to their code, for Debian users, within the hext half year.

So basically when using ordinary maintained PHP applications and having the ability to upgrade to Bookworm soon after its release, there shouldn’t be major issues staying with Debian’s native PHP version.

1 Like