Assuming you have node, npm, php and composer installed, you will need to install the following packages using homebrew commands:
brew install grpc
brew install protobuf
brew install protoc
Run the following command from root of project
protoc -I proto --php_out=lib --grpc_out=lib --plugin=protoc-gen-grpc=`which grpc_php_plugin` ./protos/jokes.proto --proto_path=./protos
This will auto generate files needed for the grpc service / client based on what has been specified within the protos/jokes.proto
file
Run composer install
. This will add the php libs we need to run the example and look after auto-loading of php files generated by the protoc
command above.