Skip to content

Commit 056971f

Browse files
authored
Merge pull request #776 from crazywhalecc/docs
protobuf and grpc don't conflict when they're built shared
2 parents a2f0640 + ba26359 commit 056971f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/SPC/builder/extension/protobuf.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,9 @@ public function validate(): void
1515
if ($this->builder->getPHPVersionID() < 80000 && getenv('SPC_SKIP_PHP_VERSION_CHECK') !== 'yes') {
1616
throw new \RuntimeException('The latest protobuf extension requires PHP 8.0 or later');
1717
}
18+
$grpc = $this->builder->getExt('grpc');
1819
// protobuf conflicts with grpc
19-
if ($this->builder->getExt('grpc') !== null) {
20+
if ($grpc?->isBuildStatic()) {
2021
throw new \RuntimeException('protobuf conflicts with grpc, please remove grpc or protobuf extension');
2122
}
2223
}

0 commit comments

Comments
 (0)