From ae68c8e4166523b15bff392e45e0f159fcd9c191 Mon Sep 17 00:00:00 2001 From: Andreas de Pretis Date: Wed, 7 Jan 2026 13:58:40 +0100 Subject: [PATCH] fix issue 689: require grpc-extension in composer.json --- composer.json | 1 + src/Client/GRPC/BaseClient.php | 8 -------- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/composer.json b/composer.json index 45033d2f..df76f9c7 100644 --- a/composer.json +++ b/composer.json @@ -24,6 +24,7 @@ "php": ">=8.1", "ext-curl": "*", "ext-json": "*", + "ext-grpc": "*", "google/common-protos": "^4.9", "google/protobuf": "^4.31.1", "grpc/grpc": "^1.57", diff --git a/src/Client/GRPC/BaseClient.php b/src/Client/GRPC/BaseClient.php index 1f80cbbe..e21dca17 100644 --- a/src/Client/GRPC/BaseClient.php +++ b/src/Client/GRPC/BaseClient.php @@ -68,10 +68,6 @@ final public function __construct(WorkflowServiceClient|\Closure $workflowServic */ public static function create(string $address): static { - if (!\extension_loaded('grpc')) { - throw new \RuntimeException('The gRPC extension is required to use Temporal Client.'); - } - return new static(static fn(): WorkflowServiceClient => new WorkflowServiceClient( $address, ['credentials' => \Grpc\ChannelCredentials::createInsecure()], @@ -96,10 +92,6 @@ public static function createSSL( ?string $clientPem = null, ?string $overrideServerName = null, ): static { - if (!\extension_loaded('grpc')) { - throw new \RuntimeException('The gRPC extension is required to use Temporal Client.'); - } - $loadCert = static function (?string $cert): ?string { return match (true) { $cert === null, $cert === '' => null,