Show 64-bit recommendation in check requirements CLI and server info page

This commit is contained in:
Jan Böhmer 2024-03-09 00:23:18 +01:00
parent cb7be460d7
commit 1e6065f732
3 changed files with 18 additions and 0 deletions

View file

@ -76,6 +76,17 @@ class CheckRequirementsCommand extends Command
$io->success('PHP version is sufficient.');
}
//Checking 32-bit system
if (PHP_INT_SIZE === 4) {
$io->warning('You are using a 32-bit system. You will have problems with working with dates after the year 2038, therefore a 64-bit system is recommended.');
} elseif (PHP_INT_SIZE === 8) {
if (!$only_issues) {
$io->success('You are using a 64-bit system.');
}
} else {
$io->warning('You are using a system with an unknown bit size. That is interesting xD');
}
//Check if opcache is enabled
if ($io->isVerbose()) {
$io->comment('Checking Opcache...');

View file

@ -77,6 +77,7 @@ class ToolsController extends AbstractController
'php_version' => PHP_VERSION,
'php_uname' => php_uname('a'),
'php_sapi' => PHP_SAPI,
'php_bit_size' => PHP_INT_SIZE * 8,
'php_extensions' => [...get_loaded_extensions()],
'php_opcache_enabled' => ini_get('opcache.enable'),
'php_upload_max_filesize' => ini_get('upload_max_filesize'),