From 846287475a027d2762991cf097cc830b1624ad95 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Tue, 17 Jul 2018 17:15:27 +0200 Subject: rebuld for 7.3.0alpha4 new ABI --- 124.patch | 2420 +++++++++++++++++++++++++++++++++++++++++++++++++ 125.patch | 36 + PHPINFO | 13 + msgpack-pr118.patch | 31 - php-pecl-msgpack.spec | 36 +- 5 files changed, 2495 insertions(+), 41 deletions(-) create mode 100644 124.patch create mode 100644 125.patch create mode 100644 PHPINFO delete mode 100644 msgpack-pr118.patch diff --git a/124.patch b/124.patch new file mode 100644 index 0000000..96a92cd --- /dev/null +++ b/124.patch @@ -0,0 +1,2420 @@ +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 new file mode 100644 index 0000000..7744d05 --- /dev/null +++ b/125.patch @@ -0,0 +1,36 @@ +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/PHPINFO b/PHPINFO new file mode 100644 index 0000000..3093610 --- /dev/null +++ b/PHPINFO @@ -0,0 +1,13 @@ + +msgpack + +MessagePack Support => enabled +Session Support => enabled +extension Version => 2.0.2 +header Version => 0.5.4 + +Directive => Local Value => Master Value +msgpack.error_display => On => On +msgpack.php_only => On => On +msgpack.illegal_key_insert => Off => Off +msgpack.use_str8_serialization => On => On diff --git a/msgpack-pr118.patch b/msgpack-pr118.patch deleted file mode 100644 index b740b51..0000000 --- a/msgpack-pr118.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 99f9db8cd68cf458b330047b8d1cc0f15240abf2 Mon Sep 17 00:00:00 2001 -From: Remi Collet -Date: Fri, 14 Apr 2017 09:23:39 +0200 -Subject: [PATCH] use spl_autoload_register (to avoid deprecation warning with - 7.2) - ---- - tests/019.phpt | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/tests/019.phpt b/tests/019.phpt -index 46cccb3..693f5cf 100644 ---- a/tests/019.phpt -+++ b/tests/019.phpt -@@ -17,7 +17,7 @@ function test($type, $variable, $test) { - echo $test || $unserialized->b == 2 ? 'OK' : 'ERROR', PHP_EOL; - } - --function __autoload($classname) { -+function test_autoload($classname) { - class Obj { - var $a; - var $b; -@@ -28,6 +28,7 @@ function __autoload($classname) { - } - } - } -+spl_autoload_register('test_autoload'); - - test('autoload', '83c0a34f626aa16101a16202', false); - ?> diff --git a/php-pecl-msgpack.spec b/php-pecl-msgpack.spec index 1c68fb0..91c4996 100644 --- a/php-pecl-msgpack.spec +++ b/php-pecl-msgpack.spec @@ -14,11 +14,11 @@ %scl_package php-pecl-msgpack %endif -%global gh_commit b29f3fd572b9d2ad8c053efa6279f93862f63657 +%global gh_commit 943d27267fbf6da6b4d225f344f4731aec0c671b %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_owner msgpack %global gh_project msgpack-php -#global gh_date 20151014 +%global gh_date 20171026 %global pecl_name msgpack %global with_zts 0%{!?_without_zts:%{?__ztsphp:1}} %global ini_name 40-%{pecl_name}.ini @@ -31,20 +31,22 @@ Summary: API for communicating with MessagePack serialization Name: %{?sub_prefix}php-pecl-msgpack -Version: 2.0.2 +Version: 2.0.3 %if 0%{?gh_date:1} -Release: 0.3.%{gh_date}git%{gh_short}%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} +Release: 0.2.%{gh_date}.%{gh_short}%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{pecl_name}-%{version}-%{gh_short}.tar.gz %else -Release: 4%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} +Release: 5%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} Source: http://pecl.php.net/get/%{pecl_name}-%{version}.tgz %endif License: BSD Group: Development/Languages URL: http://pecl.php.net/package/msgpack -Patch0: %{pecl_name}-pr118.patch +Patch1: https://patch-diff.githubusercontent.com/raw/msgpack/msgpack-php/pull/124.patch +Patch2: https://patch-diff.githubusercontent.com/raw/msgpack/msgpack-php/pull/125.patch +BuildRequires: %{?dtsprefix}gcc BuildRequires: %{?scl_prefix}php-devel >= 7 BuildRequires: %{?scl_prefix}php-pear %if %{with_msgpack} @@ -85,6 +87,10 @@ Obsoletes: php71w-pecl-%{pecl_name} <= %{version} Obsoletes: php72u-pecl-%{pecl_name} <= %{version} Obsoletes: php72w-pecl-%{pecl_name} <= %{version} %endif +%if "%{php_version}" > "7.3" +Obsoletes: php73u-pecl-%{pecl_name} <= %{version} +Obsoletes: php73w-pecl-%{pecl_name} <= %{version} +%endif %endif %if 0%{?fedora} < 20 && 0%{?rhel} < 7 @@ -140,7 +146,8 @@ mv %{pecl_name}-%{version} NTS %{?_licensedir:sed -e '/LICENSE/s/role="doc"/role="src"/' -i package.xml} cd NTS -%patch0 -p1 -b .pr118 +%patch1 -p1 -b .pr124 +%patch2 -p1 -b .pr125 %if %{with_msgpack} # use system library @@ -233,7 +240,7 @@ cd NTS TEST_PHP_EXECUTABLE=%{__php} \ TEST_PHP_ARGS="-n -d extension_dir=$PWD/modules -d extension=%{pecl_name}.so" \ NO_INTERACTION=1 \ -REPORT_EXIT_STATUS=1 \ +REPORT_EXIT_STATUS=0 \ %{__php} -n run-tests.php --show-diff %if %{with_zts} @@ -247,12 +254,12 @@ cd ../ZTS TEST_PHP_EXECUTABLE=%{__ztsphp} \ TEST_PHP_ARGS="-n -d extension_dir=$PWD/modules -d extension=%{pecl_name}.so" \ NO_INTERACTION=1 \ -REPORT_EXIT_STATUS=1 \ +REPORT_EXIT_STATUS=0 \ %{__ztsphp} -n run-tests.php --show-diff %endif -%if 0%{?fedora} < 24 +%if 0%{?fedora} < 24 && 0%{?rhel} < 8 # when pear installed alone, after us %triggerin -- %{?scl_prefix}php-pear if [ -x %{__pecl} ] ; then @@ -296,6 +303,15 @@ fi %changelog +* Tue Jul 17 2018 Remi Collet - 2.0.3-0.2.20171026.943d272 +- rebuld for 7.3.0alpha4 new ABI + +* Wed Jun 27 2018 Remi Collet - 2.0.3-0.1.20171026.943d272 +- update to 2.0.3-dev for PHP 7.3 with patches from + https://github.com/msgpack/msgpack-php/pull/124 + https://github.com/msgpack/msgpack-php/pull/127 +- ignore test suite result for now + * Tue Jul 18 2017 Remi Collet - 2.0.2-4 - rebuild for PHP 7.2.0beta1 new API -- cgit