summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2021-07-05 07:45:37 +0200
committerRemi Collet <remi@remirepo.net>2021-07-05 07:45:37 +0200
commite9cf32572fe79e849e99b14b7b88aac4f59cf005 (patch)
tree029d40d4be6935578d8afa6572820d2376ef1ee4
parent38721e58d8a6e037bfe71cf96167495f13c1fb89 (diff)
update to 2.3.3
add patch for PHP 8.1 from https://github.com/longxinH/xhprof/pull/61
-rw-r--r--PHPINFO2
-rw-r--r--REFLECTION2
-rw-r--r--php-pecl-xhprof.spec14
-rw-r--r--xhprof-php81.patch33
4 files changed, 48 insertions, 3 deletions
diff --git a/PHPINFO b/PHPINFO
index c11181a..bf7e7d8 100644
--- a/PHPINFO
+++ b/PHPINFO
@@ -2,7 +2,7 @@
xhprof
xhprof support => enabled
-Version => 2.3.2
+Version => 2.3.3
Directive => Local Value => Master Value
xhprof.output_dir => no value => no value
diff --git a/REFLECTION b/REFLECTION
index e1703c9..47f2ba6 100644
--- a/REFLECTION
+++ b/REFLECTION
@@ -1,4 +1,4 @@
-Extension [ <persistent> extension #118 xhprof version 2.3.2 ] {
+Extension [ <persistent> extension #121 xhprof version 2.3.3 ] {
- INI {
Entry [ xhprof.output_dir <ALL> ]
diff --git a/php-pecl-xhprof.spec b/php-pecl-xhprof.spec
index 3224539..b1ae4c6 100644
--- a/php-pecl-xhprof.spec
+++ b/php-pecl-xhprof.spec
@@ -25,7 +25,7 @@
%global ini_name 40-%{pecl_name}.ini
Name: %{?sub_prefix}php-pecl-xhprof
-Version: 2.3.2
+Version: 2.3.3
Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
Summary: PHP extension for XHProf, a Hierarchical Profiler
@@ -34,6 +34,8 @@ License: ASL 2.0
URL: https://pecl.php.net/package/%{pecl_name}
Source0: https://pecl.php.net/get/%{pecl_name}-%{version}.tgz
+Patch0: %{pecl_name}-php81.patch
+
# https://bugs.php.net/61262
ExclusiveArch: %{ix86} x86_64
@@ -64,6 +66,9 @@ Obsoletes: php74-pecl-%{pecl_name} <= %{version}
%if "%{php_version}" > "8.0"
Obsoletes: php80-pecl-%{pecl_name} <= %{version}
%endif
+%if "%{php_version}" > "8.1"
+Obsoletes: php81-pecl-%{pecl_name} <= %{version}
+%endif
%endif
@@ -114,6 +119,8 @@ sed -e 's/role="php"/role="src"/' \
-i package.xml
pushd %{pecl_name}-%{version}/extension
+%patch0 -p2 -b .pr61
+
sed -e '/XHPROF_VERSION/s/2.3.0/%{version}/' -i php_xhprof.h
# Sanity check, really often broken
extver=$(sed -n '/#define XHPROF_VERSION/{s/.* "//;s/".*$//;p}' php_xhprof.h)
@@ -278,6 +285,11 @@ fi
%changelog
+* Mon Jul 5 2021 Remi Collet <remi@remirepo.net> - 2.3.3-1
+- update to 2.3.3
+- add patch for PHP 8.1 from
+ https://github.com/longxinH/xhprof/pull/61
+
* Fri May 7 2021 Remi Collet <remi@remirepo.net> - 2.3.2-1
- update to 2.3.2 (stable)
diff --git a/xhprof-php81.patch b/xhprof-php81.patch
new file mode 100644
index 0000000..9a419b5
--- /dev/null
+++ b/xhprof-php81.patch
@@ -0,0 +1,33 @@
+From 3eadeb31b8816d930de37a6fe3556451e96755b9 Mon Sep 17 00:00:00 2001
+From: Remi Collet <remi@remirepo.net>
+Date: Mon, 5 Jul 2021 07:24:44 +0200
+Subject: [PATCH] fix for 8.1.0alpha2
+
+---
+ extension/xhprof.c | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/extension/xhprof.c b/extension/xhprof.c
+index 7bcc9652..89c577e0 100755
+--- a/extension/xhprof.c
++++ b/extension/xhprof.c
+@@ -1093,7 +1093,12 @@ ZEND_DLEXPORT zend_op_array* hp_compile_file(zend_file_handle *file_handle, int
+ zend_string *function_name;
+ zend_op_array *op_array;
+
++#if PHP_VERSION_ID < 80100
+ filename = hp_get_base_filename(file_handle->filename);
++#else
++ filename = hp_get_base_filename(ZSTR_VAL(file_handle->filename));
++#endif
++
+ function_name = strpprintf(0, "load::%s", filename);
+
+ is_profiling = begin_profiling(function_name, NULL);
+@@ -1481,4 +1486,4 @@ void hp_init_trace_callbacks()
+
+ callback = hp_trace_callback_curl_exec;
+ register_trace_callback("curl_exec", callback);
+-}
+\ No newline at end of file
++}