Browse Source

fix(PHP): Drop PHP 8.1 for Nextcloud 33

Signed-off-by: Joas Schilling <coding@schilljs.com>
pull/55507/head
Joas Schilling 1 week ago
parent
commit
122cd68d56
No known key found for this signature in database GPG Key ID: F72FA5B49FFA96B0
  1. 10
      apps/settings/lib/SetupChecks/PhpOutdated.php
  2. 4
      lib/versioncheck.php

10
apps/settings/lib/SetupChecks/PhpOutdated.php

@ -14,10 +14,10 @@ use OCP\SetupCheck\ISetupCheck;
use OCP\SetupCheck\SetupResult;
class PhpOutdated implements ISetupCheck {
public const DEPRECATED_PHP_VERSION = '8.1';
public const DEPRECATED_SINCE = '30';
public const FUTURE_REQUIRED_PHP_VERSION = '8.2';
public const FUTURE_REQUIRED_STARTING = '32';
public const DEPRECATED_PHP_VERSION = '8.2';
public const DEPRECATED_SINCE = '33';
public const FUTURE_REQUIRED_PHP_VERSION = '8.3';
public const FUTURE_REQUIRED_STARTING = '34';
public function __construct(
private IL10N $l10n,
@ -33,7 +33,7 @@ class PhpOutdated implements ISetupCheck {
}
public function run(): SetupResult {
if (PHP_VERSION_ID < 80200) {
if (PHP_VERSION_ID < 80300) {
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.', [
PHP_VERSION,
self::DEPRECATED_PHP_VERSION,

4
lib/versioncheck.php

@ -6,9 +6,9 @@ declare(strict_types=1);
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
// Show warning if a PHP version below 8.1 is used,
if (PHP_VERSION_ID < 80100) {
if (PHP_VERSION_ID < 80200) {
http_response_code(500);
echo 'This version of Nextcloud requires at least PHP 8.1<br/>';
echo 'This version of Nextcloud requires at least PHP 8.2<br/>';
echo 'You are currently running ' . PHP_VERSION . '. Please update your PHP version.';
exit(1);
}

Loading…
Cancel
Save