From e56d3445d400e03225ddc564cca02a1600b3b6b7 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Sat, 5 Oct 2019 08:02:23 +0200 Subject: - update to 4.0.0 - rename to php-pecl-rdkafka4 - raise dependency on librdkafka 0.11 --- PHPINFO | 8 +-- REFLECTION | 188 +++++++++++++++++++++++++++++++++++++++---------- php-pecl-rdkafka4.spec | 27 +++++-- 3 files changed, 174 insertions(+), 49 deletions(-) diff --git a/PHPINFO b/PHPINFO index f2da1e9..d4c8296 100644 --- a/PHPINFO +++ b/PHPINFO @@ -2,7 +2,7 @@ rdkafka rdkafka support => enabled -version => 3.1.2 -build date => Jul 9 2019 06:07:10 -librdkafka version (runtime) => 1.1.0 -librdkafka version (build) => 1.1.0.255 +version => 4.0.0 +build date => Oct 5 2019 07:50:42 +librdkafka version (runtime) => 1.2.0 +librdkafka version (build) => 1.2.0.255 diff --git a/REFLECTION b/REFLECTION index 7c6f71c..7ec44e4 100644 --- a/REFLECTION +++ b/REFLECTION @@ -1,14 +1,18 @@ -Extension [ extension #136 rdkafka version 3.1.2 ] { +Extension [ extension #136 rdkafka version 4.0.0 ] { - - Constants [154] { + - Constants [161] { Constant [ integer RD_KAFKA_CONSUMER ] { 1 } Constant [ integer RD_KAFKA_OFFSET_BEGINNING ] { -2 } Constant [ integer RD_KAFKA_OFFSET_END ] { -1 } Constant [ integer RD_KAFKA_OFFSET_STORED ] { -1000 } Constant [ integer RD_KAFKA_PARTITION_UA ] { -1 } Constant [ integer RD_KAFKA_PRODUCER ] { 0 } - Constant [ integer RD_KAFKA_VERSION ] { 16843007 } - Constant [ integer RD_KAFKA_BUILD_VERSION ] { 16843007 } + Constant [ integer RD_KAFKA_MSG_F_BLOCK ] { 4 } + Constant [ integer RD_KAFKA_PURGE_F_QUEUE ] { 1 } + Constant [ integer RD_KAFKA_PURGE_F_INFLIGHT ] { 2 } + Constant [ integer RD_KAFKA_PURGE_F_NON_BLOCKING ] { 4 } + Constant [ integer RD_KAFKA_VERSION ] { 16908543 } + Constant [ integer RD_KAFKA_BUILD_VERSION ] { 16908543 } Constant [ integer RD_KAFKA_RESP_ERR__BEGIN ] { -200 } Constant [ integer RD_KAFKA_RESP_ERR__BAD_MSG ] { -199 } Constant [ integer RD_KAFKA_RESP_ERR__BAD_COMPRESSION ] { -198 } @@ -152,6 +156,9 @@ Extension [ extension #136 rdkafka version 3.1.2 ] { Constant [ integer RD_KAFKA_CONF_OK ] { 0 } Constant [ integer RD_KAFKA_MSG_PARTITIONER_RANDOM ] { 2 } Constant [ integer RD_KAFKA_MSG_PARTITIONER_CONSISTENT ] { 3 } + Constant [ integer RD_KAFKA_MSG_PARTITIONER_CONSISTENT_RANDOM ] { 4 } + Constant [ integer RD_KAFKA_MSG_PARTITIONER_MURMUR2 ] { 5 } + Constant [ integer RD_KAFKA_MSG_PARTITIONER_MURMUR2_RANDOM ] { 6 } Constant [ integer RD_KAFKA_LOG_PRINT ] { 100 } Constant [ integer RD_KAFKA_LOG_SYSLOG ] { 101 } Constant [ integer RD_KAFKA_LOG_SYSLOG_PRINT ] { 102 } @@ -169,13 +176,13 @@ Extension [ extension #136 rdkafka version 3.1.2 ] { Parameter #0 [ $err ] } } - Function [ function rd_kafka_errno2err ] { + Function [ function rd_kafka_errno2err ] { - Parameters [1] { Parameter #0 [ $errnox ] } } - Function [ function rd_kafka_errno ] { + Function [ function rd_kafka_errno ] { - Parameters [0] { } @@ -210,7 +217,7 @@ Extension [ extension #136 rdkafka version 3.1.2 ] { Property [ private $dr_cb ] } - - Methods [11] { + - Methods [13] { Method [ public method addBrokers ] { - Parameters [1] { @@ -242,19 +249,13 @@ Extension [ extension #136 rdkafka version 3.1.2 ] { } } - Method [ public method setLogLevel ] { + Method [ public method setLogLevel ] { - Parameters [1] { Parameter #0 [ $level ] } } - Method [ public method newQueue ] { - - - Parameters [0] { - } - } - Method [ public method newTopic ] { - Parameters [2] { @@ -276,7 +277,21 @@ Extension [ extension #136 rdkafka version 3.1.2 ] { } } - Method [ public method setLogger ] { + Method [ public method flush ] { + + - Parameters [1] { + Parameter #0 [ $timeout_ms ] + } + } + + Method [ public method purge ] { + + - Parameters [1] { + Parameter #0 [ $purge_flags ] + } + } + + Method [ public method setLogger ] { - Parameters [1] { Parameter #0 [ $logger ] @@ -293,6 +308,14 @@ Extension [ extension #136 rdkafka version 3.1.2 ] { Parameter #4 [ $timeout_ms ] } } + + Method [ public method offsetsForTimes ] { + + - Parameters [2] { + Parameter #0 [ $topic_partitions ] + Parameter #1 [ $timeout_ms ] + } + } } } @@ -310,7 +333,7 @@ Extension [ extension #136 rdkafka version 3.1.2 ] { - Properties [0] { } - - Methods [12] { + - Methods [15] { Method [ public method __construct ] { - Parameters [1] { @@ -318,6 +341,12 @@ Extension [ extension #136 rdkafka version 3.1.2 ] { } } + Method [ public method newQueue ] { + + - Parameters [0] { + } + } + Method [ public method addBrokers ] { - Parameters [1] { @@ -349,19 +378,13 @@ Extension [ extension #136 rdkafka version 3.1.2 ] { } } - Method [ public method setLogLevel ] { + Method [ public method setLogLevel ] { - Parameters [1] { Parameter #0 [ $level ] } } - Method [ public method newQueue ] { - - - Parameters [0] { - } - } - Method [ public method newTopic ] { - Parameters [2] { @@ -383,7 +406,21 @@ Extension [ extension #136 rdkafka version 3.1.2 ] { } } - Method [ public method setLogger ] { + Method [ public method flush ] { + + - Parameters [1] { + Parameter #0 [ $timeout_ms ] + } + } + + Method [ public method purge ] { + + - Parameters [1] { + Parameter #0 [ $purge_flags ] + } + } + + Method [ public method setLogger ] { - Parameters [1] { Parameter #0 [ $logger ] @@ -400,6 +437,14 @@ Extension [ extension #136 rdkafka version 3.1.2 ] { Parameter #4 [ $timeout_ms ] } } + + Method [ public method offsetsForTimes ] { + + - Parameters [2] { + Parameter #0 [ $topic_partitions ] + Parameter #1 [ $timeout_ms ] + } + } } } @@ -417,7 +462,7 @@ Extension [ extension #136 rdkafka version 3.1.2 ] { - Properties [0] { } - - Methods [12] { + - Methods [14] { Method [ public method __construct ] { - Parameters [1] { @@ -456,19 +501,13 @@ Extension [ extension #136 rdkafka version 3.1.2 ] { } } - Method [ public method setLogLevel ] { + Method [ public method setLogLevel ] { - Parameters [1] { Parameter #0 [ $level ] } } - Method [ public method newQueue ] { - - - Parameters [0] { - } - } - Method [ public method newTopic ] { - Parameters [2] { @@ -490,7 +529,21 @@ Extension [ extension #136 rdkafka version 3.1.2 ] { } } - Method [ public method setLogger ] { + Method [ public method flush ] { + + - Parameters [1] { + Parameter #0 [ $timeout_ms ] + } + } + + Method [ public method purge ] { + + - Parameters [1] { + Parameter #0 [ $purge_flags ] + } + } + + Method [ public method setLogger ] { - Parameters [1] { Parameter #0 [ $logger ] @@ -507,6 +560,14 @@ Extension [ extension #136 rdkafka version 3.1.2 ] { Parameter #4 [ $timeout_ms ] } } + + Method [ public method offsetsForTimes ] { + + - Parameters [2] { + Parameter #0 [ $topic_partitions ] + Parameter #1 [ $timeout_ms ] + } + } } } @@ -581,7 +642,7 @@ Extension [ extension #136 rdkafka version 3.1.2 ] { - Properties [0] { } - - Methods [10] { + - Methods [11] { Method [ public method __construct ] { - Parameters [0] { @@ -602,7 +663,7 @@ Extension [ extension #136 rdkafka version 3.1.2 ] { } } - Method [ public method setDefaultTopicConf ] { + Method [ public method setDefaultTopicConf ] { - Parameters [1] { Parameter #0 [ $topic_conf ] @@ -650,6 +711,13 @@ Extension [ extension #136 rdkafka version 3.1.2 ] { Parameter #0 [ $callback ] } } + + Method [ public method setLogCb ] { + + - Parameters [1] { + Parameter #0 [ $callback ] + } + } } } @@ -714,7 +782,7 @@ Extension [ extension #136 rdkafka version 3.1.2 ] { Property [ private $dr_msg_cb ] } - - Methods [12] { + - Methods [16] { Method [ public method __construct ] { - Parameters [1] { @@ -742,6 +810,12 @@ Extension [ extension #136 rdkafka version 3.1.2 ] { } } + Method [ public method close ] { + + - Parameters [0] { + } + } + Method [ public method commitAsync ] { - Parameters [1] { @@ -799,6 +873,32 @@ Extension [ extension #136 rdkafka version 3.1.2 ] { Parameter #1 [ $timeout_ms ] } } + + Method [ public method getOffsetPositions ] { + + - Parameters [1] { + Parameter #0 [ $topic_partitions ] + } + } + + Method [ public method queryWatermarkOffsets ] { + + - Parameters [5] { + Parameter #0 [ $topic ] + Parameter #1 [ $partition ] + Parameter #2 [ &$low ] + Parameter #3 [ &$high ] + Parameter #4 [ $timeout_ms ] + } + } + + Method [ public method offsetsForTimes ] { + + - Parameters [2] { + Parameter #0 [ $topic_partitions ] + Parameter #1 [ $timeout_ms ] + } + } } } @@ -1062,7 +1162,10 @@ Extension [ extension #136 rdkafka version 3.1.2 ] { - Methods [7] { Method [ public method __construct ] { - - Parameters [0] { + - Parameters [3] { + Parameter #0 [ $topic ] + Parameter #1 [ $partition ] + Parameter #2 [ $offset ] } } @@ -1174,7 +1277,7 @@ Extension [ extension #136 rdkafka version 3.1.2 ] { - Properties [0] { } - - Methods [7] { + - Methods [8] { Method [ private method __construct ] { - Parameters [0] { @@ -1213,6 +1316,15 @@ Extension [ extension #136 rdkafka version 3.1.2 ] { } } + Method [ public method consumeBatch ] { + + - Parameters [3] { + Parameter #0 [ $partition ] + Parameter #1 [ $timeout_ms ] + Parameter #2 [ $batch_size ] + } + } + Method [ public method offsetStore ] { - Parameters [2] { diff --git a/php-pecl-rdkafka4.spec b/php-pecl-rdkafka4.spec index 5e01679..17c4ff5 100644 --- a/php-pecl-rdkafka4.spec +++ b/php-pecl-rdkafka4.spec @@ -1,4 +1,4 @@ -# remirepo/fedora spec file for php-pecl-rdkafka +# remirepo/fedora spec file for php-pecl-rdkafka4 # # Copyright (c) 2015-2019 Remi Collet # License: CC-BY-SA @@ -19,15 +19,15 @@ %global buildver %(pkg-config --silence-errors --modversion rdkafka 2>/dev/null || echo 65536) Summary: Kafka client based on librdkafka -Name: %{?sub_prefix}php-pecl-%{pecl_name} -Version: 3.1.2 -Release: 2%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')} +Name: %{?sub_prefix}php-pecl-%{pecl_name}4 +Version: 4.0.0 +Release: 1%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')} License: MIT URL: http://pecl.php.net/package/%{pecl_name} Source0: http://pecl.php.net/get/%{pecl_name}-%{version}.tgz BuildRequires: %{?dtsprefix}gcc -BuildRequires: librdkafka-devel > 0.8 +BuildRequires: librdkafka-devel >= 0.11 BuildRequires: %{?scl_prefix}php-devel > 5.6 BuildRequires: %{?scl_prefix}php-pear @@ -45,6 +45,15 @@ Provides: %{?scl_prefix}php-pecl-%{pecl_name} = %{version}-%{rele Provides: %{?scl_prefix}php-pecl-%{pecl_name}%{?_isa} = %{version}-%{release} %endif +%if 0%{?fedora} >= 31 || 0%{?rhel} >= 9 || "%{php_version}" > "7.4" +Obsoletes: %{?scl_prefix}php-pecl-%{pecl_name} < 4 +Provides: %{?scl_prefix}php-pecl-%{pecl_name} = %{version}-%{release} +Provides: %{?scl_prefix}php-pecl-%{pecl_name}%{?_isa} = %{version}-%{release} +%else +# A single version can be installed +Conflicts: %{?scl_prefix}php-pecl-%{pecl_name} < 4 +%endif + %if "%{?vendor}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel} # Other third party repo stuff %if "%{php_version}" > "7.1" @@ -73,8 +82,7 @@ Obsoletes: php74w-pecl-%{pecl_name} <= %{version} %description -This extension is a librdkafka binding providing a working client -for Kafka 0.8, 0.9, 0.10. +This extension is a librdkafka binding providing a working client for Kafka. Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')%{?scl: as Software Collection (%{scl} by %{?scl_vendor}%{!?scl_vendor:rh})}. @@ -205,6 +213,11 @@ cd ../ZTS %changelog +* Sat Oct 5 2019 Remi Collet - 4.0.0-1 +- update to 4.0.0 +- rename to php-pecl-rdkafka4 +- raise dependency on librdkafka 0.11 + * Tue Sep 03 2019 Remi Collet - 3.1.2-2 - rebuild for 7.4.0RC1 -- cgit