Open glensc opened 4 years ago
here's a script that tests all versions via docker images. integrate in your qa.
#!/bin/sh
set -eu
for m in $(seq 0 4); do
v=7.$m
ext=tideways_xhprof-$v.so
local=$(pwd)/tideways_xhprof-5.0.2/$ext
if test -f $local; then
docker run --rm \
-v $local:/tideways_xhprof-$v.so \
php:$v-cli \
php -dextension=/tideways_xhprof-$v.so -r 'printf("- %s (%s): %s\n", PHP_VERSION, PHP_ZTS ? "ZTS": "NTS", var_export(extension_loaded("tideways_xhprof"), 1));'
fi
ext=tideways_xhprof-$v-zts.so
local=$(pwd)/tideways_xhprof-5.0.2/$ext
if test -f $local; then
docker run --rm \
-v $local:/$ext \
php:$v-zts \
php -dextension=/$ext -r 'printf("- %s (%s): %s\n", PHP_VERSION, PHP_ZTS ? "ZTS": "NTS", var_export(extension_loaded("tideways_xhprof"), 1));'
fi
done
➔ ./test-all.sh
- 7.0.33 (NTS): true
- 7.1.33 (NTS): true
- 7.1.33 (ZTS): true
- 7.2.30 (NTS): true
- 7.2.30 (ZTS): true
- 7.3.17 (NTS): true
- 7.3.17 (ZTS): true
- 7.4.5 (NTS): true
- 7.4.5 (ZTS): false
PHP Warning: PHP Startup: Unable to load dynamic library '/tideways_xhprof-7.4-zts.so' (tried: /tideways_xhprof-7.4-zts.so (/tideways_xhprof-7.4-zts.so: undefined symbol: compiler_globals), /usr/local/lib/php/extensions/no-debug-zts-20190902//tideways_xhprof-7.4-zts.so.so (/usr/local/lib/php/extensions/no-debug-zts-20190902//tideways_xhprof-7.4-zts.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
also, do you know that your download is lacking 7.0-zts extension?
The
undefined symbol: compiler_globals
indicates that extension was compiled NTS but attempted to be loaded as ZTS.I discovered this fault when attempted to use your extension in Travis CI: