From fd02844e38f18ed726732ebbee77ac5cad23c7b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1t=C3=A9=20Kocsis?= Date: Sat, 10 Sep 2022 09:20:59 +0200 Subject: [PATCH 1/4] Require PHP 7.4 at least for running the build system --- build/gen_stub.php | 4 ++++ build/php.m4 | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/build/gen_stub.php b/build/gen_stub.php index 985ba59b766b2..c36f70f0d4318 100755 --- a/build/gen_stub.php +++ b/build/gen_stub.php @@ -17,6 +17,10 @@ error_reporting(E_ALL); ini_set("precision", "-1"); +if (PHP_VERSION_ID < 70400) { + throw new Exception("The build system requires PHP 7.4 at least.\n"); +} + const PHP_70_VERSION_ID = 70000; const PHP_80_VERSION_ID = 80000; const PHP_81_VERSION_ID = 80100; diff --git a/build/php.m4 b/build/php.m4 index fb28f462396fc..56f66b92e47e3 100644 --- a/build/php.m4 +++ b/build/php.m4 @@ -1900,8 +1900,8 @@ AC_DEFUN([PHP_PROG_PHP],[ set $php_version IFS=$ac_IFS php_version_num=`expr [$]{1:-0} \* 10000 + [$]{2:-0} \* 100 + [$]{3:-0}` - dnl Minimum supported version for gen_stubs.php is PHP 7.1. - if test "$php_version_num" -lt 70100; then + dnl Minimum supported version for gen_stubs.php is PHP 7.4. + if test "$php_version_num" -lt 70400; then AC_MSG_RESULT([$php_version (too old)]) unset PHP else From 07f7b14bc12dfd0429d22a1cfdb2b61b124cc3f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1t=C3=A9=20Kocsis?= Date: Sat, 10 Sep 2022 13:58:14 +0200 Subject: [PATCH 2/4] Remove pointless PHP version check --- build/gen_stub.php | 4 ---- 1 file changed, 4 deletions(-) diff --git a/build/gen_stub.php b/build/gen_stub.php index c36f70f0d4318..985ba59b766b2 100755 --- a/build/gen_stub.php +++ b/build/gen_stub.php @@ -17,10 +17,6 @@ error_reporting(E_ALL); ini_set("precision", "-1"); -if (PHP_VERSION_ID < 70400) { - throw new Exception("The build system requires PHP 7.4 at least.\n"); -} - const PHP_70_VERSION_ID = 70000; const PHP_80_VERSION_ID = 80000; const PHP_81_VERSION_ID = 80100; From 95c6f29c8e8372f00bf23b8a1dbf5cf960dfdf74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1t=C3=A9=20Kocsis?= Date: Sat, 10 Sep 2022 13:59:03 +0200 Subject: [PATCH 3/4] Fix typo --- build/php.m4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/php.m4 b/build/php.m4 index 56f66b92e47e3..637b2a180160f 100644 --- a/build/php.m4 +++ b/build/php.m4 @@ -1900,7 +1900,7 @@ AC_DEFUN([PHP_PROG_PHP],[ set $php_version IFS=$ac_IFS php_version_num=`expr [$]{1:-0} \* 10000 + [$]{2:-0} \* 100 + [$]{3:-0}` - dnl Minimum supported version for gen_stubs.php is PHP 7.4. + dnl Minimum supported version for gen_stub.php is PHP 7.4. if test "$php_version_num" -lt 70400; then AC_MSG_RESULT([$php_version (too old)]) unset PHP From 73658c3f64716526ca0c5b6687a88703a43a4238 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1t=C3=A9=20Kocsis?= Date: Sat, 10 Sep 2022 18:27:47 +0200 Subject: [PATCH 4/4] Add change log entry --- UPGRADING.INTERNALS | 2 ++ 1 file changed, 2 insertions(+) diff --git a/UPGRADING.INTERNALS b/UPGRADING.INTERNALS index 6b5fe08f7e5dd..e122bb0e67ec7 100644 --- a/UPGRADING.INTERNALS +++ b/UPGRADING.INTERNALS @@ -62,6 +62,8 @@ PHP 8.2 INTERNALS UPGRADE NOTES 2. Build system changes ======================== +* The build system now requires PHP 7.4.0 at least. Previously PHP 7.1 was + required. * Unsupported libxml2 2.10.0 symbols are no longer exported on Windows. * Identifier names for namespaced functions generated from stub files through gen_stub.php have been changed. This requires that namespaced functions