From afa8aa939ae0bf0c95e7ec69c7323678673a96c5 Mon Sep 17 00:00:00 2001 From: tianfenghan Date: Mon, 15 Jun 2026 16:25:54 +0800 Subject: [PATCH] =?UTF-8?q?fix(tests):=20=E4=BF=AE=E5=A4=8D=E6=B5=8B?= =?UTF-8?q?=E8=AF=95=E8=84=9A=E6=9C=AC=E4=B8=AD=E7=9A=84=E5=87=BD=E6=95=B0?= =?UTF-8?q?=E5=8F=82=E6=95=B0=E5=92=8C=E4=BF=A1=E6=81=AF=E8=BE=93=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 更新 swoole/phpx 依赖版本从 ~2.3.4 到 ~2.3.6 - 移除 write_information 函数中的 $phpdbg 参数 - 删除对 $php_cgi 和 $phpdbg 相关的信息收集逻辑 - 简化 PHP 版本信息输出,只显示基础 PHP 信息 - 清理全局变量引用,移除不再使用的变量 --- composer.json | 2 +- run-tests.php | 26 ++++---------------------- 2 files changed, 5 insertions(+), 23 deletions(-) diff --git a/composer.json b/composer.json index a10a4267..ff16a7ae 100644 --- a/composer.json +++ b/composer.json @@ -7,7 +7,7 @@ "marcj/topsort": "^2.0", "symfony/var-dumper": "^8.0", "symfony/yaml": "^8.0", - "swoole/phpx": "~2.3.4" + "swoole/phpx": "~2.3.6" }, "require-dev": { "phpunit/phpunit": "^10.4", diff --git a/run-tests.php b/run-tests.php index e9b7cb0b..acae634a 100755 --- a/run-tests.php +++ b/run-tests.php @@ -713,7 +713,7 @@ function main(): void } verify_config($php); - write_information($user_tests, $phpdbg); + write_information($user_tests); if ($test_cnt) { putenv('NO_INTERACTION=1'); @@ -822,9 +822,9 @@ function verify_config(string $php): void /** * @param string[] $user_tests */ -function write_information(array $user_tests, $phpdbg): void +function write_information(array $user_tests): void { - global $php, $php_cgi, $php_info, $ini_overwrites, $pass_options, $exts_to_test, $valgrind, $no_file_cache; + global $php, $php_info, $ini_overwrites, $pass_options, $exts_to_test, $valgrind, $no_file_cache; $php_escaped = escapeshellarg($php); // Get info from php @@ -844,24 +844,6 @@ More .INIs : " , (function_exists(\'php_ini_scanned_files\') ? str_replace("\n" $php_info = shell_exec("$php_escaped $pass_options $info_params $no_file_cache \"$info_file\""); define('TESTED_PHP_VERSION', shell_exec("$php_escaped -n -r \"echo PHP_VERSION;\"")); - if ($php_cgi && $php != $php_cgi) { - $php_cgi_escaped = escapeshellarg($php_cgi); - $php_info_cgi = shell_exec("$php_cgi_escaped $pass_options $info_params $no_file_cache -q \"$info_file\""); - $php_info_sep = "\n---------------------------------------------------------------------"; - $php_cgi_info = "$php_info_sep\nPHP : $php_cgi $php_info_cgi$php_info_sep"; - } else { - $php_cgi_info = ''; - } - - if ($phpdbg) { - $phpdbg_escaped = escapeshellarg($phpdbg); - $phpdbg_info = shell_exec("$phpdbg_escaped $pass_options $info_params $no_file_cache -qrr \"$info_file\""); - $php_info_sep = "\n---------------------------------------------------------------------"; - $phpdbg_info = "$php_info_sep\nPHP : $phpdbg $phpdbg_info$php_info_sep"; - } else { - $phpdbg_info = ''; - } - if (function_exists('opcache_invalidate')) { opcache_invalidate($info_file, true); } @@ -905,7 +887,7 @@ More .INIs : " , (function_exists(\'php_ini_scanned_files\') ? str_replace("\n" // Write test context information. echo " ===================================================================== -PHP : $php $php_info $php_cgi_info $phpdbg_info +PHP : $php $php_info CWD : " . TEST_PHP_SRCDIR . " Extra dirs : "; foreach ($user_tests as $test_dir) {