From ba26359ddeb9c5c34e802055e1808b4a4940d169 Mon Sep 17 00:00:00 2001 From: DubbleClick Date: Thu, 19 Jun 2025 15:15:01 +0700 Subject: [PATCH] protobuf and grpc don't conflict when they're built shared --- src/SPC/builder/extension/protobuf.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/SPC/builder/extension/protobuf.php b/src/SPC/builder/extension/protobuf.php index 3393ad43..0aa6ed51 100644 --- a/src/SPC/builder/extension/protobuf.php +++ b/src/SPC/builder/extension/protobuf.php @@ -15,8 +15,9 @@ class protobuf extends Extension if ($this->builder->getPHPVersionID() < 80000 && getenv('SPC_SKIP_PHP_VERSION_CHECK') !== 'yes') { throw new \RuntimeException('The latest protobuf extension requires PHP 8.0 or later'); } + $grpc = $this->builder->getExt('grpc'); // protobuf conflicts with grpc - if ($this->builder->getExt('grpc') !== null) { + if ($grpc?->isBuildStatic()) { throw new \RuntimeException('protobuf conflicts with grpc, please remove grpc or protobuf extension'); } }