swag-industries/grpc
最新稳定版本:0.1
Composer 安装命令:
composer require swag-industries/grpc
包简介
PHP Implementation of GRPC
README 文档
README
An honest attempt to make a library that runs GRPC asynchronously.
This project is currently experimental, it supports only GRPC client and has not been tested in real world.
Prerequisite
- PHP 8.4
- protobuf compiler (ubuntu:
sudo apt install protobuf-compiler) - protobuf grpc (ubuntu:
sudo apt install protobuf-compiler-grpc)
Installation
Install GRPC php:
composer require swag-industries/grpc
Generate your GRPC library based on the proto file:
# On macos the path to the PHP plugin may be something like this: # /opt/homebrew/Cellar/grpc/1.69.0_1/bin/grpc_php_plugin protoc --proto_path=tests/resources/protos \ --php_out=tests/protobuf \ --grpc_out=generate_server:tests/protobuf \ --plugin=protoc-gen-grpc=/usr/bin/grpc_php_plugin \ tests/resources/protos/helloworld.proto
Enjoy using the client you just generated. (usage is somehow documented on official documentation)
Note about ALTS
Google has developed its own security transport layer aside of SSL/TLS. GRPC supports ALTS. Which is the name of the custom transport layer of Google. But GRPC also supports the standard TLS.
No package in PHP can interact with ALTS. This is something extremely custom.
This is why there is currently no plan to support ALTS.
Learn more about GRPC authentication here.
统计信息
- 总下载量: 1
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 3
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-09-14