Skip to content

Commit 99be7b0

Browse files
authored
Add conflict message when building protobuf and grpc (#653)
1 parent 8925e97 commit 99be7b0

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/SPC/builder/extension/protobuf.php

+4
Original file line numberDiff line numberDiff line change
@@ -15,5 +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+
// protobuf conflicts with grpc
19+
if ($this->builder->getExt('grpc') !== null) {
20+
throw new \RuntimeException('protobuf conflicts with grpc, please remove grpc or protobuf extension');
21+
}
1822
}
1923
}

0 commit comments

Comments
 (0)