summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2024-11-04 14:49:20 +0100
committerRemi Collet <remi@php.net>2024-11-04 14:49:20 +0100
commit23ceb3d2d83be4f037d607bc07c92c9b046269eb (patch)
treed319525968699e4c6f84d4118f69eebc1728aea5
parent66791bf9525e1e032736f15e927b814256370997 (diff)
update to 6.0.5HEADmaster
-rw-r--r--PHPINFO4
-rw-r--r--REFLECTION8
-rw-r--r--php-pecl-rdkafka6.spec12
-rw-r--r--upstream.patch85
4 files changed, 11 insertions, 98 deletions
diff --git a/PHPINFO b/PHPINFO
index e2cea65..edc19fa 100644
--- a/PHPINFO
+++ b/PHPINFO
@@ -2,7 +2,7 @@
rdkafka
rdkafka support => enabled
-version => 6.0.4
-build date => Oct 25 2024 00:00:00
+version => 6.0.5
+build date => Nov 4 2024 00:00:00
librdkafka version (runtime) => 2.6.0
librdkafka version (build) => 2.6.0.255
diff --git a/REFLECTION b/REFLECTION
index 85f829d..7616941 100644
--- a/REFLECTION
+++ b/REFLECTION
@@ -1,4 +1,4 @@
-Extension [ <persistent> extension #94 rdkafka version 6.0.4 ] {
+Extension [ <persistent> extension #94 rdkafka version 6.0.5 ] {
- Constants [193] {
Constant [ int RD_KAFKA_CONSUMER ] { 1 }
@@ -409,7 +409,7 @@ Extension [ <persistent> extension #94 rdkafka version 6.0.4 ] {
- Parameters [4] {
Parameter #0 [ <required> string $token_value ]
- Parameter #1 [ <required> int $lifetime_ms ]
+ Parameter #1 [ <required> string|int|float $lifetime_ms ]
Parameter #2 [ <required> string $principal_name ]
Parameter #3 [ <optional> array $extensions = [] ]
}
@@ -595,7 +595,7 @@ Extension [ <persistent> extension #94 rdkafka version 6.0.4 ] {
- Parameters [4] {
Parameter #0 [ <required> string $token_value ]
- Parameter #1 [ <required> int $lifetime_ms ]
+ Parameter #1 [ <required> string|int|float $lifetime_ms ]
Parameter #2 [ <required> string $principal_name ]
Parameter #3 [ <optional> array $extensions = [] ]
}
@@ -805,7 +805,7 @@ Extension [ <persistent> extension #94 rdkafka version 6.0.4 ] {
- Parameters [4] {
Parameter #0 [ <required> string $token_value ]
- Parameter #1 [ <required> int $lifetime_ms ]
+ Parameter #1 [ <required> string|int|float $lifetime_ms ]
Parameter #2 [ <required> string $principal_name ]
Parameter #3 [ <optional> array $extensions = [] ]
}
diff --git a/php-pecl-rdkafka6.spec b/php-pecl-rdkafka6.spec
index 59440d1..d52df33 100644
--- a/php-pecl-rdkafka6.spec
+++ b/php-pecl-rdkafka6.spec
@@ -31,7 +31,7 @@
%global buildver %(pkg-config --silence-errors --modversion rdkafka 2>/dev/null || echo 65536)
%endif
-%global upstream_version 6.0.4
+%global upstream_version 6.0.5
#global upstream_prever RC2
%global sources %{pecl_name}-%{upstream_version}%{?upstream_prever}
%global _configure ../%{sources}/configure
@@ -39,14 +39,11 @@
Summary: Kafka client based on librdkafka
Name: %{?scl_prefix}php-pecl-%{pecl_name}6
Version: %{upstream_version}%{?upstream_prever:~%{upstream_prever}}
-Release: 2%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
+Release: 1%{?dist}%{!?scl:%{!?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}-%{upstream_version}%{?upstream_prever}.tgz
-# See https://github.com/arnaud-lb/php-rdkafka/issues/562
-Patch0: upstream.patch
-
BuildRequires: make
BuildRequires: %{?dtsprefix}gcc
%if %{with move_to_opt}
@@ -101,8 +98,6 @@ sed -e 's/role="test"/role="src"/' \
-i package.xml
cd %{sources}
-%patch -P0 -p1 -b .up
-
# Sanity check, really often broken
extver=$(sed -n '/#define PHP_RDKAFKA_VERSION/{s/.* "//;s/".*$//;p}' php_rdkafka.h)
if test "x${extver}" != "x%{upstream_version}%{?upstream_prever}"; then
@@ -224,6 +219,9 @@ REPORT_EXIT_STATUS=1 \
%changelog
+* Mon Nov 4 2024 Remi Collet <remi@remirepo.net> - 6.0.5-1
+- update to 6.0.5
+
* Fri Oct 25 2024 Remi Collet <remi@remirepo.net> - 6.0.4-2
- add upstream patch for old PHP versions
diff --git a/upstream.patch b/upstream.patch
deleted file mode 100644
index fda3ecf..0000000
--- a/upstream.patch
+++ /dev/null
@@ -1,85 +0,0 @@
-From 6c1a72c93812bf53515ff9293e3ab4849c09b282 Mon Sep 17 00:00:00 2001
-From: Arnaud Le Blanc <arnaud.lb@gmail.com>
-Date: Fri, 25 Oct 2024 13:59:21 +0200
-Subject: [PATCH] Fix build on php 7.0 (#563)
-
-Co-authored-by: Remi Collet <remi@remirepo.net>
----
- kafka_error_exception.c | 6 +++---
- php_rdkafka_priv.h | 16 +++++++++++++++-
- rdkafka.c | 4 +---
- tests/oauthbearer_integration.phpt | 2 +-
- 4 files changed, 20 insertions(+), 8 deletions(-)
-
-diff --git a/kafka_error_exception.c b/kafka_error_exception.c
-index 8c19ca0c..f28730fd 100644
---- a/kafka_error_exception.c
-+++ b/kafka_error_exception.c
-@@ -39,9 +39,9 @@ void create_kafka_error(zval *return_value, const rd_kafka_error_t *error) /* {{
- {
- object_init_ex(return_value, ce_kafka_error);
-
-- zend_string *message = zend_strpprintf(0, "%s (RD_KAFKA_RESP_ERR_%s)", rd_kafka_error_string(error), rd_kafka_error_name(error));
-- zend_update_property_str(ce_kafka_error, Z_RDKAFKA_PROP_OBJ(return_value), ZEND_STRL("message"), message);
-- zend_string_release(message);
-+ char message[1024];
-+ snprintf(message, sizeof(message), "%s (RD_KAFKA_RESP_ERR_%s)", rd_kafka_error_string(error), rd_kafka_error_name(error));
-+ zend_update_property_string(ce_kafka_error, Z_RDKAFKA_PROP_OBJ(return_value), ZEND_STRL("message"), message);
-
- zend_update_property_long(ce_kafka_error, Z_RDKAFKA_PROP_OBJ(return_value), ZEND_STRL("code"), rd_kafka_error_code(error));
- zend_update_property_string(ce_kafka_error, Z_RDKAFKA_PROP_OBJ(return_value), ZEND_STRL("error_string"), rd_kafka_error_string(error));
-diff --git a/php_rdkafka_priv.h b/php_rdkafka_priv.h
-index 695a2739..ee6b440e 100644
---- a/php_rdkafka_priv.h
-+++ b/php_rdkafka_priv.h
-@@ -79,7 +79,21 @@ static zend_always_inline void *zend_object_alloc(size_t obj_size, zend_class_en
- memset(obj, 0, obj_size - sizeof(zval));
- return obj;
- }
--#endif
-+
-+static zend_always_inline zend_string *zval_get_tmp_string(zval *op, zend_string **tmp) {
-+ if (EXPECTED(Z_TYPE_P(op) == IS_STRING)) {
-+ *tmp = NULL;
-+ return Z_STR_P(op);
-+ } else {
-+ return *tmp = _zval_get_string_func(op);
-+ }
-+}
-+static zend_always_inline void zend_tmp_string_release(zend_string *tmp) {
-+ if (UNEXPECTED(tmp)) {
-+ zend_string_release(tmp);
-+ }
-+}
-+#endif // PHP_MINOR_VERSION < 3
-
- #endif // PHP 7
-
-diff --git a/rdkafka.c b/rdkafka.c
-index 4029409a..727fc8c6 100644
---- a/rdkafka.c
-+++ b/rdkafka.c
-@@ -491,9 +491,7 @@ PHP_METHOD(RdKafka, oauthbearerSetToken)
- zend_string *tmp_extension_val_str;
- zend_string *extension_val_str = zval_get_tmp_string(extension_zval, &tmp_extension_val_str);
- extensions[pos++] = estrdup(ZSTR_VAL(extension_val_str));
-- if (tmp_extension_val_str) {
-- zend_string_release(tmp_extension_val_str);
-- }
-+ zend_tmp_string_release(tmp_extension_val_str);
- } ZEND_HASH_FOREACH_END();
- }
-
-diff --git a/tests/oauthbearer_integration.phpt b/tests/oauthbearer_integration.phpt
-index b95de0f6..1b9399cb 100644
---- a/tests/oauthbearer_integration.phpt
-+++ b/tests/oauthbearer_integration.phpt
-@@ -20,7 +20,7 @@ function generateJws($scope = 'required-scope', $expiresInSeconds = 60)
- $principal,
- $expirySeconds,
- $nowSeconds - 10,
-- $scope,
-+ $scope
- );
- $headerJwsSegment = 'eyJhbGciOiJub25lIn0';
- $claimsJwsSegment = base64_encode($claimsJson);