fix: make lsphp opcache conditional — not available for PHP 8.5
Some checks failed
CI / test WordOps (ubuntu-22.04) (push) Has been cancelled
CI / test WordOps (ubuntu-24.04) (push) Has been cancelled

lsphp85-opcache doesn't exist in the LiteSpeed repo (opcache is
bundled in the base lsphp85 package). Only add opcache as a
separate package for PHP 7.4-8.4.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-09 11:55:39 +01:00
parent 06352bbc30
commit eaa5a95168

View File

@@ -147,9 +147,13 @@ class WOVar():
short_ver = version_number.replace('.', '') short_ver = version_number.replace('.', '')
wo_module = ["common", "curl", "igbinary", wo_module = ["common", "curl", "igbinary",
"imagick", "intl", "memcached", "msgpack", "imagick", "intl", "memcached", "msgpack",
"mysql", "opcache", "pear", "redis", "mysql", "pear", "redis",
"snmp", "sqlite3", "tidy"] "snmp", "sqlite3", "tidy"]
# opcache is a separate package only on older PHP versions
if version_number in ('7.4', '8.0', '8.1', '8.2', '8.3', '8.4'):
wo_module.append("opcache")
# lsphp packages: lsphpXX, lsphpXX-common, lsphpXX-curl, etc. # lsphp packages: lsphpXX, lsphpXX-common, lsphpXX-curl, etc.
php_modules = ["lsphp{0}".format(short_ver)] php_modules = ["lsphp{0}".format(short_ver)]
php_modules.extend(["lsphp{0}-{1}".format(short_ver, module) for module in wo_module]) php_modules.extend(["lsphp{0}-{1}".format(short_ver, module) for module in wo_module])