Skip to content

Commit 0bc143c

Browse files
authored
Fix windows curl build >= 8.3 (#660)
* Test windows curl * Test windows curl * Fix windows curl build for PHP 8.3 and 8.4
1 parent 8a4ba7a commit 0bc143c

File tree

3 files changed

+11
-9
lines changed

3 files changed

+11
-9
lines changed

config/lib.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
"libcurl.a"
6969
],
7070
"static-libs-windows": [
71-
"libcurl.lib"
71+
"libcurl_a.lib"
7272
],
7373
"headers": [
7474
"curl"

src/SPC/builder/windows/library/curl.php

+2
Original file line numberDiff line numberDiff line change
@@ -48,5 +48,7 @@ protected function build(): void
4848
$this->builder->makeSimpleWrapper('cmake'),
4949
"--build cmakebuild --config Release --target install -j{$this->builder->concurrency}"
5050
);
51+
// move libcurl.lib to libcurl_a.lib
52+
rename(BUILD_LIB_PATH . '\libcurl.lib', BUILD_LIB_PATH . '\libcurl_a.lib');
5153
}
5254
}

src/globals/test-extensions.php

+8-8
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,18 @@
1313

1414
// test php version
1515
$test_php_version = [
16-
// '8.1',
17-
// '8.2',
16+
'8.1',
17+
'8.2',
1818
'8.3',
1919
'8.4',
2020
];
2121

2222
// test os (macos-13, macos-14, ubuntu-latest, windows-latest are available)
2323
$test_os = [
24-
'macos-13',
25-
'macos-14',
26-
'ubuntu-latest',
27-
// 'windows-latest',
24+
// 'macos-13',
25+
// 'macos-14',
26+
// 'ubuntu-latest',
27+
'windows-latest',
2828
];
2929

3030
// whether enable thread safe
@@ -41,13 +41,13 @@
4141
// If you want to test your added extensions and libs, add below (comma separated, example `bcmath,openssl`).
4242
$extensions = match (PHP_OS_FAMILY) {
4343
'Linux', 'Darwin' => 'gd',
44-
'Windows' => 'bcmath',
44+
'Windows' => 'bz2,ctype,curl,dom,filter,gd,iconv,mbstring,opcache,openssl,pdo,pdo_sqlite,phar,session,simplexml,sqlite3,tokenizer,xml,xmlwriter,yaml,zip,zlib',
4545
};
4646

4747
// If you want to test lib-suggests feature with extension, add them below (comma separated, example `libwebp,libavif`).
4848
$with_libs = match (PHP_OS_FAMILY) {
4949
'Linux', 'Darwin' => 'freetype',
50-
'Windows' => '',
50+
'Windows' => 'libjpeg,libavif,freetype,libwebp',
5151
};
5252

5353
// Please change your test base combination. We recommend testing with `common`.

0 commit comments

Comments
 (0)