Just FYI: I’ve made the jump to php8 and nextcloud is running fine with it.
Basically, I installed the php8 versions of the currently installed php7 packages with zypper. The missing php8-json package is not really missing: JSON seems to be built in in php8 nowadays.
The command I used was:
zypper in $(zypper se -i php7 | grep ^i | cut -d\| -f2 | sed 's/ //g;s/php7/php8/' | tr \\n ' ')
It reports 30 problems, with 30 solutions to deinstall the php7 package that will be replaced by its php8 counter part. So after pressing ‘1’ thirty times, zypper proceeds:
Resolving dependencies...
Resolving package dependencies...
The following 8 recommended packages were automatically selected:
php8-ctype php8-dom php8-iconv php8-openssl php8-sqlite php8-tokenizer php8-xmlreader php8-xmlwriter
The following 30 NEW packages are going to be installed:
php8 php8-bcmath php8-bz2 php8-cli php8-ctype php8-curl php8-dom php8-exif php8-fileinfo php8-fpm php8-gd php8-gettext php8-gmp php8-iconv php8-imagick
php8-intl php8-mbstring php8-mysql php8-opcache php8-openssl php8-pcntl php8-pdo php8-posix php8-redis php8-sqlite php8-tokenizer php8-xmlreader
php8-xmlwriter php8-zip php8-zlib
The following 31 packages are going to be REMOVED:
php7 php7-bcmath php7-bz2 php7-cli php7-ctype php7-curl php7-dom php7-exif php7-fileinfo php7-fpm php7-gd php7-gettext php7-gmp php7-iconv php7-imagick
php7-intl php7-json php7-mbstring php7-mysql php7-opcache php7-openssl php7-pcntl php7-pdo php7-posix php7-redis php7-sqlite php7-tokenizer php7-xmlreader
php7-xmlwriter php7-zip php7-zlib
30 new packages to install, 31 to remove.
A final error Installation has completed with error
can be ignored, because of Package 'php8-json' not found.
(I should have filtered out that package in my command).
Next, I had to update the following setting files with the modifications that I had in the corresponding php7 setting files:
/etc/php8/cli/php.ini
/etc/php8/fpm/php-fpm.conf
/etc/php8/fpm/php-fpm.d/www.conf
/etc/php8/fpm/php.ini
Restarting the nginx and php-fpm services revived nextcloud again.