Skip to content

Commit cf30418

Browse files
authored
Remove deprecated args for PHP 8.4 (#616)
* Remove deprecated args for PHP 8.4 * Add tests * Use nts for testing * Test * memcache still uses `--with-zlib-dir`
1 parent a95d034 commit cf30418

File tree

5 files changed

+9
-13
lines changed

5 files changed

+9
-13
lines changed

config/ext.json

+1-3
Original file line numberDiff line numberDiff line change
@@ -355,10 +355,8 @@
355355
"type": "external",
356356
"source": "ext-memcache",
357357
"arg-type": "custom",
358-
"lib-depends": [
359-
"zlib"
360-
],
361358
"ext-depends": [
359+
"zlib",
362360
"session"
363361
]
364362
},

src/SPC/builder/extension/memcached.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ class memcached extends Extension
1313
public function getUnixConfigureArg(): string
1414
{
1515
$rootdir = BUILD_ROOT_PATH;
16-
return "--enable-memcached --with-zlib-dir={$rootdir} --with-libmemcached-dir={$rootdir} --disable-memcached-sasl --enable-memcached-json";
16+
$zlib_dir = $this->builder->getPHPVersionID() >= 80400 ? '' : "--with-zlib-dir={$rootdir}";
17+
return "--enable-memcached {$zlib_dir} --with-libmemcached-dir={$rootdir} --disable-memcached-sasl --enable-memcached-json";
1718
}
1819
}

src/SPC/builder/extension/openssl.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ public function patchBeforeMake(): bool
2525

2626
public function getUnixConfigureArg(): string
2727
{
28-
return '--with-openssl=' . BUILD_ROOT_PATH . ' --with-openssl-dir=' . BUILD_ROOT_PATH;
28+
$openssl_dir = $this->builder->getPHPVersionID() >= 80400 ? '' : ' --with-openssl-dir=' . BUILD_ROOT_PATH;
29+
return '--with-openssl=' . BUILD_ROOT_PATH . $openssl_dir;
2930
}
3031
}

src/SPC/builder/extension/zlib.php

+2-4
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,7 @@ class zlib extends Extension
1212
{
1313
public function getUnixConfigureArg(): string
1414
{
15-
if ($this->builder->getPHPVersionID() >= 80400) {
16-
return '--with-zlib';
17-
}
18-
return '--with-zlib --with-zlib-dir="' . BUILD_ROOT_PATH . '"';
15+
$zlib_dir = $this->builder->getPHPVersionID() >= 80400 ? '' : ' --with-zlib-dir=' . BUILD_ROOT_PATH;
16+
return '--with-zlib' . $zlib_dir;
1917
}
2018
}

src/globals/test-extensions.php

+2-4
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@
1313

1414
// test php version
1515
$test_php_version = [
16-
'8.1',
17-
'8.2',
1816
'8.3',
1917
'8.4',
2018
];
@@ -28,7 +26,7 @@
2826
];
2927

3028
// whether enable thread safe
31-
$zts = true;
29+
$zts = false;
3230

3331
$no_strip = false;
3432

@@ -40,7 +38,7 @@
4038

4139
// If you want to test your added extensions and libs, add below (comma separated, example `bcmath,openssl`).
4240
$extensions = match (PHP_OS_FAMILY) {
43-
'Linux', 'Darwin' => 'gettext',
41+
'Linux', 'Darwin' => 'imap,openssl,zlib,memcache',
4442
'Windows' => 'gettext',
4543
};
4644

0 commit comments

Comments
 (0)