mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-18 04:44:53 +08:00
Fix windows ssl bug for curl (#674)
This commit is contained in:
parent
d0a66ab16b
commit
7b6fae6d92
@ -78,7 +78,6 @@
|
|||||||
"zlib"
|
"zlib"
|
||||||
],
|
],
|
||||||
"lib-depends-windows": [
|
"lib-depends-windows": [
|
||||||
"openssl",
|
|
||||||
"zlib",
|
"zlib",
|
||||||
"libssh2",
|
"libssh2",
|
||||||
"nghttp2"
|
"nghttp2"
|
||||||
|
|||||||
@ -32,7 +32,7 @@ use Symfony\Component\Console\Application;
|
|||||||
*/
|
*/
|
||||||
final class ConsoleApplication extends Application
|
final class ConsoleApplication extends Application
|
||||||
{
|
{
|
||||||
public const VERSION = '2.5.0';
|
public const VERSION = '2.5.1';
|
||||||
|
|
||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
|
|||||||
@ -37,6 +37,8 @@ class curl extends WindowsLibraryBase
|
|||||||
'-DBUILD_EXAMPLES=OFF ' . // disable examples
|
'-DBUILD_EXAMPLES=OFF ' . // disable examples
|
||||||
'-DUSE_LIBIDN2=OFF ' . // disable libidn2
|
'-DUSE_LIBIDN2=OFF ' . // disable libidn2
|
||||||
'-DCURL_USE_LIBPSL=OFF ' . // disable libpsl
|
'-DCURL_USE_LIBPSL=OFF ' . // disable libpsl
|
||||||
|
'-DCURL_USE_SCHANNEL=ON ' . // use Schannel instead of OpenSSL
|
||||||
|
'-DCURL_USE_OPENSSL=OFF ' . // disable openssl due to certificate issue
|
||||||
'-DCURL_ENABLE_SSL=ON ' .
|
'-DCURL_ENABLE_SSL=ON ' .
|
||||||
'-DUSE_NGHTTP2=ON ' . // enable nghttp2
|
'-DUSE_NGHTTP2=ON ' . // enable nghttp2
|
||||||
'-DCURL_USE_LIBSSH2=ON ' . // enable libssh2
|
'-DCURL_USE_LIBSSH2=ON ' . // enable libssh2
|
||||||
|
|||||||
@ -3,3 +3,16 @@
|
|||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
assert(function_exists('curl_init'));
|
assert(function_exists('curl_init'));
|
||||||
|
assert(function_exists('curl_setopt'));
|
||||||
|
assert(function_exists('curl_exec'));
|
||||||
|
assert(function_exists('curl_close'));
|
||||||
|
$curl_version = curl_version();
|
||||||
|
if (stripos($curl_version['ssl_version'], 'schannel') !== false) {
|
||||||
|
$curl = curl_init();
|
||||||
|
curl_setopt($curl, CURLOPT_URL, 'https://example.com/');
|
||||||
|
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
|
||||||
|
curl_setopt($curl, CURLOPT_HEADER, 0);
|
||||||
|
$data = curl_exec($curl);
|
||||||
|
curl_close($curl);
|
||||||
|
assert($data !== false);
|
||||||
|
}
|
||||||
|
|||||||
@ -21,10 +21,10 @@ $test_php_version = [
|
|||||||
|
|
||||||
// test os (macos-13, macos-14, ubuntu-latest, windows-latest are available)
|
// test os (macos-13, macos-14, ubuntu-latest, windows-latest are available)
|
||||||
$test_os = [
|
$test_os = [
|
||||||
'macos-13',
|
// 'macos-13',
|
||||||
'macos-14',
|
// 'macos-14',
|
||||||
'ubuntu-latest',
|
'ubuntu-latest',
|
||||||
// 'windows-latest',
|
'windows-latest',
|
||||||
];
|
];
|
||||||
|
|
||||||
// whether enable thread safe
|
// whether enable thread safe
|
||||||
@ -41,20 +41,20 @@ $prefer_pre_built = false;
|
|||||||
// If you want to test your added extensions and libs, add below (comma separated, example `bcmath,openssl`).
|
// If you want to test your added extensions and libs, add below (comma separated, example `bcmath,openssl`).
|
||||||
$extensions = match (PHP_OS_FAMILY) {
|
$extensions = match (PHP_OS_FAMILY) {
|
||||||
'Linux', 'Darwin' => '',
|
'Linux', 'Darwin' => '',
|
||||||
'Windows' => 'bz2,ctype,curl,dom,filter,gd,iconv,mbstring,opcache,openssl,pdo,pdo_sqlite,phar,session,simplexml,sqlite3,tokenizer,xml,xmlwriter,yaml,zip,zlib',
|
'Windows' => 'mbstring,tokenizer,phar,curl,openssl',
|
||||||
};
|
};
|
||||||
|
|
||||||
// If you want to test lib-suggests feature with extension, add them below (comma separated, example `libwebp,libavif`).
|
// If you want to test lib-suggests feature with extension, add them below (comma separated, example `libwebp,libavif`).
|
||||||
$with_libs = match (PHP_OS_FAMILY) {
|
$with_libs = match (PHP_OS_FAMILY) {
|
||||||
'Linux', 'Darwin' => 'mimalloc',
|
'Linux', 'Darwin' => '',
|
||||||
'Windows' => 'libjpeg,libavif,freetype,libwebp',
|
'Windows' => '',
|
||||||
};
|
};
|
||||||
|
|
||||||
// Please change your test base combination. We recommend testing with `common`.
|
// Please change your test base combination. We recommend testing with `common`.
|
||||||
// You can use `common`, `bulk`, `minimal` or `none`.
|
// You can use `common`, `bulk`, `minimal` or `none`.
|
||||||
// note: combination is only available for *nix platform. Windows must use `none` combination
|
// note: combination is only available for *nix platform. Windows must use `none` combination
|
||||||
$base_combination = match (PHP_OS_FAMILY) {
|
$base_combination = match (PHP_OS_FAMILY) {
|
||||||
'Linux', 'Darwin' => 'bulk',
|
'Linux', 'Darwin' => 'minimal',
|
||||||
'Windows' => 'none',
|
'Windows' => 'none',
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user