From 264b1cd91c81744b1b344b7640675d84c07523d5 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Fri, 19 Jun 2015 13:49:59 +0200 Subject: php-pecl-xdebug: 2.3.3 --- REFLECTION | 4 +- php-pecl-xdebug.spec | 25 +++------- xdebug-pr167.patch | 128 --------------------------------------------------- xdebug-pr172.patch | 37 --------------- xdebug-pr176.patch | 22 --------- xdebug-pr178.patch | 22 --------- 6 files changed, 9 insertions(+), 229 deletions(-) delete mode 100644 xdebug-pr167.patch delete mode 100644 xdebug-pr172.patch delete mode 100644 xdebug-pr176.patch delete mode 100644 xdebug-pr178.patch diff --git a/REFLECTION b/REFLECTION index 374cd3f..2d71f09 100644 --- a/REFLECTION +++ b/REFLECTION @@ -1,4 +1,4 @@ -Extension [ extension #197 xdebug version 2.3.2 ] { +Extension [ extension #199 xdebug version 2.3.3 ] { - INI { Entry [ xdebug.auto_trace ] @@ -170,7 +170,7 @@ Extension [ extension #197 xdebug version 2.3.2 ] { Current = '3' } Entry [ xdebug.cli_color ] - Current = '1' + Current = '0' } Entry [ xdebug.scream ] Current = '0' diff --git a/php-pecl-xdebug.spec b/php-pecl-xdebug.spec index d6e46c6..4f86cbb 100644 --- a/php-pecl-xdebug.spec +++ b/php-pecl-xdebug.spec @@ -19,7 +19,7 @@ %global pecl_name xdebug %global with_zts 0%{?__ztsphp:1} -%global gh_commit 5c8c76b1d69a0395130fe9b23ad18f767a94e798 +%global gh_commit 2d2bdbc7948aa72143df0c5fc0eb684078732bf9 %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global with_tests %{?_with_tests:1}%{!?_with_tests:0} @@ -32,21 +32,10 @@ Name: %{?scl_prefix}php-pecl-xdebug Summary: PECL package for debugging PHP scripts -Version: 2.3.2 -Release: 5%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')} +Version: 2.3.3 +Release: 1%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')} Source0: https://github.com/%{pecl_name}/%{pecl_name}/archive/%{gh_commit}/%{pecl_name}-%{version}-%{gh_short}.tar.gz -# https://github.com/xdebug/xdebug/pull/172 -# https://bugzilla.redhat.com/1214111 -Patch0: %{pecl_name}-pr172.patch -# https://github.com/xdebug/xdebug/pull/176 -Patch1: %{pecl_name}-pr176.patch -# https://github.com/xdebug/xdebug/pull/167 -Patch2: %{pecl_name}-pr167.patch -# https://github.com/xdebug/xdebug/pull/178 -Patch3: %{pecl_name}-pr178.patch - - # The Xdebug License, version 1.01 # (Based on "The PHP License", version 3.0) License: PHP @@ -121,10 +110,6 @@ mv %{pecl_name}-%{gh_commit} NTS mv NTS/package.xml . cd NTS -%patch2 -p1 -b .pr167 -%patch0 -p1 -b .pr172 -%patch1 -p1 -b .pr176 -%patch3 -p1 -b .pr178 # Check extension version ver=$(sed -n '/XDEBUG_VERSION/{s/.* "//;s/".*$//;p}' php_xdebug.h) @@ -297,6 +282,10 @@ rm -rf %{buildroot} %changelog +* Fri Jun 19 2015 Remi Collet - 2.3.3-1 +- update to 2.3.3 +- drop all patches, merged upstream + * Fri May 29 2015 Remi Collet - 2.3.2-5 - sources from github, with test suite - run test suite when build using "--with tests" option diff --git a/xdebug-pr167.patch b/xdebug-pr167.patch deleted file mode 100644 index 293f261..0000000 --- a/xdebug-pr167.patch +++ /dev/null @@ -1,128 +0,0 @@ -From b6da4dad4e2410de764964b61b17bdff7fa72cd9 Mon Sep 17 00:00:00 2001 -From: Derick Rethans -Date: Tue, 31 Mar 2015 10:25:56 +0100 -Subject: [PATCH] Fixed issue #1133: PDO exception code value type is changed - ---- - tests/bug01133.phpt | 19 +++++++++++++++++++ - xdebug.c | 17 +++++++++++++++-- - xdebug_handler_dbgp.c | 4 ++-- - xdebug_handler_dbgp.h | 2 +- - xdebug_handlers.h | 2 +- - xdebug_stack.c | 6 +++++- - 6 files changed, 43 insertions(+), 7 deletions(-) - create mode 100644 tests/bug01133.phpt - -diff --git a/xdebug.c b/xdebug.c -index e10449b..af6601e 100644 ---- a/xdebug.c -+++ b/xdebug.c -@@ -1186,6 +1186,7 @@ static void xdebug_throw_exception_hook(zval *exception TSRMLS_DC) - zval *xdebug_message_trace, *previous_exception; - zend_class_entry *default_ce, *exception_ce; - xdebug_brk_info *extra_brk_info; -+ char *code_str = NULL; - char *exception_trace; - xdebug_str tmp_str = { 0, 0, NULL }; - -@@ -1201,7 +1202,14 @@ static void xdebug_throw_exception_hook(zval *exception TSRMLS_DC) - file = zend_read_property(default_ce, exception, "file", sizeof("file")-1, 0 TSRMLS_CC); - line = zend_read_property(default_ce, exception, "line", sizeof("line")-1, 0 TSRMLS_CC); - -- convert_to_long_ex(&code); -+ if (Z_TYPE_P(code) == IS_LONG) { -+ if (Z_LVAL_P(code) != 0) { -+ code_str = xdebug_sprintf("%lu", Z_LVAL_P(code)); -+ } -+ } else if (Z_TYPE_P(code) != IS_STRING) { -+ code_str = xdstrdup(""); -+ } -+ - convert_to_string_ex(&message); - convert_to_string_ex(&file); - convert_to_long_ex(&line); -@@ -1265,11 +1273,16 @@ static void xdebug_throw_exception_hook(zval *exception TSRMLS_DC) - } - - if (exception_breakpoint_found && xdebug_handle_hit_value(extra_brk_info)) { -- if (!XG(context).handler->remote_breakpoint(&(XG(context)), XG(stack), Z_STRVAL_P(file), Z_LVAL_P(line), XDEBUG_BREAK, (char *) exception_ce->name, Z_LVAL_P(code), Z_STRVAL_P(message))) { -+ if (!XG(context).handler->remote_breakpoint(&(XG(context)), XG(stack), Z_STRVAL_P(file), Z_LVAL_P(line), XDEBUG_BREAK, (char *) exception_ce->name, code_str ? code_str : Z_STRVAL_P(code), Z_STRVAL_P(message))) { - XG(remote_enabled) = 0; - } - } - } -+ -+ /* Free code_str if necessary */ -+ if (code_str) { -+ xdfree(code_str); -+ } - } - - static int handle_breakpoints(function_stack_entry *fse, int breakpoint_type) -diff --git a/xdebug_handler_dbgp.c b/xdebug_handler_dbgp.c -index ebbadc2..3265c4b 100644 ---- a/xdebug_handler_dbgp.c -+++ b/xdebug_handler_dbgp.c -@@ -2342,7 +2342,7 @@ int xdebug_dbgp_error(xdebug_con *context, int type, char *exception_type, char - return 1; - } - --int xdebug_dbgp_breakpoint(xdebug_con *context, xdebug_llist *stack, char *file, long lineno, int type, char *exception, int code, char *message) -+int xdebug_dbgp_breakpoint(xdebug_con *context, xdebug_llist *stack, char *file, long lineno, int type, char *exception, char *code, char *message) - { - xdebug_xml_node *response, *error_container; - TSRMLS_FETCH(); -@@ -2379,7 +2379,7 @@ int xdebug_dbgp_breakpoint(xdebug_con *context, xdebug_llist *stack, char *file, - xdebug_xml_add_attribute_ex(error_container, "exception", xdstrdup(exception), 0, 1); - } - if (code) { -- xdebug_xml_add_attribute_ex(error_container, "code", xdebug_sprintf("%lu", code), 0, 1); -+ xdebug_xml_add_attribute_ex(error_container, "code", xdstrdup(code), 0, 1); - } - if (message) { - xdebug_xml_add_text(error_container, xdstrdup(message)); -diff --git a/xdebug_handler_dbgp.h b/xdebug_handler_dbgp.h -index f875cde..0892d06 100644 ---- a/xdebug_handler_dbgp.h -+++ b/xdebug_handler_dbgp.h -@@ -91,7 +91,7 @@ typedef struct xdebug_dbgp_cmd { - int xdebug_dbgp_init(xdebug_con *context, int mode); - int xdebug_dbgp_deinit(xdebug_con *context); - int xdebug_dbgp_error(xdebug_con *context, int type, char *exception_type, char *message, const char *location, const uint line, xdebug_llist *stack); --int xdebug_dbgp_breakpoint(xdebug_con *context, xdebug_llist *stack, char *file, long lineno, int type, char *exception, int code, char *message); -+int xdebug_dbgp_breakpoint(xdebug_con *context, xdebug_llist *stack, char *file, long lineno, int type, char *exception, char *code, char *message); - int xdebug_dbgp_stream_output(const char *string, unsigned int length TSRMLS_DC); - int xdebug_dbgp_register_eval_id(xdebug_con *context, function_stack_entry *fse); - char *xdebug_dbgp_get_revision(void); -diff --git a/xdebug_handlers.h b/xdebug_handlers.h -index 73b0d77..dbd92f2 100644 ---- a/xdebug_handlers.h -+++ b/xdebug_handlers.h -@@ -110,7 +110,7 @@ struct _xdebug_remote_handler { - int (*remote_error)(xdebug_con *h, int type, char *exception_type, char *message, const char *location, const uint line, xdebug_llist *stack); - - /* Breakpoints */ -- int (*remote_breakpoint)(xdebug_con *h, xdebug_llist *stack, char *file, long lineno, int type, char *exception, int code, char *message); -+ int (*remote_breakpoint)(xdebug_con *h, xdebug_llist *stack, char *file, long lineno, int type, char *exception, char *code, char *message); - - /* Output redirection */ - int (*remote_stream_output)(const char *string, unsigned int length TSRMLS_DC); -diff --git a/xdebug_stack.c b/xdebug_stack.c -index 40a71cc..a8d04d8 100644 ---- a/xdebug_stack.c -+++ b/xdebug_stack.c -@@ -654,9 +654,13 @@ void xdebug_error_cb(int type, const char *error_filename, const uint error_line - xdebug_hash_find(XG(context).exception_breakpoints, "*", 1, (void *) &extra_brk_info) - ) { - if (xdebug_handle_hit_value(extra_brk_info)) { -- if (!XG(context).handler->remote_breakpoint(&(XG(context)), XG(stack), (char *) error_filename, error_lineno, XDEBUG_BREAK, error_type_str, type, buffer)) { -+ char *type_str = xdebug_sprintf("%ld", type); -+ -+ if (!XG(context).handler->remote_breakpoint(&(XG(context)), XG(stack), (char *) error_filename, error_lineno, XDEBUG_BREAK, error_type_str, type_str, buffer)) { - XG(remote_enabled) = 0; - } -+ -+ xdfree(type_str); - } - } - } diff --git a/xdebug-pr172.patch b/xdebug-pr172.patch deleted file mode 100644 index e262339..0000000 --- a/xdebug-pr172.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 419834a441cc65bb4e7220e1128356dc99d86211 Mon Sep 17 00:00:00 2001 -From: Remi Collet -Date: Wed, 22 Apr 2015 08:49:51 +0200 -Subject: [PATCH] fix usage of virtual_file_ex - ---- - usefulstuff.c | 8 ++++++++ - 1 file changed, 8 insertions(+) - -diff --git a/usefulstuff.c b/usefulstuff.c -index 83725c7..3bc4d1a 100644 ---- a/usefulstuff.c -+++ b/usefulstuff.c -@@ -344,7 +344,11 @@ char *xdebug_path_to_url(const char *fileurl TSRMLS_DC) - cwd[0] = '\0'; - } - -+#if PHP_VERSION_ID < 50600 - new_state.cwd = strdup(cwd); -+#else -+ new_state.cwd = estrdup(cwd); -+#endif - new_state.cwd_length = strlen(cwd); - - if (!virtual_file_ex(&new_state, fileurl, NULL, 1 TSRMLS_CC)) { -@@ -352,7 +356,11 @@ char *xdebug_path_to_url(const char *fileurl TSRMLS_DC) - tmp = xdebug_sprintf("file://%s",s); - efree(s); - } -+#if PHP_VERSION_ID < 50600 - free(new_state.cwd); -+#else -+ efree(new_state.cwd); -+#endif - - } else if (fileurl[1] == '/' || fileurl[1] == '\\') { - /* convert UNC paths (eg. \\server\sharepath) */ diff --git a/xdebug-pr176.patch b/xdebug-pr176.patch deleted file mode 100644 index ea8eef7..0000000 --- a/xdebug-pr176.patch +++ /dev/null @@ -1,22 +0,0 @@ -From 2358ad26cd4db2806180aca61a7ccaceb19fa526 Mon Sep 17 00:00:00 2001 -From: Remi Collet -Date: Wed, 27 May 2015 11:34:09 +0200 -Subject: [PATCH] switch from efree to STR_FREE - ---- - xdebug_stack.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/xdebug_stack.c b/xdebug_stack.c -index 56304bf..82707f1 100644 ---- a/xdebug_stack.c -+++ b/xdebug_stack.c -@@ -247,7 +247,7 @@ void xdebug_append_error_description(xdebug_str *str, int html, const char *erro - xdebug_str_add(str, xdebug_sprintf(formats[1], error_type_str, escaped, error_filename, error_lineno), 1); - } - -- efree(escaped); -+ STR_FREE(escaped); - } - - void xdebug_append_printable_stack(xdebug_str *str, int html TSRMLS_DC) diff --git a/xdebug-pr178.patch b/xdebug-pr178.patch deleted file mode 100644 index 237ade0..0000000 --- a/xdebug-pr178.patch +++ /dev/null @@ -1,22 +0,0 @@ -From 1958b346aea595a67d15978f9a38d413c4147e8e Mon Sep 17 00:00:00 2001 -From: Derick Rethans -Date: Fri, 29 May 2015 13:20:53 +0100 -Subject: [PATCH] Fixed issue #1151: Crash when another extension calls - call_user_function() during RINIT - ---- - xdebug_stack.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/xdebug_stack.c b/xdebug_stack.c -index 2c7d94e..4be99d2 100644 ---- a/xdebug_stack.c -+++ b/xdebug_stack.c -@@ -993,6 +993,7 @@ function_stack_entry *xdebug_add_stack_frame(zend_execute_data *zdata, zend_op_a - /* Call user function locations */ - if ( - !tmp->filename && -+ XG(stack) && - XDEBUG_LLIST_TAIL(XG(stack)) && - XDEBUG_LLIST_VALP(XDEBUG_LLIST_TAIL(XG(stack))) && - ((function_stack_entry*) XDEBUG_LLIST_VALP(XDEBUG_LLIST_TAIL(XG(stack))))->filename -- cgit