Skip to content

Commit fd02844

Browse files
committed
Require PHP 7.4 at least for running the build system
1 parent 76dccd8 commit fd02844

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

build/gen_stub.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@
1717
error_reporting(E_ALL);
1818
ini_set("precision", "-1");
1919

20+
if (PHP_VERSION_ID < 70400) {
21+
throw new Exception("The build system requires PHP 7.4 at least.\n");
22+
}
23+
2024
const PHP_70_VERSION_ID = 70000;
2125
const PHP_80_VERSION_ID = 80000;
2226
const PHP_81_VERSION_ID = 80100;

build/php.m4

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1900,8 +1900,8 @@ AC_DEFUN([PHP_PROG_PHP],[
19001900
set $php_version
19011901
IFS=$ac_IFS
19021902
php_version_num=`expr [$]{1:-0} \* 10000 + [$]{2:-0} \* 100 + [$]{3:-0}`
1903-
dnl Minimum supported version for gen_stubs.php is PHP 7.1.
1904-
if test "$php_version_num" -lt 70100; then
1903+
dnl Minimum supported version for gen_stubs.php is PHP 7.4.
1904+
if test "$php_version_num" -lt 70400; then
19051905
AC_MSG_RESULT([$php_version (too old)])
19061906
unset PHP
19071907
else

0 commit comments

Comments
 (0)