diff options
author | Remi Collet <remi@remirepo.net> | 2021-11-19 15:15:26 +0100 |
---|---|---|
committer | Remi Collet <remi@php.net> | 2021-11-19 15:15:26 +0100 |
commit | f74a57841075b2226488162ac969ccd448763804 (patch) | |
tree | 5402e0897e43f4766f8c10fe85e94cfb50c7b307 | |
parent | fedee1f311abc7f99158b6f161d2aa99f1f66de2 (diff) |
update to 5.0.1
drop patch merged upstream
-rw-r--r-- | PHPINFO | 8 | ||||
-rw-r--r-- | REFLECTION | 87 | ||||
-rw-r--r-- | integration-tests-check.php | 11 | ||||
-rw-r--r-- | php-pecl-rdkafka5.spec | 17 | ||||
-rw-r--r-- | rdkafka-php81.patch | 113 |
5 files changed, 89 insertions, 147 deletions
@@ -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 @@ -1,6 +1,6 @@ -Extension [ <persistent> extension #99 rdkafka version 5.0.0 ] { +Extension [ <persistent> 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 [ <persistent> 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 [ <persistent> 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 [ <persistent> extension #99 rdkafka version 5.0.0 ] { - Parameters [0] { } } + Function [ <internal:rdkafka> function rd_kafka_err2name ] { + + - Parameters [1] { + Parameter #0 [ <required> $err ] + } + } Function [ <internal:rdkafka> function rd_kafka_err2str ] { - Parameters [1] { @@ -239,7 +246,7 @@ Extension [ <persistent> extension #99 rdkafka version 5.0.0 ] { Property [ <default> private $dr_cb ] } - - Methods [13] { + - Methods [15] { Method [ <internal:rdkafka> public method addBrokers ] { - Parameters [1] { @@ -338,6 +345,20 @@ Extension [ <persistent> extension #99 rdkafka version 5.0.0 ] { Parameter #1 [ <required> $timeout_ms ] } } + + Method [ <internal:rdkafka> public method pausePartitions ] { + + - Parameters [1] { + Parameter #0 [ <required> $topic_partitions ] + } + } + + Method [ <internal:rdkafka> public method resumePartitions ] { + + - Parameters [1] { + Parameter #0 [ <required> $topic_partitions ] + } + } } } @@ -355,7 +376,7 @@ Extension [ <persistent> extension #99 rdkafka version 5.0.0 ] { - Properties [0] { } - - Methods [15] { + - Methods [17] { Method [ <internal:rdkafka, ctor> public method __construct ] { - Parameters [1] { @@ -467,6 +488,20 @@ Extension [ <persistent> extension #99 rdkafka version 5.0.0 ] { Parameter #1 [ <required> $timeout_ms ] } } + + Method [ <internal:rdkafka, inherits RdKafka> public method pausePartitions ] { + + - Parameters [1] { + Parameter #0 [ <required> $topic_partitions ] + } + } + + Method [ <internal:rdkafka, inherits RdKafka> public method resumePartitions ] { + + - Parameters [1] { + Parameter #0 [ <required> $topic_partitions ] + } + } } } @@ -484,7 +519,7 @@ Extension [ <persistent> extension #99 rdkafka version 5.0.0 ] { - Properties [0] { } - - Methods [18] { + - Methods [20] { Method [ <internal:rdkafka, ctor> public method __construct ] { - Parameters [1] { @@ -617,6 +652,20 @@ Extension [ <persistent> extension #99 rdkafka version 5.0.0 ] { Parameter #1 [ <required> $timeout_ms ] } } + + Method [ <internal:rdkafka, inherits RdKafka> public method pausePartitions ] { + + - Parameters [1] { + Parameter #0 [ <required> $topic_partitions ] + } + } + + Method [ <internal:rdkafka, inherits RdKafka> public method resumePartitions ] { + + - Parameters [1] { + Parameter #0 [ <required> $topic_partitions ] + } + } } } @@ -919,7 +968,7 @@ Extension [ <persistent> extension #99 rdkafka version 5.0.0 ] { Property [ <default> private $dr_msg_cb ] } - - Methods [16] { + - Methods [18] { Method [ <internal:rdkafka, ctor> public method __construct ] { - Parameters [1] { @@ -1036,6 +1085,20 @@ Extension [ <persistent> extension #99 rdkafka version 5.0.0 ] { Parameter #1 [ <required> $timeout_ms ] } } + + Method [ <internal:rdkafka> public method pausePartitions ] { + + - Parameters [1] { + Parameter #0 [ <required> $topic_partitions ] + } + } + + Method [ <internal:rdkafka> public method resumePartitions ] { + + - Parameters [1] { + Parameter #0 [ <required> $topic_partitions ] + } + } } } @@ -1297,7 +1360,7 @@ Extension [ <persistent> extension #99 rdkafka version 5.0.0 ] { - Properties [0] { } - - Methods [7] { + - Methods [8] { Method [ <internal:rdkafka, ctor> public method __construct ] { - Parameters [3] { @@ -1345,6 +1408,12 @@ Extension [ <persistent> extension #99 rdkafka version 5.0.0 ] { Parameter #0 [ <required> $offset ] } } + + Method [ <internal:rdkafka> 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 @@ -<?php - -if (file_exists(__DIR__ . "/test_env.php")) { - include __DIR__ . '/test_env.php'; -} - -if (getenv('TEST_KAFKA_BROKERS')) { - return; -} - -die('skip due to missing TEST_KAFKA_BROKERS environment & no test_env.php'); diff --git a/php-pecl-rdkafka5.spec b/php-pecl-rdkafka5.spec index 930a5f9..4c7ed08 100644 --- a/php-pecl-rdkafka5.spec +++ b/php-pecl-rdkafka5.spec @@ -20,15 +20,12 @@ Summary: Kafka client based on librdkafka Name: %{?sub_prefix}php-pecl-%{pecl_name}5 -Version: 5.0.0 -Release: 4%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')} +Version: 5.0.1 +Release: 1%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')} License: MIT URL: https://pecl.php.net/package/%{pecl_name} Source0: https://pecl.php.net/get/%{pecl_name}-%{version}.tgz -Source1: https://raw.githubusercontent.com/arnaud-lb/php-rdkafka/%{version}/tests/integration-tests-check.php -Patch0: %{pecl_name}-php81.patch - BuildRequires: make BuildRequires: %{?dtsprefix}gcc BuildRequires: librdkafka1php-devel >= 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 <remi@remirepo.net> - 5.0.1-1 +- update to 5.0.1 +- drop patch merged upstream + * Fri Sep 10 2021 Remi Collet <remi@remirepo.net> - 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 <nickjobszh@gmail.com> -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 <remi@remirepo.net> -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) |