Skip to content

Rename metadata err #12

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Dec 28, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion configuration_arginfo.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* This is a generated file, edit the .stub.php file instead.
* Stub hash: 2a9fd8de9f13ef85f4c02373cc6f2dc87114edd0 */
* Stub hash: f629d931de4ad3a347583a46a7fce628f567f8ee */

ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Kafka_Configuration___construct, 0, 0, 0)
ZEND_END_ARG_INFO()
Expand Down
4 changes: 2 additions & 2 deletions metadata_partition.c
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,9 @@ ZEND_METHOD(Kafka_Metadata_Partition, getId)
}
/* }}} */

/* {{{ proto int Kafka\Metadata\Partition::getErr()
/* {{{ proto int Kafka\Metadata\Partition::getErrorCode()
Partition error reported by broker */
ZEND_METHOD(Kafka_Metadata_Partition, getErr)
ZEND_METHOD(Kafka_Metadata_Partition, getErrorCode)
{
object_intern *intern;

Expand Down
2 changes: 1 addition & 1 deletion metadata_partition.stub.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class Partition
{
public function getId(): int {}

public function getErr(): int {}
public function getErrorCode(): int {}

public function getLeader(): int {}

Expand Down
8 changes: 4 additions & 4 deletions metadata_partition_arginfo.h
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
/* This is a generated file, edit the .stub.php file instead.
* Stub hash: e34e94f591ac3caf4ed3916d8d15252f96c8fc6b */
* Stub hash: 934cef11a377e54b4d5f8cea75e6d590ec071d50 */

ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Kafka_Metadata_Partition_getId, 0, 0, IS_LONG, 0)
ZEND_END_ARG_INFO()

#define arginfo_class_Kafka_Metadata_Partition_getErr arginfo_class_Kafka_Metadata_Partition_getId
#define arginfo_class_Kafka_Metadata_Partition_getErrorCode arginfo_class_Kafka_Metadata_Partition_getId

#define arginfo_class_Kafka_Metadata_Partition_getLeader arginfo_class_Kafka_Metadata_Partition_getId

Expand All @@ -15,15 +15,15 @@ ZEND_END_ARG_INFO()


ZEND_METHOD(Kafka_Metadata_Partition, getId);
ZEND_METHOD(Kafka_Metadata_Partition, getErr);
ZEND_METHOD(Kafka_Metadata_Partition, getErrorCode);
ZEND_METHOD(Kafka_Metadata_Partition, getLeader);
ZEND_METHOD(Kafka_Metadata_Partition, getReplicas);
ZEND_METHOD(Kafka_Metadata_Partition, getIsrs);


static const zend_function_entry class_Kafka_Metadata_Partition_methods[] = {
ZEND_ME(Kafka_Metadata_Partition, getId, arginfo_class_Kafka_Metadata_Partition_getId, ZEND_ACC_PUBLIC)
ZEND_ME(Kafka_Metadata_Partition, getErr, arginfo_class_Kafka_Metadata_Partition_getErr, ZEND_ACC_PUBLIC)
ZEND_ME(Kafka_Metadata_Partition, getErrorCode, arginfo_class_Kafka_Metadata_Partition_getErrorCode, ZEND_ACC_PUBLIC)
ZEND_ME(Kafka_Metadata_Partition, getLeader, arginfo_class_Kafka_Metadata_Partition_getLeader, ZEND_ACC_PUBLIC)
ZEND_ME(Kafka_Metadata_Partition, getReplicas, arginfo_class_Kafka_Metadata_Partition_getReplicas, ZEND_ACC_PUBLIC)
ZEND_ME(Kafka_Metadata_Partition, getIsrs, arginfo_class_Kafka_Metadata_Partition_getIsrs, ZEND_ACC_PUBLIC)
Expand Down
8 changes: 4 additions & 4 deletions metadata_topic.c
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,9 @@ static HashTable *get_debug_info(Z_KAFKA_OBJ *object, int *is_temp) /* {{{ */
}
/* }}} */

/* {{{ proto string Kafka\MetadataTopic::getTopic()
/* {{{ proto string Kafka\MetadataTopic::getName()
Topic name */
ZEND_METHOD(Kafka_Metadata_Topic, getTopic)
ZEND_METHOD(Kafka_Metadata_Topic, getName)
{
object_intern *intern;

Expand All @@ -110,9 +110,9 @@ ZEND_METHOD(Kafka_Metadata_Topic, getTopic)
}
/* }}} */

/* {{{ proto int Kafka\MetadataTopic::getErr()
/* {{{ proto int Kafka\MetadataTopic::getErrorCode()
Error */
ZEND_METHOD(Kafka_Metadata_Topic, getErr)
ZEND_METHOD(Kafka_Metadata_Topic, getErrorCode)
{
object_intern *intern;

Expand Down
4 changes: 2 additions & 2 deletions metadata_topic.stub.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@

class Topic
{
public function getTopic(): string {}
public function getName(): string {}

public function getErr(): int {}
public function getErrorCode(): int {}

public function getPartitions(): Collection {}
}
14 changes: 7 additions & 7 deletions metadata_topic_arginfo.h
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
/* This is a generated file, edit the .stub.php file instead.
* Stub hash: 3950e26cab1ce664cffda7d6df362e2b488d2fe3 */
* Stub hash: 9d73f729b3dca2b6ac7fd5fdc39ba23d768ca792 */

ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Kafka_Metadata_Topic_getTopic, 0, 0, IS_STRING, 0)
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Kafka_Metadata_Topic_getName, 0, 0, IS_STRING, 0)
ZEND_END_ARG_INFO()

ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Kafka_Metadata_Topic_getErr, 0, 0, IS_LONG, 0)
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Kafka_Metadata_Topic_getErrorCode, 0, 0, IS_LONG, 0)
ZEND_END_ARG_INFO()

ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_class_Kafka_Metadata_Topic_getPartitions, 0, 0, Kafka\\Metadata\\Collection, 0)
ZEND_END_ARG_INFO()


ZEND_METHOD(Kafka_Metadata_Topic, getTopic);
ZEND_METHOD(Kafka_Metadata_Topic, getErr);
ZEND_METHOD(Kafka_Metadata_Topic, getName);
ZEND_METHOD(Kafka_Metadata_Topic, getErrorCode);
ZEND_METHOD(Kafka_Metadata_Topic, getPartitions);


static const zend_function_entry class_Kafka_Metadata_Topic_methods[] = {
ZEND_ME(Kafka_Metadata_Topic, getTopic, arginfo_class_Kafka_Metadata_Topic_getTopic, ZEND_ACC_PUBLIC)
ZEND_ME(Kafka_Metadata_Topic, getErr, arginfo_class_Kafka_Metadata_Topic_getErr, ZEND_ACC_PUBLIC)
ZEND_ME(Kafka_Metadata_Topic, getName, arginfo_class_Kafka_Metadata_Topic_getName, ZEND_ACC_PUBLIC)
ZEND_ME(Kafka_Metadata_Topic, getErrorCode, arginfo_class_Kafka_Metadata_Topic_getErrorCode, ZEND_ACC_PUBLIC)
ZEND_ME(Kafka_Metadata_Topic, getPartitions, arginfo_class_Kafka_Metadata_Topic_getPartitions, ZEND_ACC_PUBLIC)
ZEND_FE_END
};
2 changes: 1 addition & 1 deletion tests/metadata.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ echo $metadata->getOrigBrokerName() . PHP_EOL;
$topics = $metadata->getTopics();

while ($topics->valid()) {
echo $topics->current()->getTopic() . PHP_EOL;
echo $topics->current()->getName() . PHP_EOL;
echo $topics->current()->getPartitions()->count() . PHP_EOL;
echo $topics->current()->getPartitions()->current()->getLeader() . PHP_EOL;
$topics->next();
Expand Down