From 946766891432331588dd83b1d50f0fde93ecca05 Mon Sep 17 00:00:00 2001 From: Peter Kokot Date: Mon, 25 Mar 2019 20:50:14 +0100 Subject: [PATCH 1/2] Add minimum required PHP version to run-tests.php This integrates a simple minimum PHP version check in the tool and to also define the minimum version that the tool syntax should support. --- run-tests.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/run-tests.php b/run-tests.php index a8dbd81c38ac..40ecbbc71fc3 100755 --- a/run-tests.php +++ b/run-tests.php @@ -57,6 +57,11 @@ function main() // Parallel testing global $workers, $workerID; + // Minimum required PHP version. + if (version_compare(phpversion(), '7.0.0', '<=')) { + error('At least PHP 7.0.0 is required to execute run-tests.php.'); + } + $workerID = 0; if (getenv("TEST_PHP_WORKER")) { $workerID = intval(getenv("TEST_PHP_WORKER")); From b33aceca21495bbc5b9445b37d96523d9ab1df75 Mon Sep 17 00:00:00 2001 From: Peter Kokot Date: Mon, 25 Mar 2019 21:22:43 +0100 Subject: [PATCH 2/2] [ci skip] php version check won't work ok. Use a simple comment instead --- run-tests.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/run-tests.php b/run-tests.php index 40ecbbc71fc3..58d10967a19c 100755 --- a/run-tests.php +++ b/run-tests.php @@ -29,6 +29,8 @@ /* Let there be no top-level code beyond this point: * Only functions and classes, thanks! + * + * Minimum required PHP version: 7.0.0 */ /** @@ -57,11 +59,6 @@ function main() // Parallel testing global $workers, $workerID; - // Minimum required PHP version. - if (version_compare(phpversion(), '7.0.0', '<=')) { - error('At least PHP 7.0.0 is required to execute run-tests.php.'); - } - $workerID = 0; if (getenv("TEST_PHP_WORKER")) { $workerID = intval(getenv("TEST_PHP_WORKER"));