Skip to content
Snippets Groups Projects
Commit 53c2bbde authored by Stanley Cheung's avatar Stanley Cheung Committed by GitHub
Browse files

Merge pull request #11173 from stanley-cheung/php-split-protobuf-dep

PHP: stop requiring google/protobuf PHP implementation
parents 90224ba8 6e589c6a
No related branches found
No related tags found
No related merge requests found
......@@ -6,12 +6,15 @@
"homepage": "http://grpc.io",
"license": "BSD-3-Clause",
"require": {
"php": ">=5.5.0",
"google/protobuf": "^v3.3.0"
"php": ">=5.5.0"
},
"require-dev": {
"google/auth": "v0.9"
},
"suggest": {
"ext-protobuf": "For better performance, install the protobuf C extension.",
"google/protobuf": "To get started using grpc quickly, install the native protobuf library."
},
"autoload": {
"psr-4": {
"Grpc\\": "src/php/lib/Grpc/"
......
......@@ -2,7 +2,8 @@
"name": "grpc/grpc-demo",
"description": "gRPC example for PHP",
"require": {
"grpc/grpc": "^v1.1.0"
"grpc/grpc": "^v1.3.0",
"google/protobuf": "^v3.3.0"
},
"autoload": {
"psr-4": {
......
......@@ -174,6 +174,28 @@ $ sudo make install
```
### Protobuf Runtime library
There are two protobuf runtime libraries to choose from. They are idenfical in terms of APIs offered.
1. C implementation (for better performance)
``` sh
$ sudo pecl install protobuf
```
2. PHP implementation (for easier installation)
Add this to your `composer.json` file:
```
"require": {
"google/protobuf": "^v3.3.0"
}
```
### PHP Protoc Plugin
You need the gRPC PHP protoc plugin to generate the client stub classes.
......
{
"minimum-stability": "dev",
"require": {
"grpc/grpc": "dev-master"
"grpc/grpc": "dev-master",
"google/protobuf": "^v3.3.0"
},
"autoload": {
"psr-4": {
......
......@@ -8,12 +8,15 @@
"homepage": "http://grpc.io",
"license": "BSD-3-Clause",
"require": {
"php": ">=5.5.0",
"google/protobuf": "^v3.3.0"
"php": ">=5.5.0"
},
"require-dev": {
"google/auth": "v0.9"
},
"suggest": {
"ext-protobuf": "For better performance, install the protobuf C extension.",
"google/protobuf": "To get started using grpc quickly, install the native protobuf library."
},
"autoload": {
"psr-4": {
"Grpc\\": "src/php/lib/Grpc/"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment