Skip to content

Instantly share code, notes, and snippets.

@Nek-
Created February 11, 2024 19:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Nek-/f75c53de9d0aadd09e0da1ac052ab9a7 to your computer and use it in GitHub Desktop.
Save Nek-/f75c53de9d0aadd09e0da1ac052ab9a7 to your computer and use it in GitHub Desktop.
Installation protoc/grpc with php plugin on macos

Installation with homebrew

brew install protobuf
brew install grpc
pecl install grpc

Notice: you can also compile everything by yourself and it's documented here.

Usage

Example of usage:

protoc --proto_path=src/protos \
    --php_out=generated/php \
    --grpc_out=generate_server:generated/php \
    --plugin=protoc-gen-grpc=/opt/homebrew/Cellar/grpc/1.60.0_1/bin/grpc_php_plugin protos/helloworld.proto
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment