From 2bb7f9c7b771786f37e6f38a168423f480894292 Mon Sep 17 00:00:00 2001 From: Jovan Ruzic Date: Wed, 7 Dec 2022 09:12:08 +0100 Subject: [PATCH] feat(MPM-553): add missing docblock (#74) --- .circleci/config.yml | 2 +- docker/dev/php/Dockerfile | 7 ++----- src/Consumer/KafkaConsumerInterface.php | 6 ++++++ 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index c87974a..43e8936 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -2,7 +2,7 @@ version: 2.1 orbs: ci-caching: jobcloud/ci-caching@3.1 - ci-php: jobcloud/ci-php@2.4 + ci-php: jobcloud/ci-php@2.5 workflows: test-php-kafka-lib: diff --git a/docker/dev/php/Dockerfile b/docker/dev/php/Dockerfile index e0c442a..26b7a51 100644 --- a/docker/dev/php/Dockerfile +++ b/docker/dev/php/Dockerfile @@ -1,4 +1,4 @@ -FROM php:7.4-cli-alpine3.13 +FROM php:7.4-cli-alpine3.16 ARG HOST_USER_ID ARG HOST_USER @@ -10,10 +10,7 @@ COPY files/php/ /phpIni # SYS: Install required packages RUN apk --no-cache upgrade && \ - apk --no-cache add bash git sudo openssh autoconf gcc g++ make - -RUN apk add librdkafka librdkafka-dev \ - --update-cache --repository http://dl-3.alpinelinux.org/alpine/edge/community + apk --no-cache add bash git sudo openssh autoconf gcc g++ make librdkafka librdkafka-dev # we need support for users with ID higher than 65k, so instead of using this: #RUN adduser -u $HOST_USER_ID -D -H $HOST_USER diff --git a/src/Consumer/KafkaConsumerInterface.php b/src/Consumer/KafkaConsumerInterface.php index aeca20a..34485a1 100644 --- a/src/Consumer/KafkaConsumerInterface.php +++ b/src/Consumer/KafkaConsumerInterface.php @@ -4,6 +4,9 @@ namespace Jobcloud\Kafka\Consumer; +use Jobcloud\Kafka\Exception\KafkaConsumerConsumeException; +use Jobcloud\Kafka\Exception\KafkaConsumerEndOfPartitionException; +use Jobcloud\Kafka\Exception\KafkaConsumerTimeoutException; use Jobcloud\Kafka\Message\KafkaConsumerMessageInterface; use RdKafka\Metadata\Topic as RdKafkaMetadataTopic; use RdKafka\TopicPartition as RdKafkaTopicPartition; @@ -45,6 +48,9 @@ public function isSubscribed(): bool; * @param integer $timeoutMs * @param boolean $autoDecode * @return KafkaConsumerMessageInterface + * @throws KafkaConsumerConsumeException + * @throws KafkaConsumerEndOfPartitionException + * @throws KafkaConsumerTimeoutException */ public function consume(int $timeoutMs = 10000, bool $autoDecode = true): KafkaConsumerMessageInterface;