Skip to content

Commit 31360d7

Browse files
authored
Merge pull request #162 from Jan-E/config-w32-fix-php8
[config.w32] json is static in PHP 8
2 parents 15a7c13 + 5e16459 commit 31360d7

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

config.w32

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ function ds_src(dir, files) {
1717
ARG_ENABLE("ds", "for extended data structure support", "no");
1818

1919
if (PHP_DS != "no") {
20-
EXTENSION(DS_EXT_NAME, DS_EXT_API, PHP_DS_SHARED, DS_EXT_FLAGS);
20+
EXTENSION(DS_EXT_NAME, DS_EXT_API, PHP_DS_SHARED, DS_EXT_FLAGS);
2121

2222
ds_src("/",
2323
[
@@ -89,5 +89,11 @@ if (PHP_DS != "no") {
8989
]);
9090

9191
ADD_EXTENSION_DEP('ds', 'spl');
92-
ADD_EXTENSION_DEP('ds', 'json');
92+
var dll = get_define('PHPDLL');
93+
if (null != dll.match(/^php7/)) {
94+
// only require dynamic json extension for PHP 7
95+
// json is built statically in PHP 8
96+
// https://github.com/php/php-src/pull/5495
97+
ADD_EXTENSION_DEP('ds', 'json');
98+
}
9399
}

0 commit comments

Comments
 (0)