summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--REFLECTION16
-rw-r--r--php-pecl-uopz.spec17
-rw-r--r--uopz-upstream.patch288
3 files changed, 27 insertions, 294 deletions
diff --git a/REFLECTION b/REFLECTION
index 69196ce..32d802f 100644
--- a/REFLECTION
+++ b/REFLECTION
@@ -1,4 +1,10 @@
-Extension [ <persistent> extension #15 uopz version 5.0.1 ] {
+Extension [ <persistent> extension #15 uopz version 5.0.2 ] {
+
+ - INI {
+ Entry [ uopz.disable <SYSTEM> ]
+ Current = '0'
+ }
+ }
- Constants [7] {
Constant [ integer ZEND_ACC_PUBLIC ] { 256 }
@@ -11,6 +17,8 @@ Extension [ <persistent> extension #15 uopz version 5.0.1 ] {
}
- Functions {
+ Function [ <internal:uopz> function uopz_call_user_func ] {
+ }
Function [ <internal:uopz> function uopz_set_return ] {
}
Function [ <internal:uopz> function uopz_get_return ] {
@@ -51,6 +59,12 @@ Extension [ <persistent> extension #15 uopz version 5.0.1 ] {
}
Function [ <internal:uopz> function uopz_get_property ] {
}
+ Function [ <internal:uopz> function uopz_get_exit_status ] {
+ }
+ Function [ <internal:uopz> function uopz_allow_exit ] {
+ }
+ Function [ <internal:uopz> function uopz_call_user_func_array ] {
+ }
}
}
diff --git a/php-pecl-uopz.spec b/php-pecl-uopz.spec
index da82f1d..9035928 100644
--- a/php-pecl-uopz.spec
+++ b/php-pecl-uopz.spec
@@ -23,8 +23,8 @@
Summary: User Operations for Zend
Name: %{?sub_prefix}php-pecl-%{pecl_name}
-Version: 5.0.1
-Release: 6%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}
+Version: 5.0.2
+Release: 1%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}
License: PHP
Group: Development/Languages
URL: http://pecl.php.net/package/%{pecl_name}
@@ -34,8 +34,6 @@ Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit
Source0: http://pecl.php.net/get/%{pecl_name}-%{version}.tgz
%endif
-Patch0: %{pecl_name}-upstream.patch
-
BuildRequires: %{?scl_prefix}php-devel > 7
BuildRequires: %{?scl_prefix}php-pear
@@ -126,7 +124,6 @@ sed -e 's/role="test"/role="src"/' \
-i package.xml
cd NTS
-%patch0 -p1 -b .upstream
# Sanity check, really often broken
extver=$(sed -n '/#define PHP_UOPZ_VERSION/{s/.* "//;s/".*$//;p}' uopz.h)
@@ -140,6 +137,9 @@ cd ..
cat << EOF | tee %{ini_name}
; Enable '%{summary}' extension module
extension=%{pecl_name}.so
+
+; Configuration
+;uopz.disable = 0
EOF
%if %{with_zts}
@@ -149,6 +149,8 @@ cp -pr NTS ZTS
%build
+%{?dtsenable}
+
cd NTS
%{_bindir}/phpize
%configure \
@@ -165,6 +167,8 @@ make %{?_smp_mflags}
%install
+%{?dtsenable}
+
make -C NTS install INSTALL_ROOT=%{buildroot}
# install config file
@@ -249,6 +253,9 @@ REPORT_EXIT_STATUS=1 \
%changelog
+* Thu Aug 3 2017 Remi Collet <remi@remirepo.net> - 5.0.2-1
+- update to 5.0.2
+
* Tue Jul 18 2017 Remi Collet <remi@remirepo.net> - 5.0.1-6
- rebuild for PHP 7.2.0beta1 new API
diff --git a/uopz-upstream.patch b/uopz-upstream.patch
deleted file mode 100644
index fc956be..0000000
--- a/uopz-upstream.patch
+++ /dev/null
@@ -1,288 +0,0 @@
-From b15f4d83a760013142c5275a2b29244a5ef62d90 Mon Sep 17 00:00:00 2001
-From: Joe Watkins <krakjoe@php.net>
-Date: Thu, 26 May 2016 12:10:15 +0100
-Subject: [PATCH] fixes for 7.1, add leave helper function
-
----
- src/class.c | 55 +++++++++++++++++++++++++++++++++----------------------
- src/handlers.c | 33 +++++++++++++++++++++++----------
- uopz.h | 2 +-
- 3 files changed, 57 insertions(+), 33 deletions(-)
-
-diff --git a/src/class.c b/src/class.c
-index 15100d9..db9fe6c 100644
---- a/src/class.c
-+++ b/src/class.c
-@@ -27,6 +27,14 @@
-
- ZEND_EXTERN_MODULE_GLOBALS(uopz);
-
-+#if PHP_VERSION_ID >= 70100
-+# define uopz_get_scope(e) ((e) ? zend_get_executed_scope() : EG(fake_scope))
-+# define uopz_set_scope(s) EG(fake_scope) = (s)
-+#else
-+# define uopz_get_scope(e) EG(scope)
-+# define uopz_set_scope(s) EG(scope) = (s)
-+#endif
-+
- void uopz_set_mock(zend_string *clazz, zval *mock) { /* {{{ */
- zend_string *key = zend_string_tolower(clazz);
-
-@@ -131,12 +139,12 @@ zend_bool uopz_implement(zend_class_entry *clazz, zend_class_entry *interface) {
- } /* }}} */
-
- void uopz_set_property(zval *object, zval *member, zval *value) { /* {{{ */
-- zend_class_entry *scope = EG(scope);
-+ zend_class_entry *scope = uopz_get_scope(1);
- zend_class_entry *ce = Z_OBJCE_P(object);
- zend_property_info *info;
-
- do {
-- EG(scope) = ce;
-+ uopz_set_scope(ce);
-
- info = zend_get_property_info(ce, Z_STR_P(member), 1);
-
-@@ -148,25 +156,25 @@ void uopz_set_property(zval *object, zval *member, zval *value) { /* {{{ */
- } while (ce);
-
- if (info && info != ZEND_WRONG_PROPERTY_INFO) {
-- EG(scope) = info->ce;
-+ uopz_set_scope(info->ce);
- } else {
-- EG(scope) = Z_OBJCE_P(object);
-+ uopz_set_scope(Z_OBJCE_P(object));
- }
-
- Z_OBJ_HT_P(object)
- ->write_property(object, member, value, NULL);
-
-- EG(scope) = scope;
-+ uopz_set_scope(scope);
- } /* }}} */
-
- void uopz_get_property(zval *object, zval *member, zval *value) { /* {{{ */
-- zend_class_entry *scope = EG(scope);
-+ zend_class_entry *scope = uopz_get_scope(1);
- zend_class_entry *ce = Z_OBJCE_P(object);
- zend_property_info *info;
- zval *prop, rv;
-
- do {
-- EG(scope) = ce;
-+ uopz_set_scope(ce);
-
- info = zend_get_property_info(ce, Z_STR_P(member), 1);
-
-@@ -178,14 +186,15 @@ void uopz_get_property(zval *object, zval *member, zval *value) { /* {{{ */
- } while (ce);
-
- if (info && info != ZEND_WRONG_PROPERTY_INFO) {
-- EG(scope) = info->ce;
-+ uopz_set_scope(info->ce);
- } else {
-- EG(scope) = Z_OBJCE_P(object);
-+ uopz_set_scope(Z_OBJCE_P(object));
- }
-
- prop = Z_OBJ_HT_P(object)
- ->read_property(object, member, BP_VAR_R, NULL, &rv);
-- EG(scope) = scope;
-+
-+ uopz_set_scope(scope);
-
- if (!prop) {
- return;
-@@ -195,13 +204,13 @@ void uopz_get_property(zval *object, zval *member, zval *value) { /* {{{ */
- } /* }}} */
-
- void uopz_set_static_property(zend_class_entry *ce, zend_string *property, zval *value) { /* {{{ */
-- zend_class_entry *scope = EG(scope);
-+ zend_class_entry *scope = uopz_get_scope(1);
- zend_class_entry *seek = ce;
- zend_property_info *info;
- zval *prop;
-
- do {
-- EG(scope) = seek;
-+ uopz_set_scope(seek);
-
- info = zend_get_property_info(seek, property, 1);
-
-@@ -213,13 +222,14 @@ void uopz_set_static_property(zend_class_entry *ce, zend_string *property, zval
- } while (seek);
-
- if (info && info != ZEND_WRONG_PROPERTY_INFO) {
-- EG(scope) = info->ce;
-+ uopz_set_scope(info->ce);
- } else {
-- EG(scope) = ce;
-+ uopz_set_scope(ce);
- }
-
-- prop = zend_std_get_static_property(EG(scope), property, 1);
-- EG(scope) = scope;
-+ prop = zend_std_get_static_property(uopz_get_scope(0), property, 1);
-+
-+ uopz_set_scope(scope);
-
- if (!prop) {
- return;
-@@ -230,13 +240,13 @@ void uopz_set_static_property(zend_class_entry *ce, zend_string *property, zval
- } /* }}} */
-
- void uopz_get_static_property(zend_class_entry *ce, zend_string *property, zval *value) { /* {{{ */
-- zend_class_entry *scope = EG(scope);
-+ zend_class_entry *scope = uopz_get_scope(1);
- zend_class_entry *seek = ce;
- zend_property_info *info;
- zval *prop;
-
- do {
-- EG(scope) = seek;
-+ uopz_set_scope(seek);
-
- info = zend_get_property_info(seek, property, 1);
-
-@@ -248,13 +258,14 @@ void uopz_get_static_property(zend_class_entry *ce, zend_string *property, zval
- } while (seek);
-
- if (info && info != ZEND_WRONG_PROPERTY_INFO) {
-- EG(scope) = info->ce;
-+ uopz_set_scope(info->ce);
- } else {
-- EG(scope) = ce;
-+ uopz_set_scope(ce);
- }
-
-- prop = zend_std_get_static_property(EG(scope), property, 1);
-- EG(scope) = scope;
-+ prop = zend_std_get_static_property(uopz_get_scope(0), property, 1);
-+
-+ uopz_set_scope(scope);
-
- if (!prop) {
- return;
-diff --git a/src/handlers.c b/src/handlers.c
-index 11b7f5f..98e9c37 100644
---- a/src/handlers.c
-+++ b/src/handlers.c
-@@ -344,6 +344,27 @@ static inline void uopz_run_hook(zend_function *function, zend_execute_data *exe
- }
- } /* }}} */
-
-+/* {{{ */
-+static inline int php_uopz_leave_helper(zend_execute_data *execute_data) {
-+ zend_execute_data *call = EX(call);
-+ uint32_t info = ZEND_CALL_INFO(call);
-+
-+ if (info & ZEND_CALL_RELEASE_THIS) {
-+ OBJ_RELEASE(Z_OBJ(call->This));
-+ } else if (info & ZEND_CALL_CLOSURE) {
-+ OBJ_RELEASE((zend_object*)call->func->op_array.prototype);
-+ }
-+
-+ EX(call) = call->prev_execute_data;
-+
-+ zend_vm_stack_free_args(call);
-+ zend_vm_stack_free_call_frame(call);
-+
-+ EX(opline) = EX(opline) + 1;
-+
-+ return ZEND_USER_OPCODE_LEAVE;
-+} /* }}} */
-+
- int uopz_return_handler(UOPZ_OPCODE_HANDLER_ARGS) { /* {{{ */
- zend_execute_data *call = EX(call);
-
-@@ -366,26 +387,18 @@ int uopz_return_handler(UOPZ_OPCODE_HANDLER_ARGS) { /* {{{ */
-
- uopz_execute_return(ureturn, call, return_value);
-
-- EX(call) = call->prev_execute_data;
-- zend_vm_stack_free_call_frame(call);
-- EX(opline) = opline + 1;
--
- if (!RETURN_VALUE_USED(opline)) {
- zval_ptr_dtor(&rv);
- }
-
-- return ZEND_USER_OPCODE_CONTINUE;
-+ return php_uopz_leave_helper(UOPZ_OPCODE_HANDLER_ARGS_PASSTHRU);
- }
-
- if (RETURN_VALUE_USED(opline)) {
- ZVAL_COPY(return_value, &ureturn->value);
- }
-
-- EX(call) = call->prev_execute_data;
-- zend_vm_stack_free_call_frame(call);
-- EX(opline) = opline + 1;
--
-- return ZEND_USER_OPCODE_CONTINUE;
-+ return php_uopz_leave_helper(UOPZ_OPCODE_HANDLER_ARGS_PASSTHRU);
- }
- }
-
-From 90fb02322be03a3dec2f4e70db18b5626e8915c0 Mon Sep 17 00:00:00 2001
-From: Joe Watkins <krakjoe@php.net>
-Date: Fri, 20 Jan 2017 07:37:07 +0000
-Subject: [PATCH] add 7.2 to travis, fix 7.2 build
-
----
- .travis.yml | 1 +
- src/copy.c | 11 ++++++++++-
- 2 files changed, 11 insertions(+), 1 deletion(-)
-
-diff --git a/src/copy.c b/src/copy.c
-index 889eada..a1c937c 100644
---- a/src/copy.c
-+++ b/src/copy.c
-@@ -165,8 +165,17 @@ static inline zend_arg_info* uopz_copy_arginfo(zend_op_array *op_array, zend_arg
- while (it < end) {
- if (info[it].name)
- info[it].name = zend_string_copy(old[it].name);
-+#if PHP_VERSION_ID >= 70200
-+ if (ZEND_TYPE_IS_SET(old[it].type) && ZEND_TYPE_IS_CLASS(old[it].type)) {
-+ info[it].type = ZEND_TYPE_ENCODE_CLASS(
-+ zend_string_new(
-+ ZEND_TYPE_NAME(info[it].type)),
-+ ZEND_TYPE_ALLOW_NULL(info[it].type));
-+ }
-+#else
- if (info[it].class_name)
-- info[it].class_name = zend_string_copy(old[it].class_name);
-+ info[it].class_name = zend_string_new(old[it].class_name);
-+#endif
- it++;
- }
-
-From 9634704d803c9b85efa897599545cb5dac646146 Mon Sep 17 00:00:00 2001
-From: Joe Watkins <krakjoe@php.net>
-Date: Sun, 22 Jan 2017 19:20:22 +0000
-Subject: [PATCH] there is no zend_string_new here
-
----
- src/copy.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/src/copy.c b/src/copy.c
-index a1c937c..c8ca411 100644
---- a/src/copy.c
-+++ b/src/copy.c
-@@ -168,13 +168,13 @@ static inline zend_arg_info* uopz_copy_arginfo(zend_op_array *op_array, zend_arg
- #if PHP_VERSION_ID >= 70200
- if (ZEND_TYPE_IS_SET(old[it].type) && ZEND_TYPE_IS_CLASS(old[it].type)) {
- info[it].type = ZEND_TYPE_ENCODE_CLASS(
-- zend_string_new(
-+ zend_string_copy(
- ZEND_TYPE_NAME(info[it].type)),
- ZEND_TYPE_ALLOW_NULL(info[it].type));
- }
- #else
- if (info[it].class_name)
-- info[it].class_name = zend_string_new(old[it].class_name);
-+ info[it].class_name = zend_string_copy(old[it].class_name);
- #endif
- it++;
- }