Officially support PHP 7.2.0.

SVN:trunk[5888]
This commit is contained in:
Denis Flaven
2018-06-15 16:37:11 +00:00
parent f132d751f5
commit 8943a67f85
5 changed files with 19 additions and 3 deletions

View File

@@ -1360,6 +1360,12 @@ class Config
throw new ConfigException('Error in configuration file',
array('file' => $sConfigFile, 'error' => $e->getMessage()));
}
catch(Error $e)
{
// PHP 7
throw new ConfigException('Error in configuration file',
array('file' => $sConfigFile, 'error' => $e->getMessage().' at line '.$e->getLine()));
}
if (strlen($sNoise) > 0)
{
// Note: sNoise is an html output, but so far it was ok for me (e.g. showing the entire call stack)

View File

@@ -46,7 +46,7 @@ function TestConfig($sContents, $oP)
catch (Error $e)
{
// ParseError only thrown in PHP7
throw new Exception('Error in configuration: '.$e->getMessage());
throw new Exception('Error in configuration: '.$e->getMessage().' at line '.$e->getLine());
}
if (strlen($sNoise) > 0)
{

View File

@@ -448,6 +448,11 @@ class iTopExtensionsMap
SetupPage::log_warning("Eval of $sModuleFile did not return the expected information...");
}
}
catch(ParseError $e)
{
// Continue...
SetupPage::log_warning("Eval of $sModuleFile caused a parse error: ".$e->getMessage()." at line ".$e->getLine());
}
catch(Exception $e)
{
// Continue...
@@ -1348,4 +1353,4 @@ class iTopExtensionsMap
),
);
}
}
}

View File

@@ -465,6 +465,11 @@ class ModuleDiscovery
//echo "<p>Done.</p>\n";
}
catch(ParseError $e)
{
// PHP 7
SetupPage::log_warning("Eval of $sRelDir/$sFile caused an exception: ".$e->getMessage()." at line ".$e->getLine());
}
catch(Exception $e)
{
// Continue...

View File

@@ -56,7 +56,7 @@ class SetupUtils
const PHP_NEXT_MIN_VERSION = ''; // no new PHP requirement for now in iTop 2.6
const MYSQL_NEXT_MIN_VERSION = ''; // no new MySQL requirement for now in iTop 2.6
// -- First recent version that is not yet validated by Combodo (warning)
const PHP_NOT_VALIDATED_VERSION = '7.2.0';
const PHP_NOT_VALIDATED_VERSION = '7.3.0';
const MIN_MEMORY_LIMIT = 33554432; // 32 * 1024 * 1024 - we can use expressions in const since PHP 5.6 but we are in the setup !
const SUHOSIN_GET_MAX_VALUE_LENGTH = 2048;