From aa61a9e77b64937be70eb0a2747c19aa34881e31 Mon Sep 17 00:00:00 2001 From: DubbleClick Date: Tue, 17 Jun 2025 14:01:53 +0700 Subject: [PATCH] extra info on ext load failure --- src/SPC/builder/Extension.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/SPC/builder/Extension.php b/src/SPC/builder/Extension.php index d0448389..7a68ad09 100644 --- a/src/SPC/builder/Extension.php +++ b/src/SPC/builder/Extension.php @@ -264,9 +264,12 @@ class Extension // If you need to run some check, overwrite this or add your assert in src/globals/ext-tests/{extension_name}.php // If check failed, throw RuntimeException $sharedExtensions = $this->getSharedExtensionLoadString(); - [$ret] = shell()->execWithResult(BUILD_BIN_PATH . '/php -n' . $sharedExtensions . ' --ri "' . $this->getDistName() . '"'); + [$ret, $out] = shell()->execWithResult(BUILD_BIN_PATH . '/php -n' . $sharedExtensions . ' --ri "' . $this->getDistName() . '"'); if ($ret !== 0) { - throw new RuntimeException('extension ' . $this->getName() . ' failed compile check: php-cli returned ' . $ret); + throw new RuntimeException( + 'extension ' . $this->getName() . ' failed runtime check: php-cli returned ' . $ret . "\n" . + join("\n", $out) + ); } if (file_exists(ROOT_DIR . '/src/globals/ext-tests/' . $this->getName() . '.php')) {