From 29cd50206cf4652f2fa88cae65d2f6e31921d666 Mon Sep 17 00:00:00 2001 From: Jerry Ma Date: Fri, 5 Jul 2024 14:35:51 +0800 Subject: [PATCH] Fix prefer-stable negative result in ghtar (#500) * Fix prefer-stable got opposite result * Add swoole tests and remove irrelevant tests --- src/SPC/store/Downloader.php | 2 +- src/globals/test-extensions.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/SPC/store/Downloader.php b/src/SPC/store/Downloader.php index 312a459c..b1e70c61 100644 --- a/src/SPC/store/Downloader.php +++ b/src/SPC/store/Downloader.php @@ -69,7 +69,7 @@ class Downloader retry: intval(getenv('SPC_RETRY_TIME') ? getenv('SPC_RETRY_TIME') : 0) ), true); - if (($source['prefer-stable'] ?? false) === true) { + if (($source['prefer-stable'] ?? false) === false) { $url = $data[0]['tarball_url']; } else { $id = 0; diff --git a/src/globals/test-extensions.php b/src/globals/test-extensions.php index 08bfb8fa..c16f11bf 100644 --- a/src/globals/test-extensions.php +++ b/src/globals/test-extensions.php @@ -19,8 +19,8 @@ $upx = true; // If you want to test your added extensions and libs, add below (comma separated, example `bcmath,openssl`). $extensions = match (PHP_OS_FAMILY) { - 'Linux', 'Darwin' => 'sockets,yaml', - 'Windows' => 'mbstring,pdo_sqlite,mbregex,bz2,sqlsrv,pdo_sqlsrv,yaml,zip,rar,apcu,swow', + 'Linux', 'Darwin' => 'sockets,yaml,swoole', + 'Windows' => 'mbstring,pdo_sqlite,mbregex,bz2,sqlsrv,pdo_sqlsrv,yaml', }; // If you want to test lib-suggests feature with extension, add them below (comma separated, example `libwebp,libavif`).