summaryrefslogtreecommitdiffstats
path: root/simple_kafka_client-php81.patch
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2021-08-04 11:55:46 +0200
committerRemi Collet <remi@remirepo.net>2021-08-04 11:55:46 +0200
commitd21b6ebf9818d37bcbe436cfcfd3274795192f89 (patch)
tree25fe7e883de89d1483d052f5e2a41f8973deddee /simple_kafka_client-php81.patch
parent73ff2d88093c1014e008878344379f5496f1ab63 (diff)
add patch for PHP 8.1.0beta2 from
https://github.com/php-kafka/php-simple-kafka-client/pull/54
Diffstat (limited to 'simple_kafka_client-php81.patch')
-rw-r--r--simple_kafka_client-php81.patch59
1 files changed, 59 insertions, 0 deletions
diff --git a/simple_kafka_client-php81.patch b/simple_kafka_client-php81.patch
new file mode 100644
index 0000000..05197d4
--- /dev/null
+++ b/simple_kafka_client-php81.patch
@@ -0,0 +1,59 @@
+From c5c97dc6750057807db318a6e587a62e3c751c97 Mon Sep 17 00:00:00 2001
+From: Remi Collet <remi@remirepo.net>
+Date: Wed, 4 Aug 2021 11:41:50 +0200
+Subject: [PATCH] fix proto for 8.1.0beta2
+
+---
+ metadata_collection.c | 8 +++++++-
+ metadata_collection.stub.php | 8 ++++----
+ metadata_collection_arginfo.h | 7 ++++---
+ 3 files changed, 15 insertions(+), 8 deletions(-)
+
+diff --git a/metadata_collection.c b/metadata_collection.c
+index 3af8357..c3b086a 100644
+--- a/metadata_collection.c
++++ b/metadata_collection.c
+@@ -39,9 +39,15 @@
+ #include "php_simple_kafka_client_int.h"
+ #include "ext/spl/spl_iterators.h"
+ #include "Zend/zend_interfaces.h"
+-#include "metadata_collection_arginfo.h"
+ #include "Zend/zend_exceptions.h"
+
++#if PHP_VERSION_ID < 80100
++#define ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(name, return_reference, required_num_args, type, allow_null) \
++ ZEND_BEGIN_ARG_INFO_EX(name, return_reference, required_num_args, allow_null)
++#endif
++
++#include "metadata_collection_arginfo.h"
++
+ typedef struct _object_intern {
+ zval zmetadata;
+ const void *items;
+diff --git a/metadata_collection_arginfo.h b/metadata_collection_arginfo.h
+index ce1df7e..7da4de4 100644
+--- a/metadata_collection_arginfo.h
++++ b/metadata_collection_arginfo.h
+@@ -1,5 +1,5 @@
+ /* This is a generated file, edit the .stub.php file instead.
+- * Stub hash: 925cbd1dcf14595ae437c111d3f99f767a665006 */
++ * Stub hash: c130cfc464b41b677ecde96328b3417797b5176d */
+
+ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_SimpleKafkaClient_Metadata_Collection_count, 0, 0, IS_LONG, 0)
+ ZEND_END_ARG_INFO()
+@@ -7,12 +7,13 @@ ZEND_END_ARG_INFO()
+ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_SimpleKafkaClient_Metadata_Collection_rewind, 0, 0, IS_VOID, 0)
+ ZEND_END_ARG_INFO()
+
+-ZEND_BEGIN_ARG_INFO_EX(arginfo_class_SimpleKafkaClient_Metadata_Collection_current, 0, 0, 0)
++ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_SimpleKafkaClient_Metadata_Collection_current, 0, 0, IS_MIXED, 0)
+ ZEND_END_ARG_INFO()
+
+ #define arginfo_class_SimpleKafkaClient_Metadata_Collection_key arginfo_class_SimpleKafkaClient_Metadata_Collection_count
+
+-#define arginfo_class_SimpleKafkaClient_Metadata_Collection_next arginfo_class_SimpleKafkaClient_Metadata_Collection_current
++ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_SimpleKafkaClient_Metadata_Collection_next, 0, 0, IS_VOID, 0)
++ZEND_END_ARG_INFO()
+
+ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_SimpleKafkaClient_Metadata_Collection_valid, 0, 0, _IS_BOOL, 0)
+ ZEND_END_ARG_INFO()