Deprecate PHP8.0

PHP8.0 would stop receiving security support on 26 Nov 2023
 hence this deprecation. Next, is the eventual drop of PHP8.0 before its EOL.

This commit also updates the message type from INFO to WARNING if the php
 on file has reached its EOL.

See: https://www.php.net/supported-versions.php

Signed-off-by: fenn-cs <fenn25.fn@gmail.com>
This commit is contained in:
fenn-cs 2023-03-28 14:32:11 +01:00
parent 8ee52d35b8
commit 60a710c91c
3 changed files with 10 additions and 2 deletions

View file

@ -330,7 +330,7 @@ class CheckSetupController extends Controller {
* @return bool
*/
protected function isPhpOutdated(): bool {
return PHP_VERSION_ID < 80000;
return PHP_VERSION_ID < 80100;
}
/**

View file

@ -300,6 +300,14 @@
msg: t('core', 'You are currently running PHP {version}. Upgrade your PHP version to take advantage of {linkstart}performance and security updates provided by the PHP Group ↗{linkend} as soon as your distribution supports it.', { version: data.phpSupported.version })
.replace('{linkstart}', '<a target="_blank" rel="noreferrer noopener" class="external" href="https://secure.php.net/supported-versions.php">')
.replace('{linkend}', '</a>'),
type: OC.SetupChecks.MESSAGE_TYPE_WARNING
})
}
if (data.phpSupported && data.phpSupported.version.substr(0, 3) === '8.0') {
messages.push({
msg: t('core', 'PHP 8.0 is now deprecated in Nextcloud 27. Nextcloud 28 may require at least PHP 8.1. Please upgrade to {linkstart}one of the officially supported PHP versions provided by the PHP Group ↗{linkend} as soon as possible.')
.replace('{linkstart}', '<a target="_blank" rel="noreferrer noopener" class="external" href="https://secure.php.net/supported-versions.php">')
.replace('{linkend}', '</a>'),
type: OC.SetupChecks.MESSAGE_TYPE_INFO
})
}

View file

@ -877,7 +877,7 @@ describe('OC.SetupChecks tests', function() {
async.done(function( data, s, x ){
expect(data).toEqual([{
msg: 'You are currently running PHP 5.4.0. Upgrade your PHP version to take advantage of <a target="_blank" rel="noreferrer noopener" class="external" href="https://secure.php.net/supported-versions.php">performance and security updates provided by the PHP Group ↗</a> as soon as your distribution supports it.',
type: OC.SetupChecks.MESSAGE_TYPE_INFO
type: OC.SetupChecks.MESSAGE_TYPE_WARNING
}]);
done();
});