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

Merge pull request #7539 from stanley-cheung/php-minor-cleanup-ga

PHP: minor cleanup for GA
parents 31fd0531 bebaf5b6
No related branches found
No related tags found
No related merge requests found
...@@ -3,6 +3,6 @@ ...@@ -3,6 +3,6 @@
"description": "gRPC example for PHP", "description": "gRPC example for PHP",
"minimum-stability": "dev", "minimum-stability": "dev",
"require": { "require": {
"grpc/grpc": "v0.15.0" "grpc/grpc": "v0.15.2"
} }
} }
...@@ -9,23 +9,12 @@ GA ...@@ -9,23 +9,12 @@ GA
## Environment ## Environment
Prerequisite: `php` >=5.5, `phpize`, `pecl`, `phpunit` Prerequisite:
* `php` 5.5 or above, 7.0 or above
**Linux (Debian):** * `pear` and `pecl`
* `phpunit`
```sh
$ sudo apt-get install php5 php5-dev php-pear
```
**Linux (CentOS):**
```sh
$ yum install php55w
$ yum --enablerepo=remi,remi-php55 install php-devel php-pear
```
**Mac OS X:**
**PEAR:**
```sh ```sh
$ curl -O http://pear.php.net/go-pear.phar $ curl -O http://pear.php.net/go-pear.phar
$ sudo php -d detect_unicode=0 go-pear.phar $ sudo php -d detect_unicode=0 go-pear.phar
...@@ -72,13 +61,7 @@ $ sudo make install ...@@ -72,13 +61,7 @@ $ sudo make install
### gRPC PHP extension ### gRPC PHP extension
Install the gRPC PHP extension from PECL Compile the gRPC PHP extension
```sh
$ sudo pecl install grpc
```
Or, compile from source
```sh ```sh
$ cd grpc/src/php/ext/grpc $ cd grpc/src/php/ext/grpc
...@@ -148,12 +131,8 @@ Alternatively, you can download `protoc` binaries from [the protocol buffers Git ...@@ -148,12 +131,8 @@ Alternatively, you can download `protoc` binaries from [the protocol buffers Git
You need to install `protoc-gen-php` to generate stub class `.php` files from service definition `.proto` files. You need to install `protoc-gen-php` to generate stub class `.php` files from service definition `.proto` files.
```sh ```sh
$ cd grpc/src/php/vendor/stanley-cheung/protobuf-php # if you had run `composer install` in the previous step $ git clone https://github.com/stanley-cheung/Protobuf-PHP
$ cd Protobuf-PHP
OR
$ git clone https://github.com/stanley-cheung/Protobuf-PHP # clone from github repo
$ gem install rake ronn $ gem install rake ronn
$ rake pear:package version=1.0 $ rake pear:package version=1.0
$ sudo pear install Protobuf-1.0.tgz $ sudo pear install Protobuf-1.0.tgz
...@@ -175,7 +154,7 @@ Run a local server serving the math services. Please see [Node][] for how to run ...@@ -175,7 +154,7 @@ Run a local server serving the math services. Please see [Node][] for how to run
```sh ```sh
$ cd grpc $ cd grpc
$ npm install $ npm install
$ nodejs src/node/test/math/math_server.js $ node src/node/test/math/math_server.js
``` ```
### Run test client ### Run test client
...@@ -212,7 +191,7 @@ Make sure the Node math server is still running, as above. ...@@ -212,7 +191,7 @@ Make sure the Node math server is still running, as above.
```sh ```sh
$ cd grpc $ cd grpc
$ npm install $ npm install
$ nodejs src/node/test/math/math_server.js $ node src/node/test/math/math_server.js
``` ```
Make sure you have run `composer install` to generate the `vendor/autoload.php` file Make sure you have run `composer install` to generate the `vendor/autoload.php` file
...@@ -282,7 +261,7 @@ Make sure the Node math server is still running, as above. ...@@ -282,7 +261,7 @@ Make sure the Node math server is still running, as above.
```sh ```sh
$ cd grpc $ cd grpc
$ npm install $ npm install
$ nodejs src/node/test/math/math_server.js $ node src/node/test/math/math_server.js
``` ```
Make sure you have run `composer install` to generate the `vendor/autoload.php` file Make sure you have run `composer install` to generate the `vendor/autoload.php` file
......
...@@ -8,7 +8,9 @@ ...@@ -8,7 +8,9 @@
"version": "1.0.0", "version": "1.0.0",
"require": { "require": {
"php": ">=5.5.0", "php": ">=5.5.0",
"stanley-cheung/protobuf-php": "v0.6", "stanley-cheung/protobuf-php": "v0.6"
},
"require-dev": {
"google/auth": "v0.9" "google/auth": "v0.9"
}, },
"autoload": { "autoload": {
......
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