PHPackages                             spiral/php-grpc - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [HTTP &amp; Networking](/categories/http)
4. /
5. spiral/php-grpc

Abandoned → [spiral/roadrunner-grpc](/?search=spiral%2Froadrunner-grpc)ArchivedLibrary[HTTP &amp; Networking](/categories/http)

spiral/php-grpc
===============

High-Performance GRPC server for PHP applications

v1.6.0(4y ago)472755.8k↓20.5%483MITGoPHP &gt;=7.2

Since Oct 20Pushed 4y ago24 watchersCompare

[ Source](https://github.com/spiral-modules/php-grpc)[ Packagist](https://packagist.org/packages/spiral/php-grpc)[ RSS](/packages/spiral-php-grpc/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (9)Versions (24)Used By (3)

⚠️ RRv2 `protoc-gen-php-grpc` releases are here:  ⚠️
⚠️ `PHP Client` for the RRv2 is here:  ⚠️

PHP-GRPC
========

[](#php-grpc)

[![Latest Stable Version](https://camo.githubusercontent.com/9a843fd1d8904554c1c7c0bdc0a85a1ed07158a63252782f479a8f5deed12d80/68747470733a2f2f706f7365722e707567782e6f72672f73706972616c2f7068702d677270632f76657273696f6e)](https://packagist.org/packages/spiral/php-grpc)[![GoDoc](https://camo.githubusercontent.com/e12aeae6b4ec3806a6ff994a0ae97f6346e2556e189a6afafbac2effdc536592/68747470733a2f2f676f646f632e6f72672f6769746875622e636f6d2f73706972616c2f7068702d677270633f7374617475732e737667)](https://godoc.org/github.com/spiral/php-grpc)[![Tests](https://github.com/spiral/roadrunner-plugins/workflows/Linux/badge.svg)](https://github.com/spiral/roadrunner-plugins/actions)[![Linters](https://github.com/spiral/roadrunner-plugins/workflows/Linters/badge.svg)](https://github.com/spiral/roadrunner-plugins/actions)[![Go Report Card](https://camo.githubusercontent.com/add2fff980441becc4ad7de6f8ae2caf1bf5994165bb8e176daeaee1807c1480/68747470733a2f2f676f7265706f7274636172642e636f6d2f62616467652f6769746875622e636f6d2f73706972616c2f7068702d67727063)](https://goreportcard.com/report/github.com/spiral/php-grpc)[![Total alerts](https://camo.githubusercontent.com/ee6990578613ce28b37e737e681cec95478021f914d197540bb4e4f6f326789b/68747470733a2f2f696d672e736869656c64732e696f2f6c67746d2f616c657274732f672f73706972616c2f7068702d677270632e7376673f6c6f676f3d6c67746d266c6f676f57696474683d3138)](https://lgtm.com/projects/g/spiral/php-grpc/alerts/)[![Codecov](https://camo.githubusercontent.com/230625cdd3c3991b0b9c21013726dfb8658c4474bd33a5d9031aac32a78a213e/68747470733a2f2f636f6465636f762e696f2f67682f73706972616c2f7068702d677270632f6272616e63682f6d61737465722f67726170682f62616467652e737667)](https://codecov.io/gh/spiral/php-grpc/)

PHP-GRPC is an open-source (MIT) high-performance PHP [GRPC](https://grpc.io/) server build at top of [RoadRunner](https://github.com/spiral/roadrunner). Server support both PHP and Golang services running within one application.

Note:
-----

[](#note)

For the RoadRunner v2, please use the [RR-GRPC](https://github.com/spiral/roadrunner-grpc) library.

Documentation:
--------------

[](#documentation)

- [Installation and Configuration](https://spiral.dev/docs/grpc-configuration)
- [Service Code](https://spiral.dev/docs/grpc-service)
- [Client SDK](https://spiral.dev/docs/grpc-client)
- [Golang Services](https://spiral.dev/docs/grpc-golang)
- [Data Streaming](https://spiral.dev/docs/grpc-streaming)

Features:
---------

[](#features)

- native Golang GRPC implementation compliant
- minimal configuration, plug-and-play model
- very fast, low footprint proxy
- simple TLS configuration
- debug tools included
- Prometheus metrics
- 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

Usage:
------

[](#usage)

Install `rr-grpc` and `protoc-gen-php-grpc` by building it or use [pre-build binaries](https://github.com/spiral/php-grpc/releases).

Define your service schema using proto file. You can scaffold protobuf classes and GRPC [service interfaces](https://github.com/spiral/php-grpc/blob/master/example/server/src/Service/EchoInterface.php) using:

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

```

> Make sure to install [protoc compiler](https://github.com/protocolbuffers/protobuf) and run `composer require spiral/php-grpc` first

[Implement](https://github.com/spiral/php-grpc/blob/master/example/server/src/EchoService.php) needed classes and create [worker.php](https://github.com/spiral/php-grpc/blob/master/example/server/worker.php) to invoke your services.

Place [.rr.yaml](https://github.com/spiral/php-grpc/blob/master/example/server/.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-grpc grpc:workers -i

```

> See [example](https://github.com/spiral/php-grpc/tree/master/example).

You can find more details regarding server configuration at [RoadRunner Wiki](https://roadrunner.dev/docs).

License:
--------

[](#license)

MIT License (MIT). Please see [`LICENSE`](./LICENSE) for more information. Maintained by [SpiralScout](https://spiralscout.com).

###  Health Score

47

—

FairBetter than 94% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity57

Moderate usage in the ecosystem

Community31

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 82.2% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~57 days

Recently: every ~124 days

Total

21

Last Release

1618d ago

PHP version history (2 changes)v1.1.0PHP ^7.2

v1.4.2PHP &gt;=7.2

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/796136?v=4)[Anton Tsitou](/maintainers/wolfy-j)[@wolfy-j](https://github.com/wolfy-j)

---

Top Contributors

[![wolfy-j](https://avatars.githubusercontent.com/u/796136?v=4)](https://github.com/wolfy-j "wolfy-j (227 commits)")[![SerafimArts](https://avatars.githubusercontent.com/u/2461257?v=4)](https://github.com/SerafimArts "SerafimArts (21 commits)")[![rustatian](https://avatars.githubusercontent.com/u/8040338?v=4)](https://github.com/rustatian "rustatian (11 commits)")[![metalagman](https://avatars.githubusercontent.com/u/1983796?v=4)](https://github.com/metalagman "metalagman (7 commits)")[![lampatrampa](https://avatars.githubusercontent.com/u/30873408?v=4)](https://github.com/lampatrampa "lampatrampa (3 commits)")[![YamenSarah](https://avatars.githubusercontent.com/u/5369902?v=4)](https://github.com/YamenSarah "YamenSarah (2 commits)")[![rochacon](https://avatars.githubusercontent.com/u/321351?v=4)](https://github.com/rochacon "rochacon (1 commits)")[![hgkmail](https://avatars.githubusercontent.com/u/6395889?v=4)](https://github.com/hgkmail "hgkmail (1 commits)")[![ganl](https://avatars.githubusercontent.com/u/11937688?v=4)](https://github.com/ganl "ganl (1 commits)")[![evsign](https://avatars.githubusercontent.com/u/7965780?v=4)](https://github.com/evsign "evsign (1 commits)")[![everflux](https://avatars.githubusercontent.com/u/985728?v=4)](https://github.com/everflux "everflux (1 commits)")

---

Tags

golanggrpcgrpc-serverphpphp-grpcphp7roadrunnerspiraltls

###  Code Quality

TestsPHPUnit

Static AnalysisPsalm

Type Coverage Yes

### Embed Badge

![Health badge](/badges/spiral-php-grpc/health.svg)

```
[![Health](https://phpackages.com/badges/spiral-php-grpc/health.svg)](https://phpackages.com/packages/spiral-php-grpc)
```

###  Alternatives

[php-http/client-common

Common HTTP Client implementations and tools for HTTPlug

1.1k225.5M571](/packages/php-http-client-common)[guzzlehttp/uri-template

A polyfill class for uri\_template of PHP

194218.9M65](/packages/guzzlehttp-uri-template)[league/openapi-psr7-validator

Validate PSR-7 messages against OpenAPI (3.0.2) specifications expressed in YAML or JSON

55715.9M69](/packages/league-openapi-psr7-validator)[ratchet/rfc6455

RFC6455 WebSocket protocol handler

23433.7M69](/packages/ratchet-rfc6455)[gos/web-socket-bundle

Symfony Web Socket Bundle

6202.2M8](/packages/gos-web-socket-bundle)[spiral/roadrunner-http

RoadRunner: HTTP and PSR-7 worker

799.2M48](/packages/spiral-roadrunner-http)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
