🔌 Fast and furious GRPC server for PHP applications
Switch branches/tags
Nothing to show
Clone or download
Latest commit 4a48e8b Oct 26, 2018
Type Name Latest commit message Commit time
Failed to load latest commit information.
cmd Update template.go Oct 20, 2018
example Update composer.json Oct 20, 2018
parser more badges Oct 20, 2018
src more tests Oct 20, 2018
tests more tests Oct 20, 2018
.gitattributes working on styling Oct 15, 2018
.gitignore more tests Oct 18, 2018
.travis.yml travis is the best Oct 20, 2018
CHANGELOG.md Update CHANGELOG.md Oct 20, 2018
CODE_OF_CONDUCT.md build scripts Oct 20, 2018
LICENSE working on styling Oct 15, 2018
Makefile build test Oct 20, 2018
README.md Update README.md Oct 25, 2018
build.sh fix build file Oct 20, 2018
codec.go more badges Oct 20, 2018
codec_test.go codec tests Oct 20, 2018
composer.json Update composer.json Oct 20, 2018
config.go more badges Oct 20, 2018
config_test.go more tests Oct 20, 2018
go.mod rename library Oct 20, 2018
phpunit.xml integration tests Oct 20, 2018
proxy.go more tests Oct 20, 2018
proxy_test.go more tests Oct 20, 2018
rpc.go commands added Oct 17, 2018
rpc_test.go rpc test Oct 20, 2018
service.go more tests Oct 20, 2018
service_test.go more tests Oct 20, 2018



Latest Stable Version GoDoc Build Status Go Report Card Codecov

PHP-GRPC is an open-source (MIT) high-performance PHP GRPC server build at top of RoadRunner. Server support both PHP and Golang services running within one application.


  • native Golang GRPC implementation compliant
  • minimal configuration, plug-and-play model
  • very fast, low footprint proxy
  • simple TLS configuration
  • debug tools included
  • middleware and server customization support
  • code generation using protoc plugin (go get github.com/spiral/php-grpc/cmd/protoc-gen-php-grpc)
  • transport, message, worker error management
  • response error codes over php exceptions
  • works on Windows


Install rr-grpc and protoc-gen-php-grpc by building it or use pre-build binaries.

Define your service schema using proto file. You can scaffold protobuf classes and GRPC service interfaces using:

$ protoc --php_out=target-dir/ --php-grpc_out=target-dir/ sample.proto

Make sure to install prococ compiler and run composer require spiral/php-grpc first

Implement needed classes and create worker.php to invoke your services.

Place .rr.yaml (or any other format supported by viper configurator) into the root of your project. You can run your application now:

$ rr-grpc serve -v -d

To reset workers state:

$ rr-grpc grpc:reset

To show workers statistics:

$ rr-gprc grpc:workers -i

See example.

You can find more details regarding server configuration at RoadRunner Wiki.


MIT License (MIT). Please see LICENSE for more information. Maintained by SpiralScout.