Closed b1rdex closed 2 years ago
The following code:
<?php $rdKafkaTopicConfig = new \RdKafka\TopicConf(); $producerTopic = $this->producerConfig->getTopicConfig($envelope); foreach ($producerTopic->getParams() as $name => $value) { $rdKafkaTopicConfig->set($name, $value); } $topic = $producer->newTopic($producerTopic->getName(), $rdKafkaTopicConfig);
But I expected this output instead:
Argument #2 ($topic_conf) must be of type ?RdKafka\Conf, RdKafka\TopicConf given
6.0.0RC2
1.6.0
8.0
debian 11 / alpine
No response
v5 code works fine, v6 = fatal error. IMO the type is incorrect and should be reverted.
Here is a snippet from the readme:
Looks like a test for this part is missing?
https://github.com/arnaud-lb/php-rdkafka/blob/c4260fb5354460cb1d96671607f50c2f23753054/rdkafka.stub.php#L40
https://github.com/arnaud-lb/php-rdkafka/blob/c4260fb5354460cb1d96671607f50c2f23753054/kafka_consumer.stub.php#L52
Thank you @b1rdex
Fixed in #502
Description
The following code:
But I expected this output instead:
php-rdkafka Version
6.0.0RC2
librdkafka Version
1.6.0
PHP Version
8.0
Operating System
debian 11 / alpine
Kafka Version
No response