curl is always supported now (swoole no longer supports php < 8.1)

This commit is contained in:
henderkes 2026-03-11 10:32:58 +07:00
parent 1b8b53d47f
commit 1049a3ce66

View File

@ -50,13 +50,10 @@ class swoole extends Extension
// commonly used feature: coroutine-time // commonly used feature: coroutine-time
$arg .= ' --enable-swoole-coro-time --with-pic'; $arg .= ' --enable-swoole-coro-time --with-pic';
$arg .= ' --enable-swoole-ftp --enable-swoole-ssh'; $arg .= ' --enable-swoole-ftp --enable-swoole-ssh --enable-swoole-curl';
$arg .= $this->builder->getOption('enable-zts') ? ' --enable-swoole-thread --disable-thread-context' : ' --disable-swoole-thread --enable-thread-context'; $arg .= $this->builder->getOption('enable-zts') ? ' --enable-swoole-thread --disable-thread-context' : ' --disable-swoole-thread --enable-thread-context';
// required features: curl, openssl (but curl hook is buggy for php 8.0)
$arg .= $this->builder->getPHPVersionID() >= 80100 ? ' --enable-swoole-curl' : ' --disable-swoole-curl';
// additional features that only require libraries // additional features that only require libraries
$arg .= $this->builder->getLib('libcares') ? ' --enable-cares' : ''; $arg .= $this->builder->getLib('libcares') ? ' --enable-cares' : '';
$arg .= $this->builder->getLib('brotli') ? (' --enable-brotli --with-brotli-dir=' . BUILD_ROOT_PATH) : ''; $arg .= $this->builder->getLib('brotli') ? (' --enable-brotli --with-brotli-dir=' . BUILD_ROOT_PATH) : '';