Closed andypost closed 3 years ago
There's one failed test for 8.x
FAILED TEST SUMMARY
---------------------------------------------------------------------
XHProf: Test Curl Additional Info
Author: longxinhui [tests/xhprof_012.phpt]
Copied the test looks for php 8 curl integration needs change
main() : ct= 1; wt=*;
main()==>curl_close : ct= 1; wt=*;
-main()==>curl_exec#https://www.php.net/ : ct= 1; wt=*;
-main()==>curl_getinfo : ct= 1; wt=*;
+main()==>curl_exec : ct= 1; wt=*;
main()==>curl_init : ct= 1; wt=*;
main()==>curl_setopt : ct= 2; wt=*;
main()==>xhprof_disable : ct= 1; wt=*;
also few build warnings
cc -I. -I/home/travis/build/longxinH/xhprof/extension -DPHP_ATOM_INC -I/home/travis/build/longxinH/xhprof/extension/include -I/home/travis/build/longxinH/xhprof/extension/main -I/home/travis/build/longxinH/xhprof/extension -I/home/travis/.phpenv/versions/master/include/php -I/home/travis/.phpenv/versions/master/include/php/main -I/home/travis/.phpenv/versions/master/include/php/TSRM -I/home/travis/.phpenv/versions/master/include/php/Zend -I/home/travis/.phpenv/versions/master/include/php/ext -I/home/travis/.phpenv/versions/master/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /home/travis/build/longxinH/xhprof/extension/xhprof.c -fPIC -DPIC -o .libs/xhprof.o
/home/travis/build/longxinH/xhprof/extension/xhprof.c: In function ‘zm_startup_xhprof’:
/home/travis/build/longxinH/xhprof/extension/xhprof.c:266:26: warning: assignment from incompatible pointer type [-Wincompatible-pointer-types]
_zend_compile_string = zend_compile_string;
^
/home/travis/build/longxinH/xhprof/extension/xhprof.c:267:25: warning: assignment from incompatible pointer type [-Wincompatible-pointer-types]
zend_compile_string = hp_compile_string;
^
/home/travis/build/longxinH/xhprof/extension/xhprof.c: In function ‘zm_shutdown_xhprof’:
/home/travis/build/longxinH/xhprof/extension/xhprof.c:300:27: warning: assignment from incompatible pointer type [-Wincompatible-pointer-types]
zend_compile_string = _zend_compile_string;
^
/home/travis/build/longxinH/xhprof/extension/xhprof.c: In function ‘hp_trace_callback_curl_exec’:
/home/travis/build/longxinH/xhprof/extension/xhprof.c:1536:13: warning: initialization makes pointer from integer without a cast [-Wint-conversion]
1
^
/home/travis/build/longxinH/xhprof/extension/xhprof.c:1536:13: note: (near initialization for ‘fci.named_params’)
Fixes for
https://github.com/php/php-src/blob/master/UPGRADING.INTERNALS#L141
s. The zend_fcall_info no_separation flag has been removed, and separation is never allowed. If you wish to pass (or allow passing) arguments by reference, explicitly create those arguments as references using ZEND_MAKE_REF. This removal also affects call_user_function_ex(), which should be replaced by call_user_function().
https://github.com/php/php-src/blob/master/Zend/zend_compile.h#L735
extern ZEND_API zend_op_array (zend_compile_string)(zval source_string, const char filename);
Curl changed return type to return object instead of resource, that's why test failed
@longxinH thank you for merging, I still found no way to fix curl
The related change is https://github.com/php/php-src/pull/5402
@andypost Thank you, is there any other solution I try
I used to run the test to try get object but stuck at this line https://github.com/longxinH/xhprof/blob/master/extension/xhprof.c#L1519-L1520
make NO_INTERACTION=1 REPORT_EXIT_STATUS=1 test \
PHP_TEST_SHARED_EXTENSIONS="-d extension=/usr/lib/php8/modules/curl.so -d extension=modules/xhprof.so" \
TESTS=tests/xhprof_012_8.phpt
It just type 8 (object) in 8+ so after https://github.com/longxinH/xhprof/pull/44 makes sense to create new release)
7.0 and 7.1 is unsupported https://www.php.net/supported-versions.php