suggestion

This commit is contained in:
crazywhalecc 2025-07-31 00:11:49 +08:00
parent cb0ea67a28
commit 6984c29a3a
No known key found for this signature in database
GPG Key ID: 1F4BDD59391F2680

View File

@ -27,11 +27,7 @@ class openssl extends Extension
{ {
$openssl_dir = $this->builder->getPHPVersionID() >= 80400 ? '' : ' --with-openssl-dir=' . BUILD_ROOT_PATH; $openssl_dir = $this->builder->getPHPVersionID() >= 80400 ? '' : ' --with-openssl-dir=' . BUILD_ROOT_PATH;
$args = '--with-openssl=' . ($shared ? 'shared,' : '') . BUILD_ROOT_PATH . $openssl_dir; $args = '--with-openssl=' . ($shared ? 'shared,' : '') . BUILD_ROOT_PATH . $openssl_dir;
if ( if ($this->builder->getPHPVersionID() >= 80500) {
$this->builder->getPHPVersionID() >= 80500 &&
($ver = $this->builder->getLib('openssl')->getLibVersion()) &&
version_compare($ver, '3.2.0', '>=')
) {
$args .= ' --with-openssl-argon2 OPENSSL_LIBS="-lz"'; $args .= ' --with-openssl-argon2 OPENSSL_LIBS="-lz"';
} }
return $args; return $args;
@ -40,11 +36,7 @@ class openssl extends Extension
public function getWindowsConfigureArg(bool $shared = false): string public function getWindowsConfigureArg(bool $shared = false): string
{ {
$args = '--with-openssl'; $args = '--with-openssl';
if ( if ($this->builder->getPHPVersionID() >= 80500) {
$this->builder->getPHPVersionID() >= 80500 &&
($ver = $this->builder->getLib('openssl')->getLibVersion()) &&
version_compare($ver, '3.2.0', '>=')
) {
$args .= ' --with-openssl-argon2'; $args .= ' --with-openssl-argon2';
} }
return $args; return $args;