Skip to content

Commit 6ea6132

Browse files
committed
Update check for outdated php version.
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
1 parent baf386b commit 6ea6132

File tree

2 files changed

+7
-20
lines changed

2 files changed

+7
-20
lines changed

apps/settings/lib/Controller/CheckSetupController.php

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -257,27 +257,14 @@ private function isUsedTlsLibOutdated() {
257257
return '';
258258
}
259259

260-
/**
261-
* Whether the version is outdated
262-
*
263-
* @return bool
264-
*/
265-
protected function isPhpOutdated() {
266-
if (version_compare(PHP_VERSION, '7.1.0', '<')) {
267-
return true;
268-
}
269-
270-
return false;
271-
}
272-
273260
/**
274261
* Whether the php version is still supported (at time of release)
275262
* according to: https://secure.php.net/supported-versions.php
276263
*
277264
* @return array
278265
*/
279266
private function isPhpSupported() {
280-
return ['eol' => $this->isPhpOutdated(), 'version' => PHP_VERSION];
267+
return ['eol' => PHP_VERSION_ID < 70300, 'version' => PHP_VERSION];
281268
}
282269

283270
/**

core/js/setupchecks.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -263,17 +263,17 @@
263263
type: OC.SetupChecks.MESSAGE_TYPE_WARNING
264264
});
265265
}
266-
if(data.phpSupported && data.phpSupported.eol) {
266+
if (data.phpSupported && data.phpSupported.eol) {
267267
messages.push({
268-
msg: t('core', 'You are currently running PHP {version}. Upgrade your PHP version to take advantage of <a target="_blank" rel="noreferrer noopener" href="{phpLink}">performance and security updates provided by the PHP Group</a> as soon as your distribution supports it.', {version: data.phpSupported.version, phpLink: 'https://secure.php.net/supported-versions.php'}),
268+
msg: t('core', 'You are currently running PHP {version}. Upgrade your PHP version to take advantage of <a target="_blank" rel="noreferrer noopener" href="{phpLink}">performance and security updates provided by the PHP Group</a> as soon as your distribution supports it.', { version: data.phpSupported.version, phpLink: 'https://secure.php.net/supported-versions.php' }),
269269
type: OC.SetupChecks.MESSAGE_TYPE_INFO
270-
});
270+
})
271271
}
272-
if(data.phpSupported && data.phpSupported.version.substr(0, 3) === '5.6') {
272+
if (data.phpSupported && data.phpSupported.version.substr(0, 3) === '7.2') {
273273
messages.push({
274-
msg: t('core', 'You are currently running PHP 5.6. The current major version of Nextcloud is the last that is supported on PHP 5.6. It is recommended to upgrade the PHP version to 7.0+ to be able to upgrade to Nextcloud 14.'),
274+
msg: t('core', 'Nextcloud 19 is the last release supporting PHP 7.2. Nextcloud 20 requires at least PHP 7.3.'),
275275
type: OC.SetupChecks.MESSAGE_TYPE_INFO
276-
});
276+
})
277277
}
278278
if(!data.forwardedForHeadersWorking) {
279279
messages.push({

0 commit comments

Comments
 (0)