“Loading repository data…
Reading installed packages…
Package ‘php8-json’ not found.
Resolving package dependencies…
2 Problems:
Problem: the to be installed php8-imagick-3.7.0-lp154.16.1.x86_64 requires ‘php(api) = 20200930’, but this requirement cannot be provided
Problem: the to be installed php8-redis-5.3.7-bp154.2.1.x86_64 requires ‘php(api) = 20200930’, but this requirement cannot be provided”
So, there seem to be three issues:
Where is php8-json?
Where can I get a properly adapted php8-imagick package, using proper api version?
Where can I get a properly adapted php8-redis package, using proper api version?
Eventually someone else has already gone through this and could provide some help here which would be highly appreciated.
There is nothing “official” here. It is development repository used by developers. The packages become “official” when they are submitted to Leap or Tumbleweed. Besides, this project only contains php itself, not various modules.
php8-redis comes from standard Leap 15.4 repository and is built against php 8.0. Your command line does not specify repositories so zypper will pick the one with the highest versoin. It apparently decides to install php8 from devel:languages:php but php8-redis from standard Leap. Which implies that php8-redis does exist in devel:languages:php or has lower version. As for php8-imagick, we do not know where it comes from.
I’m so sorry that i hurt your fragile feelings. I was not aware that on Leap zypper lr -e - hurls another URL format than the basic zypper lr -d output
As I already said - this repository provides only php itself, but not any of the additional modules you tried to install. So, you ended up trying to install php 8.1 and a lot of modules built for php 8.0. I have no idea whether this will work (even for modules not explicitly requiring php 8.0). To find out where php8-imagick comes from, use zypper se -s php8-imagick.
You will need to find project that builds those modules for php 8.1 on Leap 15.4. Or more likely build them yourself.
Oviously my mistake has been to assume that all PHP packages that are available in the current stable version (PHP 7.4) will also be available in the current development version (PHP 8.0.28, 8.1.17 or 8.2.4). In fact this is only the case for PHP 8.0.28. For newer PHP versions, you are on your own.
After making myself somewhat more familiar with compiling and installing PHP packages, I have to admit it is not that hard–which immediately raises the question why those packages are missing in PHP 8.1 and 8.2 devel repos. Is this lazyness? Or a don’t care attitude? Seriously.
It just feels a bit strange to compile your own packages for a production system. Given that OwnCloud requires PHP8 these days and Redis is widely being used as an object cache for WordPress, openSUSE IMO is lagging behind with the PHP 7.4 default.
But I am now where I want to be–on the latest PHP version:
$ php -ver
PHP 8.2.4 (cli) (built: Mar 16 2023 12:00:00) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.2.4, Copyright (c) Zend Technologies
with Zend OPcache v8.2.4, Copyright (c), by Zend Technologies
$ php -m | tr '\n' ' '
[PHP Modules] bz2 Core ctype curl date dom exif fileinfo filter gd gettext hash iconv igbinary imagick intl json libxml mbstring msgpack mysqli mysqlnd openssl pcre PDO pdo_mysql pdo_sqlite Phar random redis Reflection session SimpleXML sodium SPL sqlite3 standard tokenizer xml xmlreader xmlwriter Zend OPcache zip zlib [Zend Modules] Zend OPcache