Skip to content

Commit d4bfc1c

Browse files
committed
remove grpc dep from composer
1 parent 19a89bc commit d4bfc1c

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

packages/php/composer.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@
88
"require": {
99
"php": ">=8.1",
1010
"grpc/grpc": "^1.74.0",
11-
"google/protobuf": "^3.25",
12-
"ext-grpc": "*"
11+
"google/protobuf": "^3.25"
1312
},
1413
"require-dev": {
1514
"phpunit/phpunit": "^10.0",

packages/php/src/PluginBase.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,10 @@ private function resolveEventBinding(string $payloadFqcn): ?array {
285285

286286
// Runner
287287
public function run(): void {
288+
if (!\extension_loaded('grpc')) {
289+
fwrite(STDERR, "[php] gRPC extension (ext-grpc) not loaded. Install via 'pecl install grpc' or run with the bundled PHP binary that includes gRPC.\n");
290+
throw new \RuntimeException('Missing required PHP extension: ext-grpc');
291+
}
288292
fwrite(STDOUT, "[php] connecting to {$this->serverAddress}...\n");
289293

290294
$this->client = new PluginClient($this->serverAddress, [

0 commit comments

Comments
 (0)