PHP Server under Roadrunner vs Golang client Example
- composer install
- docker-compose up -d
If you want to update grpc php proto files then run:
php app.php grpc:generate proto/calculator.proto
See ./golang-client/readme.md for client details.
Instead of running golang client you can use grpcui tool. Usage example:
cd /Users/alex/work/grpc-thrift/grpc
grpcui -insecure -import-path ./proto/ -proto calculator.proto localhost:50051
Support for optional fields
bash-5.1# php app.php grpc:generate proto/calculator.proto
Compiling `proto/calculator.proto`:
Error: calculator.proto: is a proto3 file that contains optional fields,
but code generator protoc-gen-php-grpc hasn't been updated to support optional fields in proto3.
Please ask the owner of this code generator to support proto3 optional.--php-grpc_out: