summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2019-09-27 13:36:10 +0200
committerRemi Collet <remi@remirepo.net>2019-09-27 13:36:10 +0200
commit4591956329738b40f9075272bdad890ef2d21f0a (patch)
treeecf1162ffba000f59bab090e0d2aa7407a7c880e
parent0de852a71966008b1204c1dfa736425826243d37 (diff)
v0.0.4
-rw-r--r--PHPINFO2
-rw-r--r--REFLECTION2
-rw-r--r--build.patch110
-rw-r--r--php-pecl-scoutapm.spec10
4 files changed, 7 insertions, 117 deletions
diff --git a/PHPINFO b/PHPINFO
index 60740ba..c892552 100644
--- a/PHPINFO
+++ b/PHPINFO
@@ -1,4 +1,4 @@
scoutapm
-Version => 0.0.3
+Version => 0.0.4
diff --git a/REFLECTION b/REFLECTION
index d2ecd74..227f17f 100644
--- a/REFLECTION
+++ b/REFLECTION
@@ -1,4 +1,4 @@
-Extension [ <persistent> extension #201 scoutapm version 0.0.3 ] {
+Extension [ <persistent> extension #201 scoutapm version 0.0.4 ] {
- Functions {
Function [ <internal:scoutapm> function scoutapm_get_calls ] {
diff --git a/build.patch b/build.patch
deleted file mode 100644
index b24db12..0000000
--- a/build.patch
+++ /dev/null
@@ -1,110 +0,0 @@
-From cbadc2e10829d02b45a7f94de3cf21b88e032bfc Mon Sep 17 00:00:00 2001
-From: James Titcumb <james@asgrim.com>
-Date: Tue, 17 Sep 2019 12:25:23 +0100
-Subject: [PATCH 3/3] Use PHP_VERSION_ID to check for existence of zif_handler
-
----
- zend_scoutapm.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/zend_scoutapm.h b/zend_scoutapm.h
-index 2d3500b..1c0bc12 100644
---- a/zend_scoutapm.h
-+++ b/zend_scoutapm.h
-@@ -50,7 +50,7 @@ ZEND_END_MODULE_GLOBALS(scoutapm)
- #endif
-
- /* zif_handler is not always defined, so define this roughly equivalent */
--#ifndef zif_handler
-+#if PHP_VERSION_ID < 70200
- typedef void (*zif_handler)(INTERNAL_FUNCTION_PARAMETERS);
- #endif
-
-
-diff --git a/zend_scoutapm.c b/zend_scoutapm.c
-index 96117c4..e32e2f9 100644
---- a/zend_scoutapm.c
-+++ b/zend_scoutapm.c
-@@ -174,10 +174,12 @@ static PHP_RINIT_FUNCTION(scoutapm)
- */
- static PHP_RSHUTDOWN_FUNCTION(scoutapm)
- {
-+ int i, j;
-+
- SCOUTAPM_DEBUG_MESSAGE("Freeing stacks... ");
-
-- for (int i = 0; i < SCOUTAPM_G(observed_stack_frames_count); i++) {
-- for (int j = 0; j < SCOUTAPM_G(observed_stack_frames)[i].argc; j++) {
-+ for (i = 0; i < SCOUTAPM_G(observed_stack_frames_count); i++) {
-+ for (j = 0; j < SCOUTAPM_G(observed_stack_frames)[i].argc; j++) {
- zval_ptr_dtor(&(SCOUTAPM_G(observed_stack_frames)[i].argv[j]));
- }
- free(SCOUTAPM_G(observed_stack_frames)[i].argv);
-@@ -264,6 +266,8 @@ static double scoutapm_microtime()
- */
- static void record_observed_stack_frame(const char *function_name, double microtime_entered, double microtime_exited, int argc, zval *argv)
- {
-+ int i;
-+
- if (argc > 0) {
- SCOUTAPM_DEBUG_MESSAGE("Adding observed stack frame for %s (%s) ... ", function_name, Z_STRVAL(argv[0]));
- } else {
-@@ -280,7 +284,7 @@ static void record_observed_stack_frame(const char *function_name, double microt
- SCOUTAPM_G(observed_stack_frames)[SCOUTAPM_G(observed_stack_frames_count)].argc = argc;
- SCOUTAPM_G(observed_stack_frames)[SCOUTAPM_G(observed_stack_frames_count)].argv = calloc(argc, sizeof(zval));
-
-- for (int i = 0; i < argc; i++) {
-+ for (i = 0; i < argc; i++) {
- ZVAL_COPY(
- &(SCOUTAPM_G(observed_stack_frames)[SCOUTAPM_G(observed_stack_frames_count)].argv[i]),
- &(argv[i])
-@@ -295,6 +299,7 @@ static void record_observed_stack_frame(const char *function_name, double microt
- Fetch all the recorded function or method calls recorded by the ScoutAPM extension. */
- PHP_FUNCTION(scoutapm_get_calls)
- {
-+ int i, j;
- zval item, arg_items, arg_item;
- ZEND_PARSE_PARAMETERS_NONE();
-
-@@ -302,7 +307,7 @@ PHP_FUNCTION(scoutapm_get_calls)
-
- array_init(return_value);
-
-- for (int i = 0; i < SCOUTAPM_G(observed_stack_frames_count); i++) {
-+ for (i = 0; i < SCOUTAPM_G(observed_stack_frames_count); i++) {
- array_init(&item);
-
- add_assoc_str_ex(
-@@ -331,7 +336,7 @@ PHP_FUNCTION(scoutapm_get_calls)
- );
-
- array_init(&arg_items);
-- for (int j = 0; j < SCOUTAPM_G(observed_stack_frames)[i].argc; j++) {
-+ for (j = 0; j < SCOUTAPM_G(observed_stack_frames)[i].argc; j++) {
- /* Must copy the argument to a new zval, otherwise it gets freed and we get segfault. */
- ZVAL_COPY(&arg_item, &(SCOUTAPM_G(observed_stack_frames)[i].argv[j]));
- add_next_index_zval(&arg_items, &arg_item);
-diff --git a/tests/011-pdo-exec.phpt b/tests/011-pdo-exec.phpt
-index 178e18d..6f48a56 100644
---- a/tests/011-pdo-exec.phpt
-+++ b/tests/011-pdo-exec.phpt
-@@ -7,9 +7,8 @@ Calls to PDO::exec are logged
- --FILE--
- <?php
- $dbh = new PDO('sqlite::memory:');
--echo $dbh->exec("CREATE TABLE foo (col INT PRIMARY KEY)");
--echo $dbh->exec("INSERT INTO foo (col) VALUES (1), (2) ");
--echo "\n";
-+$dbh->exec("CREATE TABLE foo (col INT PRIMARY KEY)");
-+$dbh->exec("INSERT INTO foo (col) VALUES (1), (2) ");
-
- $calls = scoutapm_get_calls();
- var_dump($calls[0]['function']);
-@@ -18,7 +17,6 @@ var_dump($calls[1]['function']);
- var_dump($calls[1]['argv'][0]);
- ?>
- --EXPECTF--
--02
- string(9) "PDO->exec"
- string(38) "CREATE TABLE foo (col INT PRIMARY KEY)"
- string(9) "PDO->exec"
diff --git a/php-pecl-scoutapm.spec b/php-pecl-scoutapm.spec
index 4d00d9e..44d3c28 100644
--- a/php-pecl-scoutapm.spec
+++ b/php-pecl-scoutapm.spec
@@ -17,14 +17,12 @@
Summary: Native Extension Component for ScoutAPM's PHP Agent
Name: %{?sub_prefix}php-pecl-%{pecl_name}
-Version: 0.0.3
+Version: 0.0.4
Release: 1%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}
Source0: http://pecl.php.net/get/%{pecl_name}-%{version}.tgz
License: PHP
URL: http://pecl.php.net/package/%{pecl_name}
-Patch0: build.patch
-
BuildRequires: %{?dtsprefix}gcc
BuildRequires: %{?scl_prefix}php-devel > 7.1
BuildRequires: %{?scl_prefix}php-pear
@@ -90,8 +88,6 @@ sed -e 's/role="test"/role="src"/' \
-i package.xml
pushd NTS
-%patch0 -p1
-
: Check version
extver=$(sed -n '/#define PHP_SCOUTAPM_VERSION /{s/.* "//;s/".*$//;p}' zend_scoutapm.h)
if test "x${extver}" != "x%{version}%{?prever}"; then
@@ -224,6 +220,10 @@ TEST_PHP_EXECUTABLE=%{__ztsphp} \
%changelog
+* Fri Sep 27 2019 Remi Collet <remi@remirepo.net> - 0.0.4-1
+- update to 0.0.4
+- drop patch merged upstream
+
* Tue Sep 17 2019 Remi Collet <remi@remirepo.net> - 0.0.3-1
- update to 0.0.3
- add build patch from