diff --git a/.gitignore b/.gitignore index f8a76d8..210f253 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ clog /msgpack-2.0.2.tgz /msgpack-2.0.3-943d272.tar.gz /msgpack-2.0.3.tgz +/msgpack-2.1.0beta1.tgz diff --git a/124.patch b/124.patch deleted file mode 100644 index 96a92cd..0000000 --- a/124.patch +++ /dev/null @@ -1,2420 +0,0 @@ -From 6cd499d6bb59628332989e92506a9cbb374460b9 Mon Sep 17 00:00:00 2001 -From: Aaron Stone -Date: Thu, 29 Mar 2018 09:40:59 -0700 -Subject: [PATCH 1/9] In PHP 7.3 zend_fcall_info_cache.initialized is removed. - -Per the upgrade notes, zend_fcall_info_cache is considered initialized -if zend_fcall_info_cache.function_handler is set. ---- - msgpack_convert.c | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/msgpack_convert.c b/msgpack_convert.c -index 117727e..b1d4334 100644 ---- a/msgpack_convert.c -+++ b/msgpack_convert.c -@@ -300,7 +300,9 @@ int msgpack_convert_object(zval *return_value, zval *tpl, zval *value) /* {{{ */ - fci.params = ¶ms; - fci.no_separation = 1; - -+#if PHP_VERSION_ID < 70300 - fcc.initialized = 1; -+#endif - fcc.function_handler = ce->constructor; - - #if PHP_VERSION_ID < 70100 - -From d47169de9c31e8689387982dfbe31e4da7419858 Mon Sep 17 00:00:00 2001 -From: Aaron Stone -Date: Thu, 29 Mar 2018 09:42:17 -0700 -Subject: [PATCH 2/9] Add PHP 7.2 and 7.3 (master) to the Travis CI matrix - ---- - .travis.yml | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/.travis.yml b/.travis.yml -index d5608d2..7cd7c90 100644 ---- a/.travis.yml -+++ b/.travis.yml -@@ -3,11 +3,11 @@ language: php - php: - - 7.0 - - 7.1 -+ - 7.2 -+ - master - - matrix: - fast_finish: true -- allow_failures: -- - php: 7.1 - - notifications: - email: false - -From 00f5383020e5c9be9e9503fc9f7f954dc73437e1 Mon Sep 17 00:00:00 2001 -From: Aaron Stone -Date: Thu, 29 Mar 2018 11:13:55 -0700 -Subject: [PATCH 3/9] PHP 7.3 refactored recursive data structures protections - ---- - msgpack_pack.c | 22 +++++++++++----------- - php_msgpack.h | 17 +++++++++++++++++ - 2 files changed, 28 insertions(+), 11 deletions(-) - -diff --git a/msgpack_pack.c b/msgpack_pack.c -index 646453a..6100b01 100644 ---- a/msgpack_pack.c -+++ b/msgpack_pack.c -@@ -280,15 +280,15 @@ static inline void msgpack_serialize_array(smart_str *buf, zval *val, HashTable - value_noref = value; - } - -- if ((Z_TYPE_P(value_noref) == IS_ARRAY && ZEND_HASH_GET_APPLY_COUNT(Z_ARRVAL_P(value_noref)) > 1)) { -+ if (Z_TYPE_P(value_noref) == IS_ARRAY && Z_IS_RECURSIVE(Z_ARRVAL_P(value_noref))) { - msgpack_pack_nil(buf); - } else { -- if (Z_TYPE_P(value_noref) == IS_ARRAY && ZEND_HASH_APPLY_PROTECTION(Z_ARRVAL_P(value_noref))) { -- ZEND_HASH_INC_APPLY_COUNT(Z_ARRVAL_P(value_noref)); -+ if (Z_TYPE_P(value_noref) == IS_ARRAY && Z_REFCOUNTED_P(value_noref)) { -+ Z_PROTECT_RECURSION(Z_ARRVAL_P(value_noref)); - } - msgpack_serialize_zval(buf, value, var_hash); -- if (Z_TYPE_P(value_noref) == IS_ARRAY && ZEND_HASH_APPLY_PROTECTION(Z_ARRVAL_P(value_noref))) { -- ZEND_HASH_DEC_APPLY_COUNT(Z_ARRVAL_P(value_noref)); -+ if (Z_TYPE_P(value_noref) == IS_ARRAY && Z_REFCOUNTED_P(value_noref)) { -+ Z_UNPROTECT_RECURSION(Z_ARRVAL_P(value_noref)); - } - } - } ZEND_HASH_FOREACH_END(); -@@ -298,10 +298,10 @@ static inline void msgpack_serialize_array(smart_str *buf, zval *val, HashTable - - for (i = 0; i < n; i++) { - if ((data = zend_hash_index_find(ht, i)) == NULL || &data == &val || -- (Z_TYPE_P(data) == IS_ARRAY && ZEND_HASH_GET_APPLY_COUNT(Z_ARRVAL_P(data)) > 1)) { -+ (Z_TYPE_P(data) == IS_ARRAY && Z_IS_RECURSIVE(Z_ARRVAL_P(data)))) { - msgpack_pack_nil(buf); - } else if (Z_TYPE_P(data) == IS_REFERENCE && Z_TYPE_P(Z_REFVAL_P(data)) == IS_ARRAY && -- ZEND_HASH_GET_APPLY_COUNT(Z_ARRVAL_P(Z_REFVAL_P(data))) > 1) { -+ Z_IS_RECURSIVE(Z_ARRVAL_P(Z_REFVAL_P(data)))) { - msgpack_pack_nil(buf); - } else { - if (Z_TYPE_P(data) == IS_REFERENCE) { -@@ -310,14 +310,14 @@ static inline void msgpack_serialize_array(smart_str *buf, zval *val, HashTable - data_noref = data; - } - -- if (Z_TYPE_P(data_noref) == IS_ARRAY && ZEND_HASH_APPLY_PROTECTION(Z_ARRVAL_P(data_noref))) { -- ZEND_HASH_INC_APPLY_COUNT(Z_ARRVAL_P(data_noref)); -+ if (Z_TYPE_P(data_noref) == IS_ARRAY && Z_REFCOUNTED_P(data_noref)) { -+ Z_PROTECT_RECURSION(Z_ARRVAL_P(data_noref)); - } - - msgpack_serialize_zval(buf, data, var_hash); - -- if (Z_TYPE_P(data_noref) == IS_ARRAY && ZEND_HASH_APPLY_PROTECTION(Z_ARRVAL_P(data_noref))) { -- ZEND_HASH_DEC_APPLY_COUNT(Z_ARRVAL_P(data_noref)); -+ if (Z_TYPE_P(data_noref) == IS_ARRAY && Z_REFCOUNTED_P(data_noref)) { -+ Z_UNPROTECT_RECURSION(Z_ARRVAL_P(data_noref)); - } - } - } -diff --git a/php_msgpack.h b/php_msgpack.h -index bbc2ad2..9c152be 100644 ---- a/php_msgpack.h -+++ b/php_msgpack.h -@@ -44,4 +44,21 @@ PHP_MSGPACK_API void php_msgpack_serialize( - PHP_MSGPACK_API int php_msgpack_unserialize( - zval *return_value, char *str, size_t str_len); - -+/** Backport macro from PHP 7.3*/ -+#ifndef Z_IS_RECURSIVE -+#define Z_IS_RECURSIVE(obj) (ZEND_HASH_GET_APPLY_COUNT(obj) > 1) -+#endif -+ -+#ifndef Z_REFCOUNTED -+#define Z_REFCOUNTED ZEND_HASH_APPLY_PROTECTION(obj) -+#endif -+ -+#ifndef Z_PROTECT_RECURSION -+#define Z_PROTECT_RECURSION(obj) ZEND_HASH_INC_APPLY_COUNT(obj) -+#endif -+ -+#ifndef Z_UNPROTECT_RECURSION -+#define Z_UNPROTECT_RECURSION(obj) ZEND_HASH_DEC_APPLY_COUNT(obj) -+#endif -+ - #endif /* PHP_MSGPACK_H */ - -From 035281a93f2ee59a1f52fc65b7edc75124a72c42 Mon Sep 17 00:00:00 2001 -From: Aaron Stone -Date: Thu, 29 Mar 2018 14:23:09 -0700 -Subject: [PATCH 4/9] Make sure that every test loads the msgpack module - ---- - tests/035.phpt | 4 ++++ - tests/041.phpt | 4 ++++ - tests/bug011.phpt | 19 +++++++++++-------- - 3 files changed, 19 insertions(+), 8 deletions(-) - -diff --git a/tests/035.phpt b/tests/035.phpt -index 89c120d..ac2dc82 100644 ---- a/tests/035.phpt -+++ b/tests/035.phpt -@@ -3,6 +3,10 @@ Profiling perf test. - --SKIPIF-- - --FILE-- - array( ) -- ); -- } -- var_dump( count( msgpack_unpack( msgpack_pack( $items ) ) ) ); -+if(!extension_loaded('msgpack')) { -+ dl('msgpack.' . PHP_SHLIB_SUFFIX); -+} -+ -+$items = array( ); -+foreach( range( 0, 1024 ) as $r ) { -+ $items[] = array( -+ 'foo' => array( ) -+ ); -+} -+var_dump( count( msgpack_unpack( msgpack_pack( $items ) ) ) ); - - ?> - --EXPECT-- - -From 786aee9f73aa6507184e8540ebf06400045fe873 Mon Sep 17 00:00:00 2001 -From: Aaron Stone -Date: Thu, 29 Mar 2018 15:00:24 -0700 -Subject: [PATCH 5/9] Update bug 002 test - ---- - tests/bug002.phpt | 21 ++++++++++----------- - 1 file changed, 10 insertions(+), 11 deletions(-) - -diff --git a/tests/bug002.phpt b/tests/bug002.phpt -index bfd0ad8..2100779 100644 ---- a/tests/bug002.phpt -+++ b/tests/bug002.phpt -@@ -1,28 +1,27 @@ - --TEST-- --Bug #2 (Deserializing a large array of nested objects gives "zend_mm_heap corrupted") ----XFAIL-- --Bug is not fixed yet -+Bug #2 (Deserializing a large array of nested objects used to give "zend_mm_heap corrupted", now gives parse error) - --SKIPIF-- -+--FILE-- - - --EXPECTF-- --bool(true) -+int(1024) -+ -+Warning: [msgpack] (php_msgpack_unserialize) Parse error in %s on line %d -+bool(false) - -From fe92d448fb6978e12a033988f8653a6103185e17 Mon Sep 17 00:00:00 2001 -From: Aaron Stone -Date: Thu, 29 Mar 2018 15:13:21 -0700 -Subject: [PATCH 6/9] The random data tests are known to parse as data in PHP - 7.1+ - ---- - tests/040.phpt | 4 ++++ - tests/040b.phpt | 4 ++++ - tests/040c.phpt | 4 ++++ - tests/040d.phpt | 4 ++++ - 4 files changed, 16 insertions(+) - -diff --git a/tests/040.phpt b/tests/040.phpt -index 5b397d3..ca1f923 100644 ---- a/tests/040.phpt -+++ b/tests/040.phpt -@@ -1,6 +1,10 @@ - --TEST-- - broken random data test - --SKIPIF-- -+ -Date: Thu, 29 Mar 2018 16:00:19 -0700 -Subject: [PATCH 7/9] Assume the test runner will load the msgpack module - ---- - tests/001.phpt | 1 - - tests/002.phpt | 3 --- - tests/003.phpt | 3 --- - tests/004.phpt | 3 --- - tests/005.phpt | 3 --- - tests/006.phpt | 3 --- - tests/007.phpt | 3 --- - tests/008.phpt | 3 --- - tests/009.phpt | 3 --- - tests/010.phpt | 3 --- - tests/012.phpt | 3 --- - tests/013.phpt | 3 --- - tests/014.phpt | 3 --- - tests/015.phpt | 3 --- - tests/015b.phpt | 3 --- - tests/015e.phpt | 3 --- - tests/016.phpt | 3 --- - tests/017.phpt | 3 --- - tests/018.phpt | 3 --- - tests/019.phpt | 3 --- - tests/020.phpt | 3 --- - tests/021.phpt | 3 --- - tests/022.phpt | 3 --- - tests/023.phpt | 3 --- - tests/024.phpt | 3 --- - tests/025.phpt | 3 --- - tests/026.phpt | 3 --- - tests/027.phpt | 3 --- - tests/028.phpt | 3 --- - tests/029.phpt | 1 - - tests/031.phpt | 3 --- - tests/032.phpt | 3 --- - tests/033.phpt | 3 --- - tests/034.phpt | 3 --- - tests/035.phpt | 3 --- - tests/040.phpt | 3 --- - tests/040b.phpt | 3 --- - tests/040c.phpt | 3 --- - tests/040d.phpt | 3 --- - tests/041.phpt | 3 --- - tests/042.phpt | 3 --- - tests/050.phpt | 3 --- - tests/060.phpt | 3 --- - tests/061.phpt | 3 --- - tests/062.phpt | 3 --- - tests/063.phpt | 3 --- - tests/064.phpt | 3 --- - tests/065.phpt | 3 --- - tests/066.phpt | 3 --- - tests/067.phpt | 3 --- - tests/070.phpt | 3 --- - tests/071.phpt | 3 --- - tests/072.phpt | 3 --- - tests/073.phpt | 3 --- - tests/080.phpt | 3 --- - tests/081.phpt | 3 --- - tests/082.phpt | 3 --- - tests/083.phpt | 3 --- - tests/084.phpt | 3 --- - tests/085.phpt | 3 --- - tests/086.phpt | 3 --- - tests/087.phpt | 3 --- - tests/088.phpt | 3 --- - tests/089.phpt | 3 --- - tests/090.phpt | 4 ---- - tests/091.phpt | 4 ---- - tests/092.phpt | 4 ---- - tests/093.phpt | 4 ---- - tests/094.phpt | 4 ---- - tests/095.phpt | 4 ---- - tests/096.phpt | 4 ---- - tests/097.phpt | 4 ---- - tests/098.phpt | 4 ---- - tests/099.phpt | 4 ---- - tests/100.phpt | 4 ---- - tests/101.phpt | 4 ---- - tests/102.phpt | 4 ---- - tests/103.phpt | 4 ---- - tests/104.phpt | 4 ---- - tests/105.phpt | 4 ---- - tests/106.phpt | 4 ---- - tests/107.phpt | 4 ---- - tests/108.phpt | 4 ---- - tests/109.phpt | 4 ---- - tests/110.phpt | 4 ---- - tests/111.phpt | 4 ---- - tests/112.phpt | 4 ---- - tests/113.phpt | 4 ---- - tests/114.phpt | 4 ---- - tests/115.phpt | 4 ---- - tests/116.phpt | 4 ---- - tests/117.phpt | 4 ---- - tests/118.phpt | 4 ---- - tests/119.phpt | 4 ---- - tests/120.phpt | 4 ---- - tests/121.phpt | 4 ---- - tests/122.phpt | 4 ---- - tests/123.phpt | 4 ---- - tests/124.phpt | 4 ---- - tests/125.phpt | 4 ---- - tests/126.phpt | 4 ---- - tests/127.phpt | 4 ---- - tests/128.phpt | 4 ---- - tests/129.phpt | 4 ---- - tests/130.phpt | 4 ---- - tests/131.phpt | 4 ---- - tests/132.phpt | 4 ---- - tests/133.phpt | 4 ---- - tests/134.phpt | 4 ---- - tests/135.phpt | 4 ---- - tests/136.phpt | 4 ---- - tests/137.phpt | 31 ++++++++++++++----------------- - tests/138.phpt | 34 +++++++++++++++------------------- - tests/139.phpt | 4 ---- - tests/bug002.phpt | 3 --- - tests/bug006.phpt | 3 --- - tests/bug011.phpt | 3 --- - tests/bug012.phpt | 3 --- - tests/bug013.phpt | 4 ---- - tests/issue023.phpt | 4 ---- - tests/issue080.phpt | 4 ---- - tests/issue094.phpt | 4 ---- - 122 files changed, 29 insertions(+), 444 deletions(-) - -diff --git a/tests/001.phpt b/tests/001.phpt -index 840ae46..4f4f23d 100644 ---- a/tests/001.phpt -+++ b/tests/001.phpt -@@ -1,7 +1,6 @@ - --TEST-- - Check for msgpack presence - --SKIPIF-- -- - --FILE-- - - --EXPECTF-- -diff --git a/tests/138.phpt b/tests/138.phpt -index f519c08..961b4ff 100644 ---- a/tests/138.phpt -+++ b/tests/138.phpt -@@ -2,30 +2,26 @@ - unpack bin format family - --SKIPIF-- - - --EXPECTF-- - string(9) "bin8 test" -diff --git a/tests/139.phpt b/tests/139.phpt -index 5c0abb3..da46bd2 100644 ---- a/tests/139.phpt -+++ b/tests/139.phpt -@@ -7,10 +7,6 @@ if (version_compare(PHP_VERSION, '5.2.0') < 0) { - } - --FILE-- - 2, 1 => 3); -diff --git a/tests/bug011.phpt b/tests/bug011.phpt -index 0f926a3..32112db 100644 ---- a/tests/bug011.phpt -+++ b/tests/bug011.phpt -@@ -2,9 +2,6 @@ - Bug #011 (Check for segfault with empty array structures) - --FILE-- - -Date: Thu, 29 Mar 2018 16:06:56 -0700 -Subject: [PATCH 8/9] Z_IS_RECURSIVE_P - ---- - msgpack_pack.c | 6 +++--- - php_msgpack.h | 4 ++-- - 2 files changed, 5 insertions(+), 5 deletions(-) - -diff --git a/msgpack_pack.c b/msgpack_pack.c -index 6100b01..c7051e6 100644 ---- a/msgpack_pack.c -+++ b/msgpack_pack.c -@@ -280,7 +280,7 @@ static inline void msgpack_serialize_array(smart_str *buf, zval *val, HashTable - value_noref = value; - } - -- if (Z_TYPE_P(value_noref) == IS_ARRAY && Z_IS_RECURSIVE(Z_ARRVAL_P(value_noref))) { -+ if (Z_TYPE_P(value_noref) == IS_ARRAY && Z_IS_RECURSIVE_P(value_noref)) { - msgpack_pack_nil(buf); - } else { - if (Z_TYPE_P(value_noref) == IS_ARRAY && Z_REFCOUNTED_P(value_noref)) { -@@ -298,10 +298,10 @@ static inline void msgpack_serialize_array(smart_str *buf, zval *val, HashTable - - for (i = 0; i < n; i++) { - if ((data = zend_hash_index_find(ht, i)) == NULL || &data == &val || -- (Z_TYPE_P(data) == IS_ARRAY && Z_IS_RECURSIVE(Z_ARRVAL_P(data)))) { -+ (Z_TYPE_P(data) == IS_ARRAY && Z_IS_RECURSIVE_P(data))) { - msgpack_pack_nil(buf); - } else if (Z_TYPE_P(data) == IS_REFERENCE && Z_TYPE_P(Z_REFVAL_P(data)) == IS_ARRAY && -- Z_IS_RECURSIVE(Z_ARRVAL_P(Z_REFVAL_P(data)))) { -+ Z_IS_RECURSIVE_P(Z_REFVAL_P(data))) { - msgpack_pack_nil(buf); - } else { - if (Z_TYPE_P(data) == IS_REFERENCE) { -diff --git a/php_msgpack.h b/php_msgpack.h -index 9c152be..65195a3 100644 ---- a/php_msgpack.h -+++ b/php_msgpack.h -@@ -45,8 +45,8 @@ PHP_MSGPACK_API int php_msgpack_unserialize( - zval *return_value, char *str, size_t str_len); - - /** Backport macro from PHP 7.3*/ --#ifndef Z_IS_RECURSIVE --#define Z_IS_RECURSIVE(obj) (ZEND_HASH_GET_APPLY_COUNT(obj) > 1) -+#ifndef Z_IS_RECURSIVE_P -+#define Z_IS_RECURSIVE_P(obj) (ZEND_HASH_GET_APPLY_COUNT(Z_ARRVAL_P(obj)) > 1) - #endif - - #ifndef Z_REFCOUNTED - -From 066c2499c33c3b0a6d430de194560b408d118085 Mon Sep 17 00:00:00 2001 -From: Aaron Stone -Date: Thu, 29 Mar 2018 18:12:05 -0700 -Subject: [PATCH 9/9] Z_PROTECT_RECURSION_P - ---- - msgpack_pack.c | 8 ++++---- - php_msgpack.h | 8 ++++---- - 2 files changed, 8 insertions(+), 8 deletions(-) - -diff --git a/msgpack_pack.c b/msgpack_pack.c -index c7051e6..b9785a8 100644 ---- a/msgpack_pack.c -+++ b/msgpack_pack.c -@@ -284,11 +284,11 @@ static inline void msgpack_serialize_array(smart_str *buf, zval *val, HashTable - msgpack_pack_nil(buf); - } else { - if (Z_TYPE_P(value_noref) == IS_ARRAY && Z_REFCOUNTED_P(value_noref)) { -- Z_PROTECT_RECURSION(Z_ARRVAL_P(value_noref)); -+ Z_PROTECT_RECURSION_P(value_noref); - } - msgpack_serialize_zval(buf, value, var_hash); - if (Z_TYPE_P(value_noref) == IS_ARRAY && Z_REFCOUNTED_P(value_noref)) { -- Z_UNPROTECT_RECURSION(Z_ARRVAL_P(value_noref)); -+ Z_UNPROTECT_RECURSION_P(value_noref); - } - } - } ZEND_HASH_FOREACH_END(); -@@ -311,13 +311,13 @@ static inline void msgpack_serialize_array(smart_str *buf, zval *val, HashTable - } - - if (Z_TYPE_P(data_noref) == IS_ARRAY && Z_REFCOUNTED_P(data_noref)) { -- Z_PROTECT_RECURSION(Z_ARRVAL_P(data_noref)); -+ Z_PROTECT_RECURSION_P(data_noref); - } - - msgpack_serialize_zval(buf, data, var_hash); - - if (Z_TYPE_P(data_noref) == IS_ARRAY && Z_REFCOUNTED_P(data_noref)) { -- Z_UNPROTECT_RECURSION(Z_ARRVAL_P(data_noref)); -+ Z_UNPROTECT_RECURSION_P(data_noref); - } - } - } -diff --git a/php_msgpack.h b/php_msgpack.h -index 65195a3..6707bef 100644 ---- a/php_msgpack.h -+++ b/php_msgpack.h -@@ -53,12 +53,12 @@ PHP_MSGPACK_API int php_msgpack_unserialize( - #define Z_REFCOUNTED ZEND_HASH_APPLY_PROTECTION(obj) - #endif - --#ifndef Z_PROTECT_RECURSION --#define Z_PROTECT_RECURSION(obj) ZEND_HASH_INC_APPLY_COUNT(obj) -+#ifndef Z_PROTECT_RECURSION_P -+#define Z_PROTECT_RECURSION_P(obj) ZEND_HASH_INC_APPLY_COUNT(Z_ARRVAL_P(obj)) - #endif - --#ifndef Z_UNPROTECT_RECURSION --#define Z_UNPROTECT_RECURSION(obj) ZEND_HASH_DEC_APPLY_COUNT(obj) -+#ifndef Z_UNPROTECT_RECURSION_P -+#define Z_UNPROTECT_RECURSION_P(obj) ZEND_HASH_DEC_APPLY_COUNT(Z_ARRVAL_P(obj)) - #endif - - #endif /* PHP_MSGPACK_H */ diff --git a/125.patch b/125.patch deleted file mode 100644 index 7744d05..0000000 --- a/125.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 98d4af769b3c1ee42240c7dfb3799a2ce5edb3f3 Mon Sep 17 00:00:00 2001 -From: Remi Collet -Date: Tue, 26 Jun 2018 14:56:03 +0200 -Subject: [PATCH] fix ce->name is a zend_string - ---- - msgpack_convert.c | 2 +- - msgpack_unpack.c | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/msgpack_convert.c b/msgpack_convert.c -index 117727e..85d1da6 100644 ---- a/msgpack_convert.c -+++ b/msgpack_convert.c -@@ -314,7 +314,7 @@ int msgpack_convert_object(zval *return_value, zval *tpl, zval *value) /* {{{ */ - if (zend_call_function(&fci, &fcc) == FAILURE) { - MSGPACK_WARNING( - "[msgpack] (%s) Invocation of %s's constructor failed", -- __FUNCTION__, ce->name); -+ __FUNCTION__, ZSTR_VAL(ce->name)); - - return FAILURE; - } -diff --git a/msgpack_unpack.c b/msgpack_unpack.c -index 263341b..6c3f30b 100644 ---- a/msgpack_unpack.c -+++ b/msgpack_unpack.c -@@ -557,7 +557,7 @@ int msgpack_unserialize_map_item(msgpack_unserialize_data *unpack, zval **contai - if (ce->unserialize == NULL) { - MSGPACK_WARNING( - "[msgpack] (%s) Class %s has no unserializer", -- __FUNCTION__, ce->name); -+ __FUNCTION__, ZSTR_VAL(ce->name)); - - MSGPACK_UNSERIALIZE_FINISH_MAP_ITEM(unpack, key, val); - diff --git a/php-pecl-msgpack.spec b/php-pecl-msgpack.spec index ffa8532..0af4d56 100644 --- a/php-pecl-msgpack.spec +++ b/php-pecl-msgpack.spec @@ -1,6 +1,6 @@ # Fedora spec file for php-pecl-msgpack # -# Copyright (c) 2012-2018 Remi Collet +# Copyright (c) 2012-2019 Remi Collet # License: CC-BY-SA # http://creativecommons.org/licenses/by-sa/4.0/ # @@ -10,32 +10,32 @@ # we don't want -z defs linker flag %undefine _strict_symbol_defs_build +%global upstream_version 2.1.0 +%global upstream_prever beta1 +%global upstream_lower beta1 + %global pecl_name msgpack %global with_zts 0%{?__ztsphp:1} %global ini_name 40-%{pecl_name}.ini # system library is outdated, and bundled library includes not yet released changes -# e.g. missing template_callback_str in 1.4.1 +# BTW, only pack_template.h and unpack_template.h headers are used %global with_msgpack 0 Summary: API for communicating with MessagePack serialization Name: php-pecl-msgpack -Version: 2.0.3 -Release: 4%{?dist} -Source: http://pecl.php.net/get/%{pecl_name}-%{version}.tgz +Version: %{upstream_version}%{?upstream_lower:~%{upstream_lower}} +Release: 1%{?dist} +Source: https://pecl.php.net/get/%{pecl_name}-%{upstream_version}%{?upstream_prever}.tgz License: BSD -URL: http://pecl.php.net/package/msgpack - -Patch2: https://patch-diff.githubusercontent.com/raw/msgpack/msgpack-php/pull/125.patch +URL: https://pecl.php.net/package/msgpack BuildRequires: php-devel > 7 BuildRequires: php-pear %if %{with_msgpack} BuildRequires: msgpack-devel %else -Provides: bundled(msgpack) +Provides: bundled(msgpack) = 3.2.0 %endif -# https://github.com/msgpack/msgpack-php/issues/25 -ExcludeArch: ppc64 Requires: php(zend-abi) = %{php_zend_api} Requires: php(api) = %{php_core_api} @@ -73,13 +73,11 @@ These are the files needed to compile programs using MessagePack serializer. %prep %setup -qc -mv %{pecl_name}-%{version} NTS +mv %{pecl_name}-%{upstream_version}%{?upstream_prever} NTS sed -e '/LICENSE/s/role="doc"/role="src"/' -i package.xml cd NTS -%patch2 -p1 -b .pr125 - %if %{with_msgpack} # use system library rm -rf msgpack @@ -90,8 +88,8 @@ rm -rf msgpack # Sanity check, really often broken extver=$(sed -n '/#define PHP_MSGPACK_VERSION/{s/.* "//;s/".*$//;p}' php_msgpack.h) -if test "x${extver}" != "x%{version}%{?gh_date:-dev}"; then - : Error: Upstream extension version is ${extver}, expecting %{version}%{?gh_date:-dev}. +if test "x${extver}" != "x%{upstream_version}%{?upstream_prever}%{?gh_date:-dev}"; then + : Error: Upstream extension version is ${extver}, expecting %{upstream_version}%{?upstream_prever}%{?gh_date:-dev}. exit 1 fi cd .. @@ -157,8 +155,6 @@ done # Erratic results rm */tests/034.phpt # Known by upstream as failed test (travis result) -rm */tests/041.phpt -rm */tests/040*.phpt cd NTS : Minimal load test for NTS extension @@ -213,6 +209,9 @@ REPORT_EXIT_STATUS=0 \ %changelog +* Fri Dec 20 2019 Remi Collet - 2.1.0~beta1-1 +- update to 2.1.0beta1 + * Thu Oct 03 2019 Remi Collet - 2.0.3-4 - rebuild for https://fedoraproject.org/wiki/Changes/php74 diff --git a/sources b/sources index 51ff50a..cd2194c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (msgpack-2.0.3.tgz) = 4eaf5d2cd50796349414d8272e210f1c8c2e82d72383f440e13d31742a75b0e2fa1f48bd916c057b4c65778bd90eace7dcc0cdb86931620963e666f3aa6905db +SHA512 (msgpack-2.1.0beta1.tgz) = c128e4d5528dcbee37fb11b7f3062aa03f1d721b665e7231d56f30b331fd6a8be3a5adae587847de6a434b27789ea62c62ad9857ac26597e68b640911d8c6900