diff options
| -rw-r--r-- | PHPINFO | 4 | ||||
| -rw-r--r-- | REFLECTION | 156 | ||||
| -rw-r--r-- | composer.json | 5 | ||||
| -rw-r--r-- | php-pecl-rdkafka7.spec | 96 |
4 files changed, 181 insertions, 80 deletions
@@ -2,7 +2,7 @@ rdkafka rdkafka support => enabled -version => 6.0.5 -build date => Apr 23 2026 00:00:00 +version => 7.0.0alpha1 +build date => Apr 30 2026 00:00:00 librdkafka version (runtime) => 2.14.1 librdkafka version (build) => 2.14.1.255 @@ -1,6 +1,6 @@ -Extension [ <persistent> extension #155 rdkafka version 6.0.5 ] { +Extension [ <persistent> extension #156 rdkafka version 7.0.0alpha1 ] { - - Constants [195] { + - Constants [196] { Constant [ <persistent> int RD_KAFKA_CONSUMER ] { 1 } Constant [ <persistent> int RD_KAFKA_OFFSET_BEGINNING ] { -2 } Constant [ <persistent> int RD_KAFKA_OFFSET_END ] { -1 } @@ -13,6 +13,7 @@ Extension [ <persistent> extension #155 rdkafka version 6.0.5 ] { Constant [ <persistent> int RD_KAFKA_PURGE_F_NON_BLOCKING ] { 4 } Constant [ <persistent> int RD_KAFKA_VERSION ] { 34472447 } Constant [ <persistent> int RD_KAFKA_BUILD_VERSION ] { 34472447 } + Constant [ <persistent> int RD_KAFKA_CONSUMER_GROUP_METADATA_GETTERS ] { 1 } Constant [ <persistent> int RD_KAFKA_RESP_ERR__BEGIN ] { -200 } Constant [ <persistent> int RD_KAFKA_RESP_ERR__BAD_MSG ] { -199 } Constant [ <persistent> int RD_KAFKA_RESP_ERR__BAD_COMPRESSION ] { -198 } @@ -247,7 +248,7 @@ Extension [ <persistent> extension #155 rdkafka version 6.0.5 ] { } } - - Classes [20] { + - Classes [21] { Class [ <internal:rdkafka> abstract class RdKafka ] { - Constants [0] { @@ -628,7 +629,7 @@ Extension [ <persistent> extension #155 rdkafka version 6.0.5 ] { - Properties [0] { } - - Methods [23] { + - Methods [24] { Method [ <internal:rdkafka, ctor> public method __construct ] { - Parameters [1] { @@ -667,6 +668,16 @@ Extension [ <persistent> extension #155 rdkafka version 6.0.5 ] { - Tentative return [ void ] } + Method [ <internal:rdkafka> public method sendOffsetsToTransaction ] { + + - Parameters [3] { + Parameter #0 [ <required> array $offsets ] + Parameter #1 [ <required> RdKafka\ConsumerGroupMetadata $metadata ] + Parameter #2 [ <required> int $timeout_ms ] + } + - Tentative return [ void ] + } + Method [ <internal:rdkafka, inherits RdKafka> public method addBrokers ] { - Parameters [1] { @@ -930,7 +941,7 @@ Extension [ <persistent> extension #155 rdkafka version 6.0.5 ] { - Properties [0] { } - - Methods [12] { + - Methods [14] { Method [ <internal:rdkafka, ctor> public method __construct ] { - Parameters [0] { @@ -944,6 +955,21 @@ Extension [ <persistent> extension #155 rdkafka version 6.0.5 ] { - Tentative return [ array ] } + Method [ <internal:rdkafka> public method get ] { + + - Parameters [1] { + Parameter #0 [ <required> string $name ] + } + - Tentative return [ string ] + } + + Method [ <internal:rdkafka> public method getDefaultTopicConf ] { + + - Parameters [0] { + } + - Tentative return [ ?RdKafka\TopicConf ] + } + Method [ <internal:rdkafka> public method set ] { - Parameters [2] { @@ -1041,7 +1067,7 @@ Extension [ <persistent> extension #155 rdkafka version 6.0.5 ] { - Properties [0] { } - - Methods [4] { + - Methods [5] { Method [ <internal:rdkafka, ctor> public method __construct ] { - Parameters [0] { @@ -1055,6 +1081,14 @@ Extension [ <persistent> extension #155 rdkafka version 6.0.5 ] { - Tentative return [ array ] } + Method [ <internal:rdkafka> public method get ] { + + - Parameters [1] { + Parameter #0 [ <required> string $name ] + } + - Tentative return [ string ] + } + Method [ <internal:rdkafka> public method set ] { - Parameters [2] { @@ -1201,6 +1235,61 @@ Extension [ <persistent> extension #155 rdkafka version 6.0.5 ] { } } + Class [ <internal:rdkafka> final class RdKafka\ConsumerGroupMetadata ] { + + - Constants [0] { + } + + - Static properties [0] { + } + + - Static methods [0] { + } + + - Properties [0] { + } + + - Methods [5] { + Method [ <internal:rdkafka, ctor> public method __construct ] { + + - Parameters [4] { + Parameter #0 [ <required> string $group_id ] + Parameter #1 [ <optional> int $generation_id = -1 ] + Parameter #2 [ <optional> string $member_id = "" ] + Parameter #3 [ <optional> ?string $group_instance_id = null ] + } + } + + Method [ <internal:rdkafka> public method getGroupId ] { + + - Parameters [0] { + } + - Tentative return [ string ] + } + + Method [ <internal:rdkafka> public method getMemberId ] { + + - Parameters [0] { + } + - Tentative return [ string ] + } + + Method [ <internal:rdkafka> public method getGroupInstanceId ] { + + - Parameters [0] { + } + - Tentative return [ ?string ] + } + + Method [ <internal:rdkafka> public method getGenerationId ] { + + - Parameters [0] { + } + - Tentative return [ int ] + } + } + } + Class [ <internal:rdkafka> class RdKafka\KafkaConsumer ] { - Constants [0] { @@ -1218,7 +1307,7 @@ Extension [ <persistent> extension #155 rdkafka version 6.0.5 ] { Property [ private ?callable $dr_msg_cb ] } - - Methods [21] { + - Methods [25] { Method [ <internal:rdkafka, ctor> public method __construct ] { - Parameters [1] { @@ -1285,7 +1374,7 @@ Extension [ <persistent> extension #155 rdkafka version 6.0.5 ] { - Parameters [1] { Parameter #0 [ <required> int $timeout_ms ] } - - Tentative return [ RdKafka\Message ] + - Tentative return [ ?RdKafka\Message ] } Method [ <internal:rdkafka> public method subscribe ] { @@ -1390,6 +1479,40 @@ Extension [ <persistent> extension #155 rdkafka version 6.0.5 ] { } - Tentative return [ array ] } + + Method [ <internal:rdkafka> public method poll ] { + + - Parameters [1] { + Parameter #0 [ <required> int $timeout_ms ] + } + - Tentative return [ int ] + } + + Method [ <internal:rdkafka> public method oauthbearerSetToken ] { + + - Parameters [4] { + Parameter #0 [ <required> string $token_value ] + Parameter #1 [ <required> int $lifetime_ms ] + Parameter #2 [ <required> string $principal_name ] + Parameter #3 [ <optional> array $extensions = [] ] + } + - Tentative return [ void ] + } + + Method [ <internal:rdkafka> public method oauthbearerSetTokenFailure ] { + + - Parameters [1] { + Parameter #0 [ <required> string $error ] + } + - Tentative return [ void ] + } + + Method [ <internal:rdkafka> public method getConsumerGroupMetadata ] { + + - Parameters [0] { + } + - Tentative return [ RdKafka\ConsumerGroupMetadata ] + } } } @@ -1703,7 +1826,7 @@ Extension [ <persistent> extension #155 rdkafka version 6.0.5 ] { - Properties [0] { } - - Methods [8] { + - Methods [10] { Method [ <internal:rdkafka, ctor> public method __construct ] { - Parameters [3] { @@ -1764,6 +1887,21 @@ Extension [ <persistent> extension #155 rdkafka version 6.0.5 ] { } - Tentative return [ ?int ] } + + Method [ <internal:rdkafka> public method getMetadata ] { + + - Parameters [0] { + } + - Tentative return [ ?string ] + } + + Method [ <internal:rdkafka> public method setMetadata ] { + + - Parameters [1] { + Parameter #0 [ <required> ?string $metadata ] + } + - Tentative return [ RdKafka\TopicPartition ] + } } } diff --git a/composer.json b/composer.json index a834ee3..fda59c2 100644 --- a/composer.json +++ b/composer.json @@ -4,14 +4,15 @@ "license": "MIT", "description": "A PHP extension for Kafka", "require": { - "php": ">= 7.0.0" + "php": ">= 8.1.0" }, "php-ext": { "extension-name": "rdkafka", + "download-url-method": ["pre-packaged-binary", "composer-default"], "configure-options": [ { "name": "with-rdkafka", - "description": "Use system librdkafka", + "description": "Path to librdkafka installation (optional, auto-detected from /usr/local and /usr if omitted)", "needs-value": true } ] diff --git a/php-pecl-rdkafka7.spec b/php-pecl-rdkafka7.spec index fc1cf25..ee12948 100644 --- a/php-pecl-rdkafka7.spec +++ b/php-pecl-rdkafka7.spec @@ -1,4 +1,4 @@ -# remirepo/fedora spec file for php-pecl-rdkafka6 +# remirepo/fedora spec file for php-pecl-rdkafka7 # # SPDX-FileCopyrightText: Copyright 2015-2026 Remi Collet # SPDX-License-Identifier: CECILL-2.1 @@ -14,11 +14,10 @@ %bcond_without tests %if 0%{?scl:1} -%scl_package php-pecl-rdkafka6 +%scl_package php-pecl-rdkafka7 %endif %global pecl_name rdkafka -%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}} %global pie_vend %{pecl_name} %global pie_proj %{pecl_name} %global ini_name 40-%{pecl_name}.ini @@ -33,21 +32,20 @@ %global buildver %(pkg-config --silence-errors --modversion rdkafka 2>/dev/null || echo 65536) %endif -%global upstream_version 6.0.5 -#global upstream_prever RC2 -%global _configure ../configure +%global upstream_version 7.0.0 +%global upstream_prever alpha1 # Github forge -%global gh_vend arnaud-lb +%global gh_vend php-rdkafka %global gh_proj php-rdkafka %global forgeurl https://github.com/%{gh_vend}/%{gh_proj} %global tag %{upstream_version}%{?upstream_prever} -Name: %{?scl_prefix}php-pecl-%{pecl_name}6 +Name: %{?scl_prefix}php-pecl-%{pecl_name}7 Summary: Kafka client based on librdkafka License: MIT Version: %{upstream_version}%{?upstream_prever:~%{upstream_prever}} -Release: 2%{?dist} +Release: 1%{?dist} %forgemeta URL: %{forgeurl} Source0: %{forgesource} @@ -55,12 +53,12 @@ Source0: %{forgesource} BuildRequires: make BuildRequires: %{?dtsprefix}gcc %if %{with move_to_opt} -BuildRequires: %{?vendeur:%{vendeur}-}librdkafka-devel >= 2.2 +BuildRequires: %{?vendeur:%{vendeur}-}librdkafka-devel >= 2.14 Requires: %{?vendeur:%{vendeur}-}librdkafka%{?_isa} >= %{buildver} %else -BuildRequires: librdkafka-devel >= 1.4 +BuildRequires: librdkafka-devel >= 1.5.3 %endif -BuildRequires: %{?scl_prefix}php-devel >= 7.0 +BuildRequires: %{?scl_prefix}php-devel >= 8.1 Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api} Requires: %{?scl_prefix}php(api) = %{php_core_api} @@ -75,20 +73,18 @@ Provides: %{?scl_prefix}php-pecl(%{pecl_name})%{?_isa} = %{version} Provides: %{?scl_prefix}php-pie(%{pie_vend}/%{pie_proj}) = %{version} Provides: %{?scl_prefix}php-%{pie_vend}-%{pie_proj} = %{version} -%if 0%{?fedora} >= 36 || 0%{?rhel} >= 9 || "%{php_version}" >= "8.1" -Obsoletes: %{?scl_prefix}php-pecl-%{pecl_name} < 5 -Obsoletes: %{?scl_prefix}php-pecl-%{pecl_name}5 < 6 +%if 0%{?fedora} >= 45 || 0%{?rhel} >= 11 || "%{php_version}" >= "8.6" +Obsoletes: %{?scl_prefix}php-pecl-%{pecl_name} < 7 +Obsoletes: %{?scl_prefix}php-pecl-%{pecl_name}5 < 7 +Obsoletes: %{?scl_prefix}php-pecl-%{pecl_name}6 < 7 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} < 5 -Conflicts: %{?scl_prefix}php-pecl-%{pecl_name}5 < 6 +Conflicts: %{?scl_prefix}php-pecl-%{pecl_name} < 7 +Conflicts: %{?scl_prefix}php-pecl-%{pecl_name}5 < 7 +Conflicts: %{?scl_prefix}php-pecl-%{pecl_name}7 < 7 %endif -# no BC break (only PHP supported versions) -Obsoletes: %{?scl_prefix}php-pecl-%{pecl_name}4 < 5 -Provides: %{?scl_prefix}php-pecl-%{pecl_name}4 = %{version}-%{release} -Provides: %{?scl_prefix}php-pecl-%{pecl_name}4%{?_isa} = %{version}-%{release} %if %{with move_to_opt} %global __requires_exclude_from ^%{_libdir}/.*$ @@ -98,6 +94,8 @@ Provides: %{?scl_prefix}php-pecl-%{pecl_name}4%{?_isa} = %{version}-%{relea %description This extension is a librdkafka binding providing a working client for Kafka. +This package provides version 7. + Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')%{?scl: as Software Collection (%{scl} by %{?scl_vendor}%{!?scl_vendor:rh})}. @@ -111,16 +109,10 @@ if test "x${extver}" != "x%{upstream_version}%{?upstream_prever}"; then exit 1 fi -mkdir NTS -%if %{with_zts} -# Duplicate source tree for NTS / ZTS build -mkdir ZTS -%endif - # Create configuration file cat > %{ini_name} << 'EOF' ; Enable %{pecl_name} extension module -extension=%{pecl_name}.so +extension=%{pecl_name} EOF @@ -133,50 +125,28 @@ export PKG_CONFIG_PATH=/opt/%{?vendeur:%{vendeur}/}librdkafka/%{_lib}/pkgconfig %endif %{__phpize} -[ -f Makefile.global ] && GLOBAL=Makefile.global || GLOBAL=build/Makefile.global -sed -e 's/INSTALL_ROOT/DESTDIR/' -i $GLOBAL +sed -e 's/INSTALL_ROOT/DESTDIR/' -i build/Makefile.global -cd NTS %configure \ --with-php-config=%{__phpconfig} \ --with-libdir=%{_lib} \ %if %{with move_to_opt} --with-rdkafka=/opt/%{?vendeur:%{vendeur}/}librdkafka %else - --with-rdkafka -%endif - -%make_build - -%if %{with_zts} -cd ../ZTS -%configure \ - --with-php-config=%{__ztsphpconfig} \ - --with-libdir=%{_lib} \ -%if %{with move_to_opt} - --with-rdkafka=/opt/%{?vendeur:%{vendeur}/}librdkafka -%else - --with-rdkafka + --with-rdkafka %endif %make_build -%endif %install %{?dtsenable} -%make_install -C NTS +%make_install # install config file install -D -m 644 %{ini_name} %{buildroot}%{php_inidir}/%{ini_name} -%if %{with_zts} -%make_install -C ZTS - -install -D -m 644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name} -%endif - %check : Minimal load test for NTS extension @@ -184,17 +154,9 @@ install -D -m 644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name} --define extension=%{buildroot}%{php_extdir}/%{pecl_name}.so \ --modules | grep '^%{pecl_name}$' -%if %{with_zts} -: Minimal load test for ZTS extension -%{__ztsphp} --no-php-ini \ - --define extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so \ - --modules | grep '^%{pecl_name}$' -%endif - %if %{with tests} : Upstream test suite for NTS extension -TEST_PHP_ARGS="-n -d extension=$PWD/NTS/modules/%{pecl_name}.so" \ -REPORT_EXIT_STATUS=1 \ +TEST_PHP_ARGS="-n -d extension=$PWD/modules/%{pecl_name}.so" \ %{__php} -n run-tests.php -P -q --show-diff %endif @@ -207,13 +169,13 @@ REPORT_EXIT_STATUS=1 \ %config(noreplace) %{php_inidir}/%{ini_name} %{php_extdir}/%{pecl_name}.so -%if %{with_zts} -%config(noreplace) %{php_ztsinidir}/%{ini_name} -%{php_ztsextdir}/%{pecl_name}.so -%endif - %changelog +* Thu Apr 30 2026 Remi Collet <remi@remirepo.net> - 7.0.0~alpha1-1 +- update to 7.0.0alpha1 +- rename to php-pecl-rdkafka7 +- drop ZTS + * Thu Apr 23 2026 Remi Collet <remi@remirepo.net> - 6.0.5-2 - drop pear/pecl dependency - sources from github |
