From f74a57841075b2226488162ac969ccd448763804 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Fri, 19 Nov 2021 15:15:26 +0100 Subject: update to 5.0.1 drop patch merged upstream --- PHPINFO | 8 ++-- REFLECTION | 87 ++++++++++++++++++++++++++++++---- integration-tests-check.php | 11 ----- php-pecl-rdkafka5.spec | 17 +++---- rdkafka-php81.patch | 113 -------------------------------------------- 5 files changed, 89 insertions(+), 147 deletions(-) delete mode 100644 integration-tests-check.php delete mode 100644 rdkafka-php81.patch diff --git a/PHPINFO b/PHPINFO index b943ece..fa84f38 100644 --- a/PHPINFO +++ b/PHPINFO @@ -2,7 +2,7 @@ rdkafka rdkafka support => enabled -version => 5.0.0 -build date => Jan 27 2021 00:00:00 -librdkafka version (runtime) => 1.6.0 -librdkafka version (build) => 1.6.0.255 +version => 5.0.1 +build date => Nov 19 2021 00:00:00 +librdkafka version (runtime) => 1.8.2 +librdkafka version (build) => 1.8.2.255 diff --git a/REFLECTION b/REFLECTION index 36e94f1..016d951 100644 --- a/REFLECTION +++ b/REFLECTION @@ -1,6 +1,6 @@ -Extension [ extension #99 rdkafka version 5.0.0 ] { +Extension [ extension #128 rdkafka version 5.0.1 ] { - - Constants [183] { + - Constants [184] { Constant [ int RD_KAFKA_CONSUMER ] { 1 } Constant [ int RD_KAFKA_OFFSET_BEGINNING ] { -2 } Constant [ int RD_KAFKA_OFFSET_END ] { -1 } @@ -11,8 +11,8 @@ Extension [ extension #99 rdkafka version 5.0.0 ] { Constant [ int RD_KAFKA_PURGE_F_QUEUE ] { 1 } Constant [ int RD_KAFKA_PURGE_F_INFLIGHT ] { 2 } Constant [ int RD_KAFKA_PURGE_F_NON_BLOCKING ] { 4 } - Constant [ int RD_KAFKA_VERSION ] { 17170687 } - Constant [ int RD_KAFKA_BUILD_VERSION ] { 17170687 } + Constant [ int RD_KAFKA_VERSION ] { 17302271 } + Constant [ int RD_KAFKA_BUILD_VERSION ] { 17302271 } Constant [ int RD_KAFKA_RESP_ERR__BEGIN ] { -200 } Constant [ int RD_KAFKA_RESP_ERR__BAD_MSG ] { -199 } Constant [ int RD_KAFKA_RESP_ERR__BAD_COMPRESSION ] { -198 } @@ -73,6 +73,7 @@ Extension [ extension #99 rdkafka version 5.0.0 ] { Constant [ int RD_KAFKA_RESP_ERR__APPLICATION ] { -143 } Constant [ int RD_KAFKA_RESP_ERR__ASSIGNMENT_LOST ] { -142 } Constant [ int RD_KAFKA_RESP_ERR__NOOP ] { -141 } + Constant [ int RD_KAFKA_RESP_ERR__AUTO_OFFSET_RESET ] { -140 } Constant [ int RD_KAFKA_RESP_ERR__END ] { -100 } Constant [ int RD_KAFKA_RESP_ERR_UNKNOWN ] { -1 } Constant [ int RD_KAFKA_RESP_ERR_NO_ERROR ] { 0 } @@ -192,6 +193,12 @@ Extension [ extension #99 rdkafka version 5.0.0 ] { - Parameters [0] { } } + Function [ function rd_kafka_err2name ] { + + - Parameters [1] { + Parameter #0 [ $err ] + } + } Function [ function rd_kafka_err2str ] { - Parameters [1] { @@ -239,7 +246,7 @@ Extension [ extension #99 rdkafka version 5.0.0 ] { Property [ private $dr_cb ] } - - Methods [13] { + - Methods [15] { Method [ public method addBrokers ] { - Parameters [1] { @@ -338,6 +345,20 @@ Extension [ extension #99 rdkafka version 5.0.0 ] { Parameter #1 [ $timeout_ms ] } } + + Method [ public method pausePartitions ] { + + - Parameters [1] { + Parameter #0 [ $topic_partitions ] + } + } + + Method [ public method resumePartitions ] { + + - Parameters [1] { + Parameter #0 [ $topic_partitions ] + } + } } } @@ -355,7 +376,7 @@ Extension [ extension #99 rdkafka version 5.0.0 ] { - Properties [0] { } - - Methods [15] { + - Methods [17] { Method [ public method __construct ] { - Parameters [1] { @@ -467,6 +488,20 @@ Extension [ extension #99 rdkafka version 5.0.0 ] { Parameter #1 [ $timeout_ms ] } } + + Method [ public method pausePartitions ] { + + - Parameters [1] { + Parameter #0 [ $topic_partitions ] + } + } + + Method [ public method resumePartitions ] { + + - Parameters [1] { + Parameter #0 [ $topic_partitions ] + } + } } } @@ -484,7 +519,7 @@ Extension [ extension #99 rdkafka version 5.0.0 ] { - Properties [0] { } - - Methods [18] { + - Methods [20] { Method [ public method __construct ] { - Parameters [1] { @@ -617,6 +652,20 @@ Extension [ extension #99 rdkafka version 5.0.0 ] { Parameter #1 [ $timeout_ms ] } } + + Method [ public method pausePartitions ] { + + - Parameters [1] { + Parameter #0 [ $topic_partitions ] + } + } + + Method [ public method resumePartitions ] { + + - Parameters [1] { + Parameter #0 [ $topic_partitions ] + } + } } } @@ -919,7 +968,7 @@ Extension [ extension #99 rdkafka version 5.0.0 ] { Property [ private $dr_msg_cb ] } - - Methods [16] { + - Methods [18] { Method [ public method __construct ] { - Parameters [1] { @@ -1036,6 +1085,20 @@ Extension [ extension #99 rdkafka version 5.0.0 ] { Parameter #1 [ $timeout_ms ] } } + + Method [ public method pausePartitions ] { + + - Parameters [1] { + Parameter #0 [ $topic_partitions ] + } + } + + Method [ public method resumePartitions ] { + + - Parameters [1] { + Parameter #0 [ $topic_partitions ] + } + } } } @@ -1297,7 +1360,7 @@ Extension [ extension #99 rdkafka version 5.0.0 ] { - Properties [0] { } - - Methods [7] { + - Methods [8] { Method [ public method __construct ] { - Parameters [3] { @@ -1345,6 +1408,12 @@ Extension [ extension #99 rdkafka version 5.0.0 ] { Parameter #0 [ $offset ] } } + + Method [ public method getErr ] { + + - Parameters [0] { + } + } } } diff --git a/integration-tests-check.php b/integration-tests-check.php deleted file mode 100644 index 24f5b89..0000000 --- a/integration-tests-check.php +++ /dev/null @@ -1,11 +0,0 @@ -= 1.6 @@ -95,9 +92,6 @@ sed -e 's/role="test"/role="src"/' \ -i package.xml cd NTS -%patch0 -p1 -cp %{SOURCE1} tests - # Sanity check, really often broken extver=$(sed -n '/#define PHP_RDKAFKA_VERSION/{s/.* "//;s/".*$//;p}' php_rdkafka.h) if test "x${extver}" != "x%{version}"; then @@ -198,10 +192,9 @@ cd ../ZTS : Upstream test suite for NTS extension cd ../NTS -TEST_PHP_EXECUTABLE=%{__php} \ TEST_PHP_ARGS="-n -d extension=$PWD/modules/%{pecl_name}.so" \ REPORT_EXIT_STATUS=1 \ -%{__php} -n run-tests.php -q --show-diff +%{__php} -n run-tests.php -P -q --show-diff %files @@ -219,6 +212,10 @@ REPORT_EXIT_STATUS=1 \ %changelog +* Fri Nov 19 2021 Remi Collet - 5.0.1-1 +- update to 5.0.1 +- drop patch merged upstream + * Fri Sep 10 2021 Remi Collet - 5.0.0-4 - run upstream test suite during the build (lot of tests are skipped as no configured server) diff --git a/rdkafka-php81.patch b/rdkafka-php81.patch deleted file mode 100644 index 18c2329..0000000 --- a/rdkafka-php81.patch +++ /dev/null @@ -1,113 +0,0 @@ -From b3bfa61ef33285b82e785e8f8b0946801ebcce84 Mon Sep 17 00:00:00 2001 -From: Nick -Date: Fri, 2 Jul 2021 11:40:44 +0200 -Subject: [PATCH] replace deprecated interfaces (#460) - -* replace deprecated interfaces - -* fix for 7.0 ---- - metadata_collection.c | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/metadata_collection.c b/metadata_collection.c -index af986ff..2d273f6 100644 ---- a/metadata_collection.c -+++ b/metadata_collection.c -@@ -275,7 +275,11 @@ void kafka_metadata_collection_minit(INIT_FUNC_ARGS) - INIT_NS_CLASS_ENTRY(tmpce, "RdKafka\\Metadata", "Collection", fe); - ce = zend_register_internal_class(&tmpce); - ce->create_object = create_object; -+#if PHP_VERSION_ID < 80100 - zend_class_implements(ce, 2, spl_ce_Countable, spl_ce_Iterator); -+#else -+ zend_class_implements(ce, 2, zend_ce_countable, zend_ce_iterator); -+#endif - - handlers = kafka_default_object_handlers; - handlers.get_debug_info = get_debug_info; -From e570ef17571f22ec973094904e0854a1871bc4d1 Mon Sep 17 00:00:00 2001 -From: Remi Collet -Date: Fri, 10 Sep 2021 14:56:16 +0200 -Subject: [PATCH] fix iterator prototype for PHP 8.1 - ---- - metadata_collection.c | 24 ++++++++++++++++++++++++ - 1 file changed, 24 insertions(+) - -diff --git a/metadata_collection.c b/metadata_collection.c -index 2d273f6..95a9210 100644 ---- a/metadata_collection.c -+++ b/metadata_collection.c -@@ -113,7 +113,11 @@ static HashTable *get_debug_info(Z_RDKAFKA_OBJ *object, int *is_temp) /* {{{ */ - /* {{{ proto int RdKafka\Metadata\Collection::count() - */ - -+#if PHP_VERSION_ID < 80100 - ZEND_BEGIN_ARG_INFO_EX(arginfo_kafka_metadata_count, 0, 0, 0) -+#else -+ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_kafka_metadata_count, 0, 0, IS_LONG, 0) -+#endif - ZEND_END_ARG_INFO() - - PHP_METHOD(RdKafka__Metadata__Collection, count) -@@ -136,7 +140,11 @@ PHP_METHOD(RdKafka__Metadata__Collection, count) - /* {{{ proto void RdKafka\Metadata\Collection::rewind() - */ - -+#if PHP_VERSION_ID < 80100 - ZEND_BEGIN_ARG_INFO_EX(arginfo_kafka_metadata_rewind, 0, 0, 0) -+#else -+ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_kafka_metadata_rewind, 0, 0, IS_VOID, 0) -+#endif - ZEND_END_ARG_INFO() - - PHP_METHOD(RdKafka__Metadata__Collection, rewind) -@@ -159,7 +167,11 @@ PHP_METHOD(RdKafka__Metadata__Collection, rewind) - /* {{{ proto mixed RdKafka\Metadata\Collection::current() - */ - -+#if PHP_VERSION_ID < 80100 - ZEND_BEGIN_ARG_INFO_EX(arginfo_kafka_metadata_current, 0, 0, 0) -+#else -+ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_kafka_metadata_current, 0, 0, IS_MIXED, 0) -+#endif - ZEND_END_ARG_INFO() - - PHP_METHOD(RdKafka__Metadata__Collection, current) -@@ -187,7 +199,11 @@ PHP_METHOD(RdKafka__Metadata__Collection, current) - /* {{{ proto mixed RdKafka\Metadata\Collection::key() - */ - -+#if PHP_VERSION_ID < 80100 - ZEND_BEGIN_ARG_INFO_EX(arginfo_kafka_metadata_key, 0, 0, 0) -+#else -+ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_kafka_metadata_key, 0, 0, IS_MIXED, 0) -+#endif - ZEND_END_ARG_INFO() - - PHP_METHOD(RdKafka__Metadata__Collection, key) -@@ -215,7 +231,11 @@ PHP_METHOD(RdKafka__Metadata__Collection, key) - /* {{{ proto void RdKafka\Metadata\Collection::next() - */ - -+#if PHP_VERSION_ID < 80100 - ZEND_BEGIN_ARG_INFO_EX(arginfo_kafka_metadata_next, 0, 0, 0) -+#else -+ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_kafka_metadata_next, 0, 0, IS_VOID, 0) -+#endif - ZEND_END_ARG_INFO() - - PHP_METHOD(RdKafka__Metadata__Collection, next) -@@ -238,7 +258,11 @@ PHP_METHOD(RdKafka__Metadata__Collection, next) - /* {{{ proto bool RdKafka\Metadata\Collection::valid() - */ - -+#if PHP_VERSION_ID < 80100 - ZEND_BEGIN_ARG_INFO_EX(arginfo_kafka_metadata_valid, 0, 0, 0) -+#else -+ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_kafka_metadata_valid, 0, 0, _IS_BOOL, 0) -+#endif - ZEND_END_ARG_INFO() - - PHP_METHOD(RdKafka__Metadata__Collection, valid) -- cgit