diff options
author | Remi Collet <remi@remirepo.net> | 2017-12-21 07:32:07 +0100 |
---|---|---|
committer | Remi Collet <remi@remirepo.net> | 2017-12-21 07:32:07 +0100 |
commit | ddb2416ea84fe8d92a691f4711950d22f69916b5 (patch) | |
tree | c6e4fa98b0ad74ef0f7429411c25ab42a08b12ea | |
parent | 7c8634aff23827ad067965d96dad7959e0a64f0d (diff) |
v3.5.1
-rw-r--r-- | 4034.patch | 324 | ||||
-rw-r--r-- | REFLECTION | 229 | ||||
-rw-r--r-- | php-pecl-protobuf.spec | 9 |
3 files changed, 161 insertions, 401 deletions
diff --git a/4034.patch b/4034.patch deleted file mode 100644 index e77070d..0000000 --- a/4034.patch +++ /dev/null @@ -1,324 +0,0 @@ -From 9f6aceaa8ce8250d9e36225180c218035bd49fe9 Mon Sep 17 00:00:00 2001 -From: Bo Yang <teboring@google.com> -Date: Tue, 12 Dec 2017 12:06:51 -0800 -Subject: [PATCH 1/4] Add PROTOBUF_ENABLE_TIMESTAMP to let user decide whether - timestamp util can be used at install time. - ---- - php/ext/google/protobuf/message.c | 13 ++++++++++++- - php/tests/test.sh | 2 +- - 2 files changed, 13 insertions(+), 2 deletions(-) - -diff --git a/php/ext/google/protobuf/message.c b/php/ext/google/protobuf/message.c -index b14c1f0c5a..70080a3b6e 100644 ---- a/php/ext/google/protobuf/message.c -+++ b/php/ext/google/protobuf/message.c -@@ -29,9 +29,12 @@ - // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - #include <php.h> --#include <ext/date/php_date.h> - #include <stdlib.h> - -+#ifdef PROTOBUF_ENABLE_TIMESTAMP -+#include <ext/date/php_date.h> -+#endif -+ - #include "protobuf.h" - #include "utf8.h" - -@@ -1121,6 +1124,7 @@ PHP_PROTO_FIELD_ACCESSORS(Timestamp, timestamp, Seconds, "seconds") - PHP_PROTO_FIELD_ACCESSORS(Timestamp, timestamp, Nanos, "nanos") - - PHP_METHOD(Timestamp, fromDateTime) { -+#ifdef PROTOBUF_ENABLE_TIMESTAMP - zval* datetime; - zval member; - -@@ -1149,9 +1153,13 @@ PHP_METHOD(Timestamp, fromDateTime) { - storage = message_data(self); - memory = slot_memory(self->descriptor->layout, storage, field); - *(int32_t*)memory = 0; -+#else -+ zend_error(E_USER_ERROR, "fromDateTime needs date extension."); -+#endif - } - - PHP_METHOD(Timestamp, toDateTime) { -+#ifdef PROTOBUF_ENABLE_TIMESTAMP - zval datetime; - php_date_instantiate(php_date_get_date_ce(), &datetime TSRMLS_CC); - php_date_obj* dateobj = UNBOX(php_date_obj, &datetime); -@@ -1184,6 +1192,9 @@ PHP_METHOD(Timestamp, toDateTime) { - - zval* datetime_ptr = &datetime; - PHP_PROTO_RETVAL_ZVAL(datetime_ptr); -+#else -+ zend_error(E_USER_ERROR, "toDateTime needs date extension."); -+#endif - } - - // ----------------------------------------------------------------------------- -From 88102eae8f86045307e9d46ad900f91158227f2b Mon Sep 17 00:00:00 2001 -From: Bo Yang <teboring@google.com> -Date: Tue, 12 Dec 2017 13:57:49 -0800 -Subject: [PATCH 2/4] Replace private timelib_update_ts with public - date_timestamp_get - ---- - php/ext/google/protobuf/message.c | 24 +++++++++++++++++++----- - php/tests/memory_leak_test.php | 12 ++++++++++++ - 2 files changed, 31 insertions(+), 5 deletions(-) - -diff --git a/php/ext/google/protobuf/message.c b/php/ext/google/protobuf/message.c -index 70080a3b6e..5b654a78d6 100644 ---- a/php/ext/google/protobuf/message.c -+++ b/php/ext/google/protobuf/message.c -@@ -1133,12 +1133,24 @@ PHP_METHOD(Timestamp, fromDateTime) { - return; - } - -- php_date_obj* dateobj = UNBOX(php_date_obj, datetime); -- if (!dateobj->time->sse_uptodate) { -- timelib_update_ts(dateobj->time, NULL); -+ // Get timestamp from Datetime object. -+ zval* retval_ptr; -+ zval* function_name; -+ int64_t timestamp; -+ -+ MAKE_STD_ZVAL(retval_ptr); -+ MAKE_STD_ZVAL(function_name); -+ -+ ZVAL_STRING(function_name, "date_timestamp_get", 1); -+ -+ if (call_user_function(EG(function_table), NULL, -+ function_name, retval_ptr, 1, -+ &datetime TSRMLS_CC) == SUCCESS) { -+ protobuf_convert_to_int64(retval_ptr, ×tamp); - } - -- int64_t timestamp = dateobj->time->sse; -+ zval_ptr_dtor(&retval_ptr); -+ zval_ptr_dtor(&function_name); - - // Set seconds - MessageHeader* self = UNBOX(MessageHeader, getThis()); -@@ -1146,13 +1158,15 @@ PHP_METHOD(Timestamp, fromDateTime) { - upb_msgdef_ntofz(self->descriptor->msgdef, "seconds"); - void* storage = message_data(self); - void* memory = slot_memory(self->descriptor->layout, storage, field); -- *(int64_t*)memory = dateobj->time->sse; -+ *(int64_t*)memory = timestamp; - - // Set nanos - field = upb_msgdef_ntofz(self->descriptor->msgdef, "nanos"); - storage = message_data(self); - memory = slot_memory(self->descriptor->layout, storage, field); - *(int32_t*)memory = 0; -+ -+ RETURN_NULL(); - #else - zend_error(E_USER_ERROR, "fromDateTime needs date extension."); - #endif - -From fffe8d39f810d147c6db65f90ae4f71f4e0f0116 Mon Sep 17 00:00:00 2001 -From: Bo Yang <teboring@google.com> -Date: Tue, 12 Dec 2017 17:47:04 -0800 -Subject: [PATCH 3/4] Call php method via function name instead of calling - directly. - -This changes the linking error if php extension is not statically linked -to a runtime error. In this way, users who don't need Timestamp can -still use protobuf even if date extension is not statically linked in -php. ---- - php/ext/google/protobuf/message.c | 70 ++++++++++++++++++++++---------------- - php/ext/google/protobuf/protobuf.h | 4 +++ - php/tests/memory_leak_test.php | 8 ++--- - php/tests/test.sh | 2 +- - 4 files changed, 50 insertions(+), 34 deletions(-) - -diff --git a/php/ext/google/protobuf/message.c b/php/ext/google/protobuf/message.c -index 5b654a78d6..7d7d86517a 100644 ---- a/php/ext/google/protobuf/message.c -+++ b/php/ext/google/protobuf/message.c -@@ -31,10 +31,6 @@ - #include <php.h> - #include <stdlib.h> - --#ifdef PROTOBUF_ENABLE_TIMESTAMP --#include <ext/date/php_date.h> --#endif -- - #include "protobuf.h" - #include "utf8.h" - -@@ -1124,7 +1120,6 @@ PHP_PROTO_FIELD_ACCESSORS(Timestamp, timestamp, Seconds, "seconds") - PHP_PROTO_FIELD_ACCESSORS(Timestamp, timestamp, Nanos, "nanos") - - PHP_METHOD(Timestamp, fromDateTime) { --#ifdef PROTOBUF_ENABLE_TIMESTAMP - zval* datetime; - zval member; - -@@ -1134,23 +1129,27 @@ PHP_METHOD(Timestamp, fromDateTime) { - } - - // Get timestamp from Datetime object. -- zval* retval_ptr; -- zval* function_name; -+ zval retval; -+ zval function_name; - int64_t timestamp; - -- MAKE_STD_ZVAL(retval_ptr); -- MAKE_STD_ZVAL(function_name); -+#if PHP_MAJOR_VERSION < 7 -+ INIT_ZVAL(retval); -+ INIT_ZVAL(function_name); -+#endif - -- ZVAL_STRING(function_name, "date_timestamp_get", 1); -+ PHP_PROTO_ZVAL_STRING(&function_name, "date_timestamp_get", 1); - -- if (call_user_function(EG(function_table), NULL, -- function_name, retval_ptr, 1, -- &datetime TSRMLS_CC) == SUCCESS) { -- protobuf_convert_to_int64(retval_ptr, ×tamp); -+ if (call_user_function(EG(function_table), NULL, &function_name, &retval, 1, -+ ZVAL_PTR_TO_CACHED_PTR(datetime) TSRMLS_CC) == FAILURE) { -+ zend_error(E_ERROR, "Cannot get timestamp from DateTime."); -+ return; - } - -- zval_ptr_dtor(&retval_ptr); -- zval_ptr_dtor(&function_name); -+ protobuf_convert_to_int64(&retval, ×tamp); -+ -+ zval_dtor(&retval); -+ zval_dtor(&function_name); - - // Set seconds - MessageHeader* self = UNBOX(MessageHeader, getThis()); -@@ -1167,17 +1166,9 @@ PHP_METHOD(Timestamp, fromDateTime) { - *(int32_t*)memory = 0; - - RETURN_NULL(); --#else -- zend_error(E_USER_ERROR, "fromDateTime needs date extension."); --#endif - } - - PHP_METHOD(Timestamp, toDateTime) { --#ifdef PROTOBUF_ENABLE_TIMESTAMP -- zval datetime; -- php_date_instantiate(php_date_get_date_ce(), &datetime TSRMLS_CC); -- php_date_obj* dateobj = UNBOX(php_date_obj, &datetime); -- - // Get seconds - MessageHeader* self = UNBOX(MessageHeader, getThis()); - const upb_fielddef* field = -@@ -1198,16 +1189,37 @@ PHP_METHOD(Timestamp, toDateTime) { - strftime(formated_time, sizeof(formated_time), "%Y-%m-%dT%H:%M:%SUTC", - utc_time); - -- if (!php_date_initialize(dateobj, formated_time, strlen(formated_time), NULL, -- NULL, 0 TSRMLS_CC)) { -- zval_dtor(&datetime); -- RETURN_NULL(); -+ // Create Datetime object. -+ zval datetime; -+ zval formated_time_php; -+ zval function_name; -+ int64_t timestamp = 0; -+ -+#if PHP_MAJOR_VERSION < 7 -+ INIT_ZVAL(function_name); -+ INIT_ZVAL(formated_time_php); -+#endif -+ -+ PHP_PROTO_ZVAL_STRING(&function_name, "date_create", 1); -+ PHP_PROTO_ZVAL_STRING(&formated_time_php, formated_time, 1); -+ -+ CACHED_VALUE params[1] = {ZVAL_TO_CACHED_VALUE(formated_time_php)}; -+ -+ if (call_user_function(EG(function_table), NULL, -+ &function_name, &datetime, 1, -+ params TSRMLS_CC) == FAILURE) { -+ zend_error(E_ERROR, "Cannot create DateTime."); -+ return; - } - -+ zval_dtor(&formated_time_php); -+ zval_dtor(&function_name); -+ -+#if PHP_MAJOR_VERSION < 7 - zval* datetime_ptr = &datetime; - PHP_PROTO_RETVAL_ZVAL(datetime_ptr); - #else -- zend_error(E_USER_ERROR, "toDateTime needs date extension."); -+ ZVAL_OBJ(return_value, Z_OBJ(datetime)); - #endif - } - -diff --git a/php/ext/google/protobuf/protobuf.h b/php/ext/google/protobuf/protobuf.h -index f299b4150d..6ab0f13478 100644 ---- a/php/ext/google/protobuf/protobuf.h -+++ b/php/ext/google/protobuf/protobuf.h -@@ -182,6 +182,8 @@ - #define CACHED_TO_ZVAL_PTR(VALUE) (VALUE) - #define CACHED_PTR_TO_ZVAL_PTR(VALUE) (*VALUE) - #define ZVAL_PTR_TO_CACHED_PTR(VALUE) (&VALUE) -+#define ZVAL_PTR_TO_CACHED_VALUE(VALUE) (VALUE) -+#define ZVAL_TO_CACHED_VALUE(VALUE) (&VALUE) - - #define CREATE_OBJ_ON_ALLOCATED_ZVAL_PTR(zval_ptr, class_type) \ - ZVAL_OBJ(zval_ptr, class_type->create_object(class_type TSRMLS_CC)); -@@ -452,6 +454,8 @@ static inline int php_proto_zend_hash_get_current_data_ex(HashTable* ht, - #define CACHED_TO_ZVAL_PTR(VALUE) (&VALUE) - #define CACHED_PTR_TO_ZVAL_PTR(VALUE) (VALUE) - #define ZVAL_PTR_TO_CACHED_PTR(VALUE) (VALUE) -+#define ZVAL_PTR_TO_CACHED_VALUE(VALUE) (*VALUE) -+#define ZVAL_TO_CACHED_VALUE(VALUE) (VALUE) - - #define CREATE_OBJ_ON_ALLOCATED_ZVAL_PTR(zval_ptr, class_type) \ - ZVAL_OBJ(zval_ptr, class_type->create_object(class_type)); - -From 1a549d9a902151e980bfa76093b3d82b7589e158 Mon Sep 17 00:00:00 2001 -From: Bo Yang <teboring@google.com> -Date: Wed, 13 Dec 2017 17:09:55 -0800 -Subject: [PATCH 4/4] Avoid using php_date_get_date_ce() in case date extension - is not available. - ---- - php/ext/google/protobuf/message.c | 17 +++++++++++++++-- - 1 file changed, 15 insertions(+), 2 deletions(-) - -diff --git a/php/ext/google/protobuf/message.c b/php/ext/google/protobuf/message.c -index 7d7d86517a..df5eb408a1 100644 ---- a/php/ext/google/protobuf/message.c -+++ b/php/ext/google/protobuf/message.c -@@ -1123,8 +1123,21 @@ PHP_METHOD(Timestamp, fromDateTime) { - zval* datetime; - zval member; - -- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O", &datetime, -- php_date_get_date_ce()) == FAILURE) { -+ if (zend_parse_parameters( -+ ZEND_NUM_ARGS() TSRMLS_CC, "z", &datetime) == FAILURE) { -+ return; -+ } -+ -+ zend_class_entry* ce = Z_OBJCE_P(datetime); -+ PHP_PROTO_CE_DECLARE datetime_ce; -+ if (php_proto_zend_lookup_class("\\Datetime", 9, &datetime_ce) == -+ FAILURE) { -+ zend_error(E_ERROR, "Make sure date extension is enabled."); -+ return; -+ } -+ -+ if (!instanceof_function(PHP_PROTO_CE_UNREF(datetime_ce), ce TSRMLS_CC)) { -+ zend_error(E_USER_ERROR, "Expect Datetime."); - return; - } - @@ -1,4 +1,8 @@ -Extension [ <persistent> extension #122 protobuf version 3.5.0.1 ] { +Extension [ <persistent> extension #122 protobuf version 3.5.1 ] { + + - Dependencies { + Dependency [ date (Optional) ] + } - Classes [54] { Class [ <internal:protobuf> class Google\Protobuf\DescriptorPool ] { @@ -148,24 +152,24 @@ Extension [ <persistent> extension #122 protobuf version 3.5.0.1 ] { Class [ <internal:protobuf> class Google\Protobuf\Internal\GPBType ] { - Constants [18] { - Constant [ integer DOUBLE ] { 1 } - Constant [ integer FLOAT ] { 2 } - Constant [ integer INT64 ] { 3 } - Constant [ integer UINT64 ] { 4 } - Constant [ integer INT32 ] { 5 } - Constant [ integer FIXED64 ] { 6 } - Constant [ integer FIXED32 ] { 7 } - Constant [ integer BOOL ] { 8 } - Constant [ integer STRING ] { 9 } - Constant [ integer GROUP ] { 10 } - Constant [ integer MESSAGE ] { 11 } - Constant [ integer BYTES ] { 12 } - Constant [ integer UINT32 ] { 13 } - Constant [ integer ENUM ] { 14 } - Constant [ integer SFIXED32 ] { 15 } - Constant [ integer SFIXED64 ] { 16 } - Constant [ integer SINT32 ] { 17 } - Constant [ integer SINT64 ] { 18 } + Constant [ public integer DOUBLE ] { 1 } + Constant [ public integer FLOAT ] { 2 } + Constant [ public integer INT64 ] { 3 } + Constant [ public integer UINT64 ] { 4 } + Constant [ public integer INT32 ] { 5 } + Constant [ public integer FIXED64 ] { 6 } + Constant [ public integer FIXED32 ] { 7 } + Constant [ public integer BOOL ] { 8 } + Constant [ public integer STRING ] { 9 } + Constant [ public integer GROUP ] { 10 } + Constant [ public integer MESSAGE ] { 11 } + Constant [ public integer BYTES ] { 12 } + Constant [ public integer UINT32 ] { 13 } + Constant [ public integer ENUM ] { 14 } + Constant [ public integer SFIXED32 ] { 15 } + Constant [ public integer SFIXED64 ] { 16 } + Constant [ public integer SINT32 ] { 17 } + Constant [ public integer SINT64 ] { 18 } } - Static properties [0] { @@ -325,10 +329,13 @@ Extension [ <persistent> extension #122 protobuf version 3.5.0.1 ] { - Properties [0] { } - - Methods [10] { + - Methods [11] { Method [ <internal:protobuf> public method clear ] { } + Method [ <internal:protobuf> public method discardUnknownFields ] { + } + Method [ <internal:protobuf> public method serializeToString ] { } @@ -825,7 +832,7 @@ Extension [ <persistent> extension #122 protobuf version 3.5.0.1 ] { Property [ <default> private $value ] } - - Methods [17] { + - Methods [18] { Method [ <internal:protobuf, ctor> public method __construct ] { } @@ -853,6 +860,9 @@ Extension [ <persistent> extension #122 protobuf version 3.5.0.1 ] { Method [ <internal:protobuf, inherits Google\Protobuf\Internal\Message> public method clear ] { } + Method [ <internal:protobuf, inherits Google\Protobuf\Internal\Message> public method discardUnknownFields ] { + } + Method [ <internal:protobuf, inherits Google\Protobuf\Internal\Message> public method serializeToString ] { } @@ -900,7 +910,7 @@ Extension [ <persistent> extension #122 protobuf version 3.5.0.1 ] { Property [ <default> private $syntax ] } - - Methods [24] { + - Methods [25] { Method [ <internal:protobuf, ctor> public method __construct ] { } @@ -949,6 +959,9 @@ Extension [ <persistent> extension #122 protobuf version 3.5.0.1 ] { Method [ <internal:protobuf, inherits Google\Protobuf\Internal\Message> public method clear ] { } + Method [ <internal:protobuf, inherits Google\Protobuf\Internal\Message> public method discardUnknownFields ] { + } + Method [ <internal:protobuf, inherits Google\Protobuf\Internal\Message> public method serializeToString ] { } @@ -990,7 +1003,7 @@ Extension [ <persistent> extension #122 protobuf version 3.5.0.1 ] { Property [ <default> private $value ] } - - Methods [12] { + - Methods [13] { Method [ <internal:protobuf, ctor> public method __construct ] { } @@ -1003,6 +1016,9 @@ Extension [ <persistent> extension #122 protobuf version 3.5.0.1 ] { Method [ <internal:protobuf, inherits Google\Protobuf\Internal\Message> public method clear ] { } + Method [ <internal:protobuf, inherits Google\Protobuf\Internal\Message> public method discardUnknownFields ] { + } + Method [ <internal:protobuf, inherits Google\Protobuf\Internal\Message> public method serializeToString ] { } @@ -1044,7 +1060,7 @@ Extension [ <persistent> extension #122 protobuf version 3.5.0.1 ] { Property [ <default> private $value ] } - - Methods [12] { + - Methods [13] { Method [ <internal:protobuf, ctor> public method __construct ] { } @@ -1057,6 +1073,9 @@ Extension [ <persistent> extension #122 protobuf version 3.5.0.1 ] { Method [ <internal:protobuf, inherits Google\Protobuf\Internal\Message> public method clear ] { } + Method [ <internal:protobuf, inherits Google\Protobuf\Internal\Message> public method discardUnknownFields ] { + } + Method [ <internal:protobuf, inherits Google\Protobuf\Internal\Message> public method serializeToString ] { } @@ -1098,7 +1117,7 @@ Extension [ <persistent> extension #122 protobuf version 3.5.0.1 ] { Property [ <default> private $value ] } - - Methods [12] { + - Methods [13] { Method [ <internal:protobuf, ctor> public method __construct ] { } @@ -1111,6 +1130,9 @@ Extension [ <persistent> extension #122 protobuf version 3.5.0.1 ] { Method [ <internal:protobuf, inherits Google\Protobuf\Internal\Message> public method clear ] { } + Method [ <internal:protobuf, inherits Google\Protobuf\Internal\Message> public method discardUnknownFields ] { + } + Method [ <internal:protobuf, inherits Google\Protobuf\Internal\Message> public method serializeToString ] { } @@ -1153,7 +1175,7 @@ Extension [ <persistent> extension #122 protobuf version 3.5.0.1 ] { Property [ <default> private $nanos ] } - - Methods [14] { + - Methods [15] { Method [ <internal:protobuf, ctor> public method __construct ] { } @@ -1172,6 +1194,9 @@ Extension [ <persistent> extension #122 protobuf version 3.5.0.1 ] { Method [ <internal:protobuf, inherits Google\Protobuf\Internal\Message> public method clear ] { } + Method [ <internal:protobuf, inherits Google\Protobuf\Internal\Message> public method discardUnknownFields ] { + } + Method [ <internal:protobuf, inherits Google\Protobuf\Internal\Message> public method serializeToString ] { } @@ -1217,7 +1242,7 @@ Extension [ <persistent> extension #122 protobuf version 3.5.0.1 ] { Property [ <default> private $syntax ] } - - Methods [20] { + - Methods [21] { Method [ <internal:protobuf, ctor> public method __construct ] { } @@ -1254,6 +1279,9 @@ Extension [ <persistent> extension #122 protobuf version 3.5.0.1 ] { Method [ <internal:protobuf, inherits Google\Protobuf\Internal\Message> public method clear ] { } + Method [ <internal:protobuf, inherits Google\Protobuf\Internal\Message> public method discardUnknownFields ] { + } + Method [ <internal:protobuf, inherits Google\Protobuf\Internal\Message> public method serializeToString ] { } @@ -1297,7 +1325,7 @@ Extension [ <persistent> extension #122 protobuf version 3.5.0.1 ] { Property [ <default> private $options ] } - - Methods [16] { + - Methods [17] { Method [ <internal:protobuf, ctor> public method __construct ] { } @@ -1322,6 +1350,9 @@ Extension [ <persistent> extension #122 protobuf version 3.5.0.1 ] { Method [ <internal:protobuf, inherits Google\Protobuf\Internal\Message> public method clear ] { } + Method [ <internal:protobuf, inherits Google\Protobuf\Internal\Message> public method discardUnknownFields ] { + } + Method [ <internal:protobuf, inherits Google\Protobuf\Internal\Message> public method serializeToString ] { } @@ -1351,10 +1382,10 @@ Extension [ <persistent> extension #122 protobuf version 3.5.0.1 ] { Class [ <internal:protobuf> class Google\Protobuf\Field_Cardinality ] { - Constants [4] { - Constant [ integer CARDINALITY_UNKNOWN ] { 0 } - Constant [ integer CARDINALITY_OPTIONAL ] { 1 } - Constant [ integer CARDINALITY_REQUIRED ] { 2 } - Constant [ integer CARDINALITY_REPEATED ] { 3 } + Constant [ public integer CARDINALITY_UNKNOWN ] { 0 } + Constant [ public integer CARDINALITY_OPTIONAL ] { 1 } + Constant [ public integer CARDINALITY_REQUIRED ] { 2 } + Constant [ public integer CARDINALITY_REPEATED ] { 3 } } - Static properties [0] { @@ -1394,7 +1425,7 @@ Extension [ <persistent> extension #122 protobuf version 3.5.0.1 ] { Property [ <default> private $default_value ] } - - Methods [30] { + - Methods [31] { Method [ <internal:protobuf, ctor> public method __construct ] { } @@ -1461,6 +1492,9 @@ Extension [ <persistent> extension #122 protobuf version 3.5.0.1 ] { Method [ <internal:protobuf, inherits Google\Protobuf\Internal\Message> public method clear ] { } + Method [ <internal:protobuf, inherits Google\Protobuf\Internal\Message> public method discardUnknownFields ] { + } + Method [ <internal:protobuf, inherits Google\Protobuf\Internal\Message> public method serializeToString ] { } @@ -1490,25 +1524,25 @@ Extension [ <persistent> extension #122 protobuf version 3.5.0.1 ] { Class [ <internal:protobuf> class Google\Protobuf\Field_Kind ] { - Constants [19] { - Constant [ integer TYPE_UNKNOWN ] { 0 } - Constant [ integer TYPE_DOUBLE ] { 1 } - Constant [ integer TYPE_FLOAT ] { 2 } - Constant [ integer TYPE_INT64 ] { 3 } - Constant [ integer TYPE_UINT64 ] { 4 } - Constant [ integer TYPE_INT32 ] { 5 } - Constant [ integer TYPE_FIXED64 ] { 6 } - Constant [ integer TYPE_FIXED32 ] { 7 } - Constant [ integer TYPE_BOOL ] { 8 } - Constant [ integer TYPE_STRING ] { 9 } - Constant [ integer TYPE_GROUP ] { 10 } - Constant [ integer TYPE_MESSAGE ] { 11 } - Constant [ integer TYPE_BYTES ] { 12 } - Constant [ integer TYPE_UINT32 ] { 13 } - Constant [ integer TYPE_ENUM ] { 14 } - Constant [ integer TYPE_SFIXED32 ] { 15 } - Constant [ integer TYPE_SFIXED64 ] { 16 } - Constant [ integer TYPE_SINT32 ] { 17 } - Constant [ integer TYPE_SINT64 ] { 18 } + Constant [ public integer TYPE_UNKNOWN ] { 0 } + Constant [ public integer TYPE_DOUBLE ] { 1 } + Constant [ public integer TYPE_FLOAT ] { 2 } + Constant [ public integer TYPE_INT64 ] { 3 } + Constant [ public integer TYPE_UINT64 ] { 4 } + Constant [ public integer TYPE_INT32 ] { 5 } + Constant [ public integer TYPE_FIXED64 ] { 6 } + Constant [ public integer TYPE_FIXED32 ] { 7 } + Constant [ public integer TYPE_BOOL ] { 8 } + Constant [ public integer TYPE_STRING ] { 9 } + Constant [ public integer TYPE_GROUP ] { 10 } + Constant [ public integer TYPE_MESSAGE ] { 11 } + Constant [ public integer TYPE_BYTES ] { 12 } + Constant [ public integer TYPE_UINT32 ] { 13 } + Constant [ public integer TYPE_ENUM ] { 14 } + Constant [ public integer TYPE_SFIXED32 ] { 15 } + Constant [ public integer TYPE_SFIXED64 ] { 16 } + Constant [ public integer TYPE_SINT32 ] { 17 } + Constant [ public integer TYPE_SINT64 ] { 18 } } - Static properties [0] { @@ -1539,7 +1573,7 @@ Extension [ <persistent> extension #122 protobuf version 3.5.0.1 ] { Property [ <default> private $paths ] } - - Methods [12] { + - Methods [13] { Method [ <internal:protobuf, ctor> public method __construct ] { } @@ -1552,6 +1586,9 @@ Extension [ <persistent> extension #122 protobuf version 3.5.0.1 ] { Method [ <internal:protobuf, inherits Google\Protobuf\Internal\Message> public method clear ] { } + Method [ <internal:protobuf, inherits Google\Protobuf\Internal\Message> public method discardUnknownFields ] { + } + Method [ <internal:protobuf, inherits Google\Protobuf\Internal\Message> public method serializeToString ] { } @@ -1593,7 +1630,7 @@ Extension [ <persistent> extension #122 protobuf version 3.5.0.1 ] { Property [ <default> private $value ] } - - Methods [12] { + - Methods [13] { Method [ <internal:protobuf, ctor> public method __construct ] { } @@ -1606,6 +1643,9 @@ Extension [ <persistent> extension #122 protobuf version 3.5.0.1 ] { Method [ <internal:protobuf, inherits Google\Protobuf\Internal\Message> public method clear ] { } + Method [ <internal:protobuf, inherits Google\Protobuf\Internal\Message> public method discardUnknownFields ] { + } + Method [ <internal:protobuf, inherits Google\Protobuf\Internal\Message> public method serializeToString ] { } @@ -1646,13 +1686,16 @@ Extension [ <persistent> extension #122 protobuf version 3.5.0.1 ] { - Properties [0] { } - - Methods [10] { + - Methods [11] { Method [ <internal:protobuf, ctor> public method __construct ] { } Method [ <internal:protobuf, inherits Google\Protobuf\Internal\Message> public method clear ] { } + Method [ <internal:protobuf, inherits Google\Protobuf\Internal\Message> public method discardUnknownFields ] { + } + Method [ <internal:protobuf, inherits Google\Protobuf\Internal\Message> public method serializeToString ] { } @@ -1694,7 +1737,7 @@ Extension [ <persistent> extension #122 protobuf version 3.5.0.1 ] { Property [ <default> private $value ] } - - Methods [12] { + - Methods [13] { Method [ <internal:protobuf, ctor> public method __construct ] { } @@ -1707,6 +1750,9 @@ Extension [ <persistent> extension #122 protobuf version 3.5.0.1 ] { Method [ <internal:protobuf, inherits Google\Protobuf\Internal\Message> public method clear ] { } + Method [ <internal:protobuf, inherits Google\Protobuf\Internal\Message> public method discardUnknownFields ] { + } + Method [ <internal:protobuf, inherits Google\Protobuf\Internal\Message> public method serializeToString ] { } @@ -1748,7 +1794,7 @@ Extension [ <persistent> extension #122 protobuf version 3.5.0.1 ] { Property [ <default> private $value ] } - - Methods [12] { + - Methods [13] { Method [ <internal:protobuf, ctor> public method __construct ] { } @@ -1761,6 +1807,9 @@ Extension [ <persistent> extension #122 protobuf version 3.5.0.1 ] { Method [ <internal:protobuf, inherits Google\Protobuf\Internal\Message> public method clear ] { } + Method [ <internal:protobuf, inherits Google\Protobuf\Internal\Message> public method discardUnknownFields ] { + } + Method [ <internal:protobuf, inherits Google\Protobuf\Internal\Message> public method serializeToString ] { } @@ -1802,7 +1851,7 @@ Extension [ <persistent> extension #122 protobuf version 3.5.0.1 ] { Property [ <default> private $values ] } - - Methods [12] { + - Methods [13] { Method [ <internal:protobuf, ctor> public method __construct ] { } @@ -1815,6 +1864,9 @@ Extension [ <persistent> extension #122 protobuf version 3.5.0.1 ] { Method [ <internal:protobuf, inherits Google\Protobuf\Internal\Message> public method clear ] { } + Method [ <internal:protobuf, inherits Google\Protobuf\Internal\Message> public method discardUnknownFields ] { + } + Method [ <internal:protobuf, inherits Google\Protobuf\Internal\Message> public method serializeToString ] { } @@ -1862,7 +1914,7 @@ Extension [ <persistent> extension #122 protobuf version 3.5.0.1 ] { Property [ <default> private $syntax ] } - - Methods [24] { + - Methods [25] { Method [ <internal:protobuf, ctor> public method __construct ] { } @@ -1911,6 +1963,9 @@ Extension [ <persistent> extension #122 protobuf version 3.5.0.1 ] { Method [ <internal:protobuf, inherits Google\Protobuf\Internal\Message> public method clear ] { } + Method [ <internal:protobuf, inherits Google\Protobuf\Internal\Message> public method discardUnknownFields ] { + } + Method [ <internal:protobuf, inherits Google\Protobuf\Internal\Message> public method serializeToString ] { } @@ -1953,7 +2008,7 @@ Extension [ <persistent> extension #122 protobuf version 3.5.0.1 ] { Property [ <default> private $root ] } - - Methods [14] { + - Methods [15] { Method [ <internal:protobuf, ctor> public method __construct ] { } @@ -1972,6 +2027,9 @@ Extension [ <persistent> extension #122 protobuf version 3.5.0.1 ] { Method [ <internal:protobuf, inherits Google\Protobuf\Internal\Message> public method clear ] { } + Method [ <internal:protobuf, inherits Google\Protobuf\Internal\Message> public method discardUnknownFields ] { + } + Method [ <internal:protobuf, inherits Google\Protobuf\Internal\Message> public method serializeToString ] { } @@ -2001,7 +2059,7 @@ Extension [ <persistent> extension #122 protobuf version 3.5.0.1 ] { Class [ <internal:protobuf> class Google\Protobuf\NullValue ] { - Constants [1] { - Constant [ integer NULL_VALUE ] { 0 } + Constant [ public integer NULL_VALUE ] { 0 } } - Static properties [0] { @@ -2033,7 +2091,7 @@ Extension [ <persistent> extension #122 protobuf version 3.5.0.1 ] { Property [ <default> private $value ] } - - Methods [14] { + - Methods [15] { Method [ <internal:protobuf, ctor> public method __construct ] { } @@ -2052,6 +2110,9 @@ Extension [ <persistent> extension #122 protobuf version 3.5.0.1 ] { Method [ <internal:protobuf, inherits Google\Protobuf\Internal\Message> public method clear ] { } + Method [ <internal:protobuf, inherits Google\Protobuf\Internal\Message> public method discardUnknownFields ] { + } + Method [ <internal:protobuf, inherits Google\Protobuf\Internal\Message> public method serializeToString ] { } @@ -2093,7 +2154,7 @@ Extension [ <persistent> extension #122 protobuf version 3.5.0.1 ] { Property [ <default> private $file_name ] } - - Methods [12] { + - Methods [13] { Method [ <internal:protobuf, ctor> public method __construct ] { } @@ -2106,6 +2167,9 @@ Extension [ <persistent> extension #122 protobuf version 3.5.0.1 ] { Method [ <internal:protobuf, inherits Google\Protobuf\Internal\Message> public method clear ] { } + Method [ <internal:protobuf, inherits Google\Protobuf\Internal\Message> public method discardUnknownFields ] { + } + Method [ <internal:protobuf, inherits Google\Protobuf\Internal\Message> public method serializeToString ] { } @@ -2147,7 +2211,7 @@ Extension [ <persistent> extension #122 protobuf version 3.5.0.1 ] { Property [ <default> private $value ] } - - Methods [12] { + - Methods [13] { Method [ <internal:protobuf, ctor> public method __construct ] { } @@ -2160,6 +2224,9 @@ Extension [ <persistent> extension #122 protobuf version 3.5.0.1 ] { Method [ <internal:protobuf, inherits Google\Protobuf\Internal\Message> public method clear ] { } + Method [ <internal:protobuf, inherits Google\Protobuf\Internal\Message> public method discardUnknownFields ] { + } + Method [ <internal:protobuf, inherits Google\Protobuf\Internal\Message> public method serializeToString ] { } @@ -2201,7 +2268,7 @@ Extension [ <persistent> extension #122 protobuf version 3.5.0.1 ] { Property [ <default> private $fields ] } - - Methods [12] { + - Methods [13] { Method [ <internal:protobuf, ctor> public method __construct ] { } @@ -2214,6 +2281,9 @@ Extension [ <persistent> extension #122 protobuf version 3.5.0.1 ] { Method [ <internal:protobuf, inherits Google\Protobuf\Internal\Message> public method clear ] { } + Method [ <internal:protobuf, inherits Google\Protobuf\Internal\Message> public method discardUnknownFields ] { + } + Method [ <internal:protobuf, inherits Google\Protobuf\Internal\Message> public method serializeToString ] { } @@ -2243,8 +2313,8 @@ Extension [ <persistent> extension #122 protobuf version 3.5.0.1 ] { Class [ <internal:protobuf> class Google\Protobuf\Syntax ] { - Constants [2] { - Constant [ integer SYNTAX_PROTO2 ] { 0 } - Constant [ integer SYNTAX_PROTO3 ] { 1 } + Constant [ public integer SYNTAX_PROTO2 ] { 0 } + Constant [ public integer SYNTAX_PROTO3 ] { 1 } } - Static properties [0] { @@ -2276,7 +2346,7 @@ Extension [ <persistent> extension #122 protobuf version 3.5.0.1 ] { Property [ <default> private $nanos ] } - - Methods [16] { + - Methods [17] { Method [ <internal:protobuf, ctor> public method __construct ] { } @@ -2301,6 +2371,9 @@ Extension [ <persistent> extension #122 protobuf version 3.5.0.1 ] { Method [ <internal:protobuf, inherits Google\Protobuf\Internal\Message> public method clear ] { } + Method [ <internal:protobuf, inherits Google\Protobuf\Internal\Message> public method discardUnknownFields ] { + } + Method [ <internal:protobuf, inherits Google\Protobuf\Internal\Message> public method serializeToString ] { } @@ -2347,7 +2420,7 @@ Extension [ <persistent> extension #122 protobuf version 3.5.0.1 ] { Property [ <default> private $syntax ] } - - Methods [22] { + - Methods [23] { Method [ <internal:protobuf, ctor> public method __construct ] { } @@ -2390,6 +2463,9 @@ Extension [ <persistent> extension #122 protobuf version 3.5.0.1 ] { Method [ <internal:protobuf, inherits Google\Protobuf\Internal\Message> public method clear ] { } + Method [ <internal:protobuf, inherits Google\Protobuf\Internal\Message> public method discardUnknownFields ] { + } + Method [ <internal:protobuf, inherits Google\Protobuf\Internal\Message> public method serializeToString ] { } @@ -2431,7 +2507,7 @@ Extension [ <persistent> extension #122 protobuf version 3.5.0.1 ] { Property [ <default> private $value ] } - - Methods [12] { + - Methods [13] { Method [ <internal:protobuf, ctor> public method __construct ] { } @@ -2444,6 +2520,9 @@ Extension [ <persistent> extension #122 protobuf version 3.5.0.1 ] { Method [ <internal:protobuf, inherits Google\Protobuf\Internal\Message> public method clear ] { } + Method [ <internal:protobuf, inherits Google\Protobuf\Internal\Message> public method discardUnknownFields ] { + } + Method [ <internal:protobuf, inherits Google\Protobuf\Internal\Message> public method serializeToString ] { } @@ -2485,7 +2564,7 @@ Extension [ <persistent> extension #122 protobuf version 3.5.0.1 ] { Property [ <default> private $value ] } - - Methods [12] { + - Methods [13] { Method [ <internal:protobuf, ctor> public method __construct ] { } @@ -2498,6 +2577,9 @@ Extension [ <persistent> extension #122 protobuf version 3.5.0.1 ] { Method [ <internal:protobuf, inherits Google\Protobuf\Internal\Message> public method clear ] { } + Method [ <internal:protobuf, inherits Google\Protobuf\Internal\Message> public method discardUnknownFields ] { + } + Method [ <internal:protobuf, inherits Google\Protobuf\Internal\Message> public method serializeToString ] { } @@ -2539,7 +2621,7 @@ Extension [ <persistent> extension #122 protobuf version 3.5.0.1 ] { Property [ <default> private $kind ] } - - Methods [23] { + - Methods [24] { Method [ <internal:protobuf, ctor> public method __construct ] { } @@ -2585,6 +2667,9 @@ Extension [ <persistent> extension #122 protobuf version 3.5.0.1 ] { Method [ <internal:protobuf, inherits Google\Protobuf\Internal\Message> public method clear ] { } + Method [ <internal:protobuf, inherits Google\Protobuf\Internal\Message> public method discardUnknownFields ] { + } + Method [ <internal:protobuf, inherits Google\Protobuf\Internal\Message> public method serializeToString ] { } diff --git a/php-pecl-protobuf.spec b/php-pecl-protobuf.spec index df92870..1b3059a 100644 --- a/php-pecl-protobuf.spec +++ b/php-pecl-protobuf.spec @@ -21,15 +21,13 @@ Summary: Mechanism for serializing structured data Name: %{?sub_prefix}php-pecl-%{pecl_name} -Version: 3.5.0.1 +Version: 3.5.1 Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} License: BSD Group: Development/Languages URL: http://pecl.php.net/package/%{pecl_name} Source0: http://pecl.php.net/get/%{pecl_name}-%{version}%{?prever}.tgz -Patch0: https://patch-diff.githubusercontent.com/raw/google/protobuf/pull/4034.patch - BuildRequires: %{?scl_prefix}php-devel >= 5.5.9 BuildRequires: %{?scl_prefix}php-pear @@ -100,8 +98,6 @@ sed -e 's/role="test"/role="src"/' \ cd NTS -%patch0 -p5 -b .upstream - # Sanity check, really often broken extver=$(sed -n '/#define PHP_PROTOBUF_VERSION/{s/.* "//;s/".*$//;p}' protobuf.h) if test "x${extver}" != "x%{version}%{?prever}"; then @@ -218,6 +214,9 @@ fi %changelog +* Thu Dec 21 2017 Remi Collet <remi@remirepo.net> - 3.5.1-1 +- Update to 3.5.1 + * Thu Dec 14 2017 Remi Collet <remi@remirepo.net> - 3.5.0.1-1 - add upstream patch to drop timelib_update_ts need |