Skip to content

Commit dda2275

Browse files
authored
Merge pull request #50735 from nextcloud/bugfix/noid/bump-php-dependency-update-versions
fix(setupcheck): Update setup check for PHP version to be more accurate
2 parents 402f512 + 0a6eeb4 commit dda2275

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

apps/settings/lib/SetupChecks/PhpOutdated.php

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@
1414
use OCP\SetupCheck\SetupResult;
1515

1616
class PhpOutdated implements ISetupCheck {
17+
public const DEPRECATED_PHP_VERSION = '8.1';
18+
public const DEPRECATED_SINCE = '30';
19+
public const FUTURE_REQUIRED_PHP_VERSION = '8.2';
20+
public const FUTURE_REQUIRED_STARTING = '32';
21+
1722
public function __construct(
1823
private IL10N $l10n,
1924
) {
@@ -29,7 +34,13 @@ public function getName(): string {
2934

3035
public function run(): SetupResult {
3136
if (PHP_VERSION_ID < 80200) {
32-
return SetupResult::warning($this->l10n->t('You are currently running PHP %s. PHP 8.1 is now deprecated in Nextcloud 30. Nextcloud 31 may require at least PHP 8.2. Please upgrade to one of the officially supported PHP versions provided by the PHP Group as soon as possible.', [PHP_VERSION]), 'https://secure.php.net/supported-versions.php');
37+
return SetupResult::warning($this->l10n->t('You are currently running PHP %1$s. PHP %2$s is deprecated since Nextcloud %3$s. Nextcloud %4$s may require at least PHP %5$s. Please upgrade to one of the officially supported PHP versions provided by the PHP Group as soon as possible.', [
38+
PHP_VERSION,
39+
self::DEPRECATED_PHP_VERSION,
40+
self::DEPRECATED_SINCE,
41+
self::FUTURE_REQUIRED_STARTING,
42+
self::FUTURE_REQUIRED_PHP_VERSION,
43+
]), 'https://secure.php.net/supported-versions.php');
3344
}
3445
return SetupResult::success($this->l10n->t('You are currently running PHP %s.', [PHP_VERSION]));
3546
}

0 commit comments

Comments
 (0)