From 954b4c90e8f75ecd45c086956846a157e1ff8ea7 Mon Sep 17 00:00:00 2001 From: Sascha Greuel Date: Thu, 22 Oct 2026 12:48:49 +0200 Subject: [PATCH 1/2] Require patched PHP releases Require PHP 8.4.27+ or 8.5.12+ following the October 21 security releases addressing CVE-2026-109618 and CVE-2026-109619. Apply separate minimum versions for each supported PHP series across setup, runtime, and ACP checks. Update requirement messages accordingly. --- .../files/acp/templates/packageList.tpl | 2 +- ...PackageEnableUpgradeOverrideForm.class.php | 21 ++++++++++--------- .../lib/acp/page/SystemCheckPage.class.php | 8 +++++-- .../CheckSystemEnvironment.class.php | 7 +++++-- .../files/lib/system/WCFSetup.class.php | 8 +++++-- .../StatusMessageAcpDashboardBox.class.php | 7 +++++-- wcfsetup/install/lang/de.xml | 4 ++-- wcfsetup/install/lang/en.xml | 4 ++-- .../template/stepShowSystemRequirements.tpl | 2 +- wcfsetup/test.php | 15 +++++++------ 10 files changed, 48 insertions(+), 30 deletions(-) diff --git a/wcfsetup/install/files/acp/templates/packageList.tpl b/wcfsetup/install/files/acp/templates/packageList.tpl index 4d8224f7f71..11e99e324aa 100644 --- a/wcfsetup/install/files/acp/templates/packageList.tpl +++ b/wcfsetup/install/files/acp/templates/packageList.tpl @@ -54,7 +54,7 @@ {/hascontent} -{if !(80300 <= PHP_VERSION_ID && PHP_VERSION_ID <= 80599)} +{if !((80427 <= PHP_VERSION_ID && PHP_VERSION_ID <= 80499) || (80512 <= PHP_VERSION_ID && PHP_VERSION_ID <= 80599))} {lang}wcf.global.incompatiblePhpVersion{/lang} {/if} {foreach from=$taintedApplications item=$taintedApplication} diff --git a/wcfsetup/install/files/lib/acp/form/PackageEnableUpgradeOverrideForm.class.php b/wcfsetup/install/files/lib/acp/form/PackageEnableUpgradeOverrideForm.class.php index d725c3c8f24..5f54cf4d1e7 100644 --- a/wcfsetup/install/files/lib/acp/form/PackageEnableUpgradeOverrideForm.class.php +++ b/wcfsetup/install/files/lib/acp/form/PackageEnableUpgradeOverrideForm.class.php @@ -114,49 +114,50 @@ private function getIssuesPreventingUpgrade(): array /** * @return ?array{title: string, description: string} - * @phpstan-ignore return.unusedType */ private function checkMinimumPhpVersion(): ?array { - // Minimum: PHP 8.1.2 + // Minimum: PHP 8.4.27 or PHP 8.5.12 for the respective series. // @phpstan-ignore greaterOrEqual.alwaysTrue - if (\PHP_VERSION_ID >= 80102) { + if (\PHP_VERSION_ID >= 80427 && !(80500 <= \PHP_VERSION_ID && \PHP_VERSION_ID < 80512)) { return null; } - // @phpstan-ignore deadCode.unreachable if (WCF::getLanguage()->getFixedLanguageCode() === 'de') { return [ 'title' => 'Unzureichende PHP-Version', - 'description' => 'Es wird mindestens PHP 8.1.2 benötigt.', + 'description' => 'Es wird mindestens PHP 8.4.27 bzw. PHP 8.5.12 benötigt.', ]; } else { return [ 'title' => 'Insufficient PHP version', - 'description' => 'PHP 8.1.2 or newer is required.', + 'description' => 'PHP 8.4.27 or newer in the PHP 8.4 series, or PHP 8.5.12 or newer in the PHP 8.5 series is required.', ]; } } /** * @return ?array{title: string, description: string} + * @phpstan-ignore return.unusedType */ private function checkMaximumPhpVersion(): ?array { - // Maximum: PHP 8.4.x - if (\PHP_VERSION_ID < 80499) { + // Maximum: PHP 8.5.x + // @phpstan-ignore smallerOrEqual.alwaysTrue + if (\PHP_VERSION_ID <= 80599) { return null; } + // @phpstan-ignore deadCode.unreachable if (WCF::getLanguage()->getFixedLanguageCode() === 'de') { return [ 'title' => 'Inkompatible PHP-Version', - 'description' => 'Es wird nur PHP 8.1, 8.2, 8.3 oder 8.4 unterstützt.', + 'description' => 'Es wird nur PHP 8.4 oder 8.5 unterstützt.', ]; } else { return [ 'title' => 'Incompatible PHP version', - 'description' => 'Only PHP 8.1, 8.2, 8.3 or 8.4 are supported.', + 'description' => 'Only PHP 8.4 or 8.5 are supported.', ]; } } diff --git a/wcfsetup/install/files/lib/acp/page/SystemCheckPage.class.php b/wcfsetup/install/files/lib/acp/page/SystemCheckPage.class.php index 16fb1fd3914..1ac6fd9ac71 100644 --- a/wcfsetup/install/files/lib/acp/page/SystemCheckPage.class.php +++ b/wcfsetup/install/files/lib/acp/page/SystemCheckPage.class.php @@ -101,7 +101,7 @@ class SystemCheckPage extends AbstractPage * } */ public $phpVersions = [ - 'minimum' => '8.4.23', + 'minimum' => '8.4.27', 'deprecated' => [], 'sufficient' => ['8.4'], 'recommended' => ['8.5'], @@ -418,7 +418,11 @@ protected function validatePhpVersion() $comparePhpVersion = \preg_replace('/^(\d+\.\d+\.\d+).*$/', '\\1', $phpVersion); // Do not use the "raw" version, it usually contains a lot of noise. $this->results['php']['version']['value'] = $comparePhpVersion; - if (\version_compare($comparePhpVersion, $this->phpVersions['minimum']) >= 0) { + if ( + \version_compare($comparePhpVersion, $this->phpVersions['minimum']) >= 0 + && (\version_compare($comparePhpVersion, '8.5.0', '<') + || \version_compare($comparePhpVersion, '8.5.12', '>=')) + ) { $majorMinor = \preg_replace('~^(\d+\.\d+).*$~', '\\1', $phpVersion); foreach (['recommended', 'sufficient', 'deprecated'] as $type) { foreach ($this->phpVersions[$type] as $version) { diff --git a/wcfsetup/install/files/lib/http/middleware/CheckSystemEnvironment.class.php b/wcfsetup/install/files/lib/http/middleware/CheckSystemEnvironment.class.php index c8cee37341b..607bfd952ce 100644 --- a/wcfsetup/install/files/lib/http/middleware/CheckSystemEnvironment.class.php +++ b/wcfsetup/install/files/lib/http/middleware/CheckSystemEnvironment.class.php @@ -24,8 +24,11 @@ final class CheckSystemEnvironment implements MiddlewareInterface #[\Override] public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface { - // @phpstan-ignore smallerOrEqual.alwaysTrue, smallerOrEqual.alwaysTrue, booleanAnd.alwaysTrue - if (!(80400 <= \PHP_VERSION_ID && \PHP_VERSION_ID <= 80599)) { + // @phpstan-ignore smallerOrEqual.alwaysTrue, smallerOrEqual.alwaysTrue + if (!( + (80427 <= \PHP_VERSION_ID && \PHP_VERSION_ID <= 80499) + || (80512 <= \PHP_VERSION_ID && \PHP_VERSION_ID <= 80599) + )) { if (!RequestHandler::getInstance()->isACPRequest()) { return new HtmlResponse( (new HtmlErrorRenderer())->render( diff --git a/wcfsetup/install/files/lib/system/WCFSetup.class.php b/wcfsetup/install/files/lib/system/WCFSetup.class.php index afe23ed92e3..b7e789b6a5c 100644 --- a/wcfsetup/install/files/lib/system/WCFSetup.class.php +++ b/wcfsetup/install/files/lib/system/WCFSetup.class.php @@ -363,7 +363,8 @@ protected function showLicense(): ResponseInterface */ protected function showSystemRequirements(): ResponseInterface { - $phpVersionLowerBound = '8.4.23'; + $phpVersionLowerBound = '8.4.27'; + $phpVersion85LowerBound = '8.5.12'; $phpVersionUpperBound = '8.5.x'; $system = []; @@ -371,7 +372,9 @@ protected function showSystemRequirements(): ResponseInterface $system['phpVersion']['value'] = \PHP_VERSION; $comparePhpVersion = \preg_replace('/^(\d+\.\d+\.\d+).*$/', '\\1', $system['phpVersion']['value']); $system['phpVersion']['result'] = \version_compare($comparePhpVersion, $phpVersionLowerBound, '>=') - && \version_compare($comparePhpVersion, \str_replace('x', '999', $phpVersionUpperBound), '<='); + && \version_compare($comparePhpVersion, \str_replace('x', '999', $phpVersionUpperBound), '<=') + && (\version_compare($comparePhpVersion, '8.5.0', '<') + || \version_compare($comparePhpVersion, $phpVersion85LowerBound, '>=')); $system['x64']['result'] = \PHP_INT_SIZE === 8; @@ -433,6 +436,7 @@ protected function showSystemRequirements(): ResponseInterface 'system' => $system, 'nextStep' => 'configureDB', 'phpVersionLowerBound' => $phpVersionLowerBound, + 'phpVersion85LowerBound' => $phpVersion85LowerBound, 'phpVersionUpperBound' => $phpVersionUpperBound, ] ) diff --git a/wcfsetup/install/files/lib/system/acp/dashboard/box/StatusMessageAcpDashboardBox.class.php b/wcfsetup/install/files/lib/system/acp/dashboard/box/StatusMessageAcpDashboardBox.class.php index 96c66d6431e..c1691afeb03 100644 --- a/wcfsetup/install/files/lib/system/acp/dashboard/box/StatusMessageAcpDashboardBox.class.php +++ b/wcfsetup/install/files/lib/system/acp/dashboard/box/StatusMessageAcpDashboardBox.class.php @@ -80,8 +80,11 @@ private function getMessages(): array private function getBasicMessages(): array { $messages = []; - // @phpstan-ignore smallerOrEqual.alwaysTrue, smallerOrEqual.alwaysTrue, booleanAnd.alwaysTrue - if (!(80400 <= \PHP_VERSION_ID && \PHP_VERSION_ID <= 80599)) { + // @phpstan-ignore smallerOrEqual.alwaysTrue, smallerOrEqual.alwaysTrue + if (!( + (80427 <= \PHP_VERSION_ID && \PHP_VERSION_ID <= 80499) + || (80512 <= \PHP_VERSION_ID && \PHP_VERSION_ID <= 80599) + )) { $messages[] = new StatusMessage( StatusMessageType::Error, WCF::getLanguage()->getDynamicVariable('wcf.global.incompatiblePhpVersion') diff --git a/wcfsetup/install/lang/de.xml b/wcfsetup/install/lang/de.xml index 957e7001970..7320065ebec 100644 --- a/wcfsetup/install/lang/de.xml +++ b/wcfsetup/install/lang/de.xml @@ -2761,7 +2761,7 @@ Abschnitte dürfen nicht leer sein und nur folgende Zeichen enthalten: [a-z - + @@ -3951,7 +3951,7 @@ Dateianhänge: - + diff --git a/wcfsetup/install/lang/en.xml b/wcfsetup/install/lang/en.xml index 5ce7b52a45a..2b83ab158d2 100644 --- a/wcfsetup/install/lang/en.xml +++ b/wcfsetup/install/lang/en.xml @@ -2690,7 +2690,7 @@ If you have already bought the licenses for the listed apps, th - + @@ -3897,7 +3897,7 @@ Attachments: - + diff --git a/wcfsetup/setup/template/stepShowSystemRequirements.tpl b/wcfsetup/setup/template/stepShowSystemRequirements.tpl index 951922c3741..2670a2d8917 100644 --- a/wcfsetup/setup/template/stepShowSystemRequirements.tpl +++ b/wcfsetup/setup/template/stepShowSystemRequirements.tpl @@ -10,7 +10,7 @@
{lang}wcf.global.systemRequirements.element.required{/lang}
-
{$phpVersionLowerBound} – {$phpVersionUpperBound}
+
{$phpVersionLowerBound} – 8.4.x / {$phpVersion85LowerBound} – {$phpVersionUpperBound}
diff --git a/wcfsetup/test.php b/wcfsetup/test.php index 2f661766ace..2fdc25c0ad9 100644 --- a/wcfsetup/test.php +++ b/wcfsetup/test.php @@ -26,7 +26,8 @@ 'pdo_mysql', 'zlib', ]; -$phpVersionLowerBound = '8.4.23'; +$phpVersionLowerBound = '8.4.27'; +$phpVersion85LowerBound = '8.5.12'; $phpVersionUpperBound = '8.5.x'; $phrases = [ 'php_requirements' => [ @@ -38,8 +39,8 @@ 'en' => 'PHP version %s', ], 'php_version_failure' => [ - 'de' => 'Gefundene PHP-Version %s ist inkompatibel. PHP %s – %s wird benötigt.', - 'en' => 'PHP version %s is incompatible. PHP %s – %s is required.', + 'de' => 'Gefundene PHP-Version %s ist inkompatibel. PHP %s – 8.4.x / %s – %s wird benötigt.', + 'en' => 'PHP version %s is incompatible. PHP %s – 8.4.x / %s – %s is required.', ], 'php_x64_success' => [ 'de' => '64-Bit-Unterstützung', @@ -118,12 +119,14 @@ function getPhrase($phrase, array $values = []) } function checkPHPVersion() { - global $phpVersionLowerBound, $phpVersionUpperBound; + global $phpVersionLowerBound, $phpVersion85LowerBound, $phpVersionUpperBound; $comparePhpVersion = \preg_replace('/^(\d+\.\d+\.\d+).*$/', '\\1', \PHP_VERSION); return \version_compare($comparePhpVersion, $phpVersionLowerBound, '>=') - && \version_compare($comparePhpVersion, \str_replace('x', '999', $phpVersionUpperBound), '<='); + && \version_compare($comparePhpVersion, \str_replace('x', '999', $phpVersionUpperBound), '<=') + && (\version_compare($comparePhpVersion, '8.5.0', '<') + || \version_compare($comparePhpVersion, $phpVersion85LowerBound, '>=')); } function getMemoryLimit() { @@ -525,7 +528,7 @@ function checkTls()
  • -
  • +
  • From 5e37109a50b89056b9fdd144487bd91f51d09ae3 Mon Sep 17 00:00:00 2001 From: Sascha Greuel Date: Mon, 2 Nov 2026 22:51:23 +0100 Subject: [PATCH 2/2] Changes after review --- ...PackageEnableUpgradeOverrideForm.class.php | 21 +++++++-------- .../lib/acp/page/SystemCheckPage.class.php | 20 ++++++++------ .../CheckSystemEnvironment.class.php | 3 +-- .../files/lib/system/WCFSetup.class.php | 23 +++++++++------- .../StatusMessageAcpDashboardBox.class.php | 3 +-- wcfsetup/install/lang/de.xml | 4 +-- wcfsetup/install/lang/en.xml | 4 +-- .../template/stepShowSystemRequirements.tpl | 2 +- wcfsetup/test.php | 26 +++++++++++-------- 9 files changed, 57 insertions(+), 49 deletions(-) diff --git a/wcfsetup/install/files/lib/acp/form/PackageEnableUpgradeOverrideForm.class.php b/wcfsetup/install/files/lib/acp/form/PackageEnableUpgradeOverrideForm.class.php index 5f54cf4d1e7..d725c3c8f24 100644 --- a/wcfsetup/install/files/lib/acp/form/PackageEnableUpgradeOverrideForm.class.php +++ b/wcfsetup/install/files/lib/acp/form/PackageEnableUpgradeOverrideForm.class.php @@ -114,50 +114,49 @@ private function getIssuesPreventingUpgrade(): array /** * @return ?array{title: string, description: string} + * @phpstan-ignore return.unusedType */ private function checkMinimumPhpVersion(): ?array { - // Minimum: PHP 8.4.27 or PHP 8.5.12 for the respective series. + // Minimum: PHP 8.1.2 // @phpstan-ignore greaterOrEqual.alwaysTrue - if (\PHP_VERSION_ID >= 80427 && !(80500 <= \PHP_VERSION_ID && \PHP_VERSION_ID < 80512)) { + if (\PHP_VERSION_ID >= 80102) { return null; } + // @phpstan-ignore deadCode.unreachable if (WCF::getLanguage()->getFixedLanguageCode() === 'de') { return [ 'title' => 'Unzureichende PHP-Version', - 'description' => 'Es wird mindestens PHP 8.4.27 bzw. PHP 8.5.12 benötigt.', + 'description' => 'Es wird mindestens PHP 8.1.2 benötigt.', ]; } else { return [ 'title' => 'Insufficient PHP version', - 'description' => 'PHP 8.4.27 or newer in the PHP 8.4 series, or PHP 8.5.12 or newer in the PHP 8.5 series is required.', + 'description' => 'PHP 8.1.2 or newer is required.', ]; } } /** * @return ?array{title: string, description: string} - * @phpstan-ignore return.unusedType */ private function checkMaximumPhpVersion(): ?array { - // Maximum: PHP 8.5.x - // @phpstan-ignore smallerOrEqual.alwaysTrue - if (\PHP_VERSION_ID <= 80599) { + // Maximum: PHP 8.4.x + if (\PHP_VERSION_ID < 80499) { return null; } - // @phpstan-ignore deadCode.unreachable if (WCF::getLanguage()->getFixedLanguageCode() === 'de') { return [ 'title' => 'Inkompatible PHP-Version', - 'description' => 'Es wird nur PHP 8.4 oder 8.5 unterstützt.', + 'description' => 'Es wird nur PHP 8.1, 8.2, 8.3 oder 8.4 unterstützt.', ]; } else { return [ 'title' => 'Incompatible PHP version', - 'description' => 'Only PHP 8.4 or 8.5 are supported.', + 'description' => 'Only PHP 8.1, 8.2, 8.3 or 8.4 are supported.', ]; } } diff --git a/wcfsetup/install/files/lib/acp/page/SystemCheckPage.class.php b/wcfsetup/install/files/lib/acp/page/SystemCheckPage.class.php index 1ac6fd9ac71..3798fd32462 100644 --- a/wcfsetup/install/files/lib/acp/page/SystemCheckPage.class.php +++ b/wcfsetup/install/files/lib/acp/page/SystemCheckPage.class.php @@ -94,14 +94,14 @@ class SystemCheckPage extends AbstractPage /** * @var array{ - * minimum: string, + * minimum: list, * deprecated: list, * sufficient: list, * recommended: list, * } */ public $phpVersions = [ - 'minimum' => '8.4.27', + 'minimum' => ['8.4.27', '8.5.12'], 'deprecated' => [], 'sufficient' => ['8.4'], 'recommended' => ['8.5'], @@ -418,12 +418,16 @@ protected function validatePhpVersion() $comparePhpVersion = \preg_replace('/^(\d+\.\d+\.\d+).*$/', '\\1', $phpVersion); // Do not use the "raw" version, it usually contains a lot of noise. $this->results['php']['version']['value'] = $comparePhpVersion; - if ( - \version_compare($comparePhpVersion, $this->phpVersions['minimum']) >= 0 - && (\version_compare($comparePhpVersion, '8.5.0', '<') - || \version_compare($comparePhpVersion, '8.5.12', '>=')) - ) { - $majorMinor = \preg_replace('~^(\d+\.\d+).*$~', '\\1', $phpVersion); + $majorMinor = \preg_replace('~^(\d+\.\d+).*$~', '\\1', $phpVersion); + $minimumVersion = null; + foreach ($this->phpVersions['minimum'] as $version) { + if (\str_starts_with($version, $majorMinor . '.')) { + $minimumVersion = $version; + break; + } + } + + if ($minimumVersion !== null && \version_compare($comparePhpVersion, $minimumVersion) >= 0) { foreach (['recommended', 'sufficient', 'deprecated'] as $type) { foreach ($this->phpVersions[$type] as $version) { if ($majorMinor === $version) { diff --git a/wcfsetup/install/files/lib/http/middleware/CheckSystemEnvironment.class.php b/wcfsetup/install/files/lib/http/middleware/CheckSystemEnvironment.class.php index 607bfd952ce..466d4ba6a86 100644 --- a/wcfsetup/install/files/lib/http/middleware/CheckSystemEnvironment.class.php +++ b/wcfsetup/install/files/lib/http/middleware/CheckSystemEnvironment.class.php @@ -24,10 +24,9 @@ final class CheckSystemEnvironment implements MiddlewareInterface #[\Override] public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface { - // @phpstan-ignore smallerOrEqual.alwaysTrue, smallerOrEqual.alwaysTrue if (!( (80427 <= \PHP_VERSION_ID && \PHP_VERSION_ID <= 80499) - || (80512 <= \PHP_VERSION_ID && \PHP_VERSION_ID <= 80599) + || (80512 <= \PHP_VERSION_ID && \PHP_VERSION_ID <= 80599) // @phpstan-ignore smallerOrEqual.alwaysTrue )) { if (!RequestHandler::getInstance()->isACPRequest()) { return new HtmlResponse( diff --git a/wcfsetup/install/files/lib/system/WCFSetup.class.php b/wcfsetup/install/files/lib/system/WCFSetup.class.php index b7e789b6a5c..49297ef52b7 100644 --- a/wcfsetup/install/files/lib/system/WCFSetup.class.php +++ b/wcfsetup/install/files/lib/system/WCFSetup.class.php @@ -363,18 +363,23 @@ protected function showLicense(): ResponseInterface */ protected function showSystemRequirements(): ResponseInterface { - $phpVersionLowerBound = '8.4.27'; - $phpVersion85LowerBound = '8.5.12'; - $phpVersionUpperBound = '8.5.x'; + $minimumPhpVersions = ['8.4.27', '8.5.12']; $system = []; // php version $system['phpVersion']['value'] = \PHP_VERSION; $comparePhpVersion = \preg_replace('/^(\d+\.\d+\.\d+).*$/', '\\1', $system['phpVersion']['value']); - $system['phpVersion']['result'] = \version_compare($comparePhpVersion, $phpVersionLowerBound, '>=') - && \version_compare($comparePhpVersion, \str_replace('x', '999', $phpVersionUpperBound), '<=') - && (\version_compare($comparePhpVersion, '8.5.0', '<') - || \version_compare($comparePhpVersion, $phpVersion85LowerBound, '>=')); + $system['phpVersion']['result'] = false; + foreach ($minimumPhpVersions as $minimumVersion) { + $versionPrefix = \preg_replace('~\.\d+$~', '.', $minimumVersion); + if ( + \str_starts_with($comparePhpVersion, $versionPrefix) + && \version_compare($comparePhpVersion, $minimumVersion) >= 0 + ) { + $system['phpVersion']['result'] = true; + break; + } + } $system['x64']['result'] = \PHP_INT_SIZE === 8; @@ -435,9 +440,7 @@ protected function showSystemRequirements(): ResponseInterface [ 'system' => $system, 'nextStep' => 'configureDB', - 'phpVersionLowerBound' => $phpVersionLowerBound, - 'phpVersion85LowerBound' => $phpVersion85LowerBound, - 'phpVersionUpperBound' => $phpVersionUpperBound, + 'minimumPhpVersions' => $minimumPhpVersions, ] ) ); diff --git a/wcfsetup/install/files/lib/system/acp/dashboard/box/StatusMessageAcpDashboardBox.class.php b/wcfsetup/install/files/lib/system/acp/dashboard/box/StatusMessageAcpDashboardBox.class.php index c1691afeb03..d1cf8729010 100644 --- a/wcfsetup/install/files/lib/system/acp/dashboard/box/StatusMessageAcpDashboardBox.class.php +++ b/wcfsetup/install/files/lib/system/acp/dashboard/box/StatusMessageAcpDashboardBox.class.php @@ -80,10 +80,9 @@ private function getMessages(): array private function getBasicMessages(): array { $messages = []; - // @phpstan-ignore smallerOrEqual.alwaysTrue, smallerOrEqual.alwaysTrue if (!( (80427 <= \PHP_VERSION_ID && \PHP_VERSION_ID <= 80499) - || (80512 <= \PHP_VERSION_ID && \PHP_VERSION_ID <= 80599) + || (80512 <= \PHP_VERSION_ID && \PHP_VERSION_ID <= 80599) // @phpstan-ignore smallerOrEqual.alwaysTrue )) { $messages[] = new StatusMessage( StatusMessageType::Error, diff --git a/wcfsetup/install/lang/de.xml b/wcfsetup/install/lang/de.xml index 7320065ebec..9fed253f6d7 100644 --- a/wcfsetup/install/lang/de.xml +++ b/wcfsetup/install/lang/de.xml @@ -2761,7 +2761,7 @@ Abschnitte dürfen nicht leer sein und nur folgende Zeichen enthalten: [a-z - + @@ -3951,7 +3951,7 @@ Dateianhänge: - + diff --git a/wcfsetup/install/lang/en.xml b/wcfsetup/install/lang/en.xml index 2b83ab158d2..5da9ee1cfcf 100644 --- a/wcfsetup/install/lang/en.xml +++ b/wcfsetup/install/lang/en.xml @@ -2690,7 +2690,7 @@ If you have already bought the licenses for the listed apps, th - + @@ -3897,7 +3897,7 @@ Attachments: - + diff --git a/wcfsetup/setup/template/stepShowSystemRequirements.tpl b/wcfsetup/setup/template/stepShowSystemRequirements.tpl index 2670a2d8917..9ee7ef29f04 100644 --- a/wcfsetup/setup/template/stepShowSystemRequirements.tpl +++ b/wcfsetup/setup/template/stepShowSystemRequirements.tpl @@ -10,7 +10,7 @@
    {lang}wcf.global.systemRequirements.element.required{/lang}
    -
    {$phpVersionLowerBound} – 8.4.x / {$phpVersion85LowerBound} – {$phpVersionUpperBound}
    +
    {implode from=$minimumPhpVersions item=$minimumVersion}{$minimumVersion}+{/implode}
    diff --git a/wcfsetup/test.php b/wcfsetup/test.php index 2fdc25c0ad9..377a46b9c65 100644 --- a/wcfsetup/test.php +++ b/wcfsetup/test.php @@ -26,9 +26,7 @@ 'pdo_mysql', 'zlib', ]; -$phpVersionLowerBound = '8.4.27'; -$phpVersion85LowerBound = '8.5.12'; -$phpVersionUpperBound = '8.5.x'; +$minimumPhpVersions = ['8.4.27', '8.5.12']; $phrases = [ 'php_requirements' => [ 'de' => 'PHP', @@ -39,8 +37,8 @@ 'en' => 'PHP version %s', ], 'php_version_failure' => [ - 'de' => 'Gefundene PHP-Version %s ist inkompatibel. PHP %s – 8.4.x / %s – %s wird benötigt.', - 'en' => 'PHP version %s is incompatible. PHP %s – 8.4.x / %s – %s is required.', + 'de' => 'Gefundene PHP-Version %s ist inkompatibel. Eine der folgenden PHP-Versionen oder neuer innerhalb derselben Versionsreihe wird benötigt: %s.', + 'en' => 'PHP version %s is incompatible. One of the following PHP versions or newer within the same series is required: %s.', ], 'php_x64_success' => [ 'de' => '64-Bit-Unterstützung', @@ -119,14 +117,20 @@ function getPhrase($phrase, array $values = []) } function checkPHPVersion() { - global $phpVersionLowerBound, $phpVersion85LowerBound, $phpVersionUpperBound; + global $minimumPhpVersions; $comparePhpVersion = \preg_replace('/^(\d+\.\d+\.\d+).*$/', '\\1', \PHP_VERSION); + foreach ($minimumPhpVersions as $minimumVersion) { + $versionPrefix = \preg_replace('~\.\d+$~', '.', $minimumVersion); + if ( + \str_starts_with($comparePhpVersion, $versionPrefix) + && \version_compare($comparePhpVersion, $minimumVersion) >= 0 + ) { + return true; + } + } - return \version_compare($comparePhpVersion, $phpVersionLowerBound, '>=') - && \version_compare($comparePhpVersion, \str_replace('x', '999', $phpVersionUpperBound), '<=') - && (\version_compare($comparePhpVersion, '8.5.0', '<') - || \version_compare($comparePhpVersion, $phpVersion85LowerBound, '>=')); + return false; } function getMemoryLimit() { @@ -528,7 +532,7 @@ function checkTls()
  • -
  • +