mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-13 07:24:13 +01:00
Adjust php setup requirement to version 7.2.5.
Improve test error message.
This commit is contained in:
@@ -94,17 +94,17 @@ class CheckResult {
|
||||
class SetupUtils
|
||||
{
|
||||
// -- Minimum versions (requirements : forbids installation if not met)
|
||||
const PHP_MIN_VERSION = '7.1.3'; // 7 will be supported until the end of 2019 (see http://php.net/supported-versions.php)
|
||||
const MYSQL_MIN_VERSION = '5.7.0'; // 5.6 is no longer supported
|
||||
const PHP_MIN_VERSION = '7.2.5'; // 7 will be supported until the end of 2019 (see http://php.net/supported-versions.php)
|
||||
const MYSQL_MIN_VERSION = '5.7.0'; // 5.6 is no longer supported
|
||||
const MYSQL_NOT_VALIDATED_VERSION = ''; // MySQL 8 is now OK (N°2010 in 2.7.0) but has no query cache so mind the perf on large volumes !
|
||||
|
||||
// -- versions that will be the minimum in next iTop major release (warning if not met)
|
||||
const PHP_NEXT_MIN_VERSION = '7.4.0'; // Allow us to use more modern libs / code; will be default PHP version on main Linux distrib LTS
|
||||
const PHP_NEXT_MIN_VERSION = '7.4.0'; // Allow us to use more modern libs / code; will be default PHP version on main Linux distrib LTS
|
||||
const MYSQL_NEXT_MIN_VERSION = ''; // no new MySQL requirement for next iTop version
|
||||
// -- First recent version that is not yet validated by Combodo (warning)
|
||||
const PHP_NOT_VALIDATED_VERSION = '8.0.0';
|
||||
|
||||
const MIN_MEMORY_LIMIT = '32M';
|
||||
const MIN_MEMORY_LIMIT = '32M';
|
||||
const SUHOSIN_GET_MAX_VALUE_LENGTH = 2048;
|
||||
|
||||
/**
|
||||
|
||||
@@ -135,9 +135,12 @@ class SetupUtilsTest extends ItopTestCase
|
||||
if (file_exists(APPROOT.'composer.json')) {
|
||||
$oComposerConfig = json_decode(file_get_contents(APPROOT.'composer.json'));
|
||||
// Platform/PHP must be set to the minimum to ensure dependancies are compatible with the min. version
|
||||
$this->assertEquals($sPHPMinVersion, $oComposerConfig->config->platform->php, "Composer/Platform/PHP");
|
||||
$sComposerPlatformPhp = $oComposerConfig->config->platform->php;
|
||||
$this->assertEquals($sPHPMinVersion, $oComposerConfig->config->platform->php, "SetupUtils::PHP_MIN_VERSION ($sPHPMinVersion) is not equals composer.json > config > platform ($sComposerPlatformPhp)");
|
||||
// Require/PHP must be set to the supported PHP versions range in order to keep our package constraints up-to-date
|
||||
$this->assertEquals(">=$sPHPMinVersion <$sPHPNotValidatedVersion", $oComposerConfig->require->php, "Composer/Require/PHP");
|
||||
$sComposerRequirePhp = $oComposerConfig->require->php;
|
||||
$this->assertEquals(">=$sPHPMinVersion <$sPHPNotValidatedVersion", $oComposerConfig->require->php,
|
||||
"SetupUtils::PHP_MIN_VERSION ($sPHPMinVersion) and SetupUtils::PHP_NOT_VALIDATED_VERSION ($sPHPNotValidatedVersion) is not equals composer.json > require > php ($sComposerRequirePhp)");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user