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,