Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
Grpc
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
tci-gateway-module
Grpc
Commits
79794247
Commit
79794247
authored
8 years ago
by
Stanley Cheung
Committed by
GitHub
8 years ago
Browse files
Options
Downloads
Plain Diff
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
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
examples/php/composer.json
+1
-1
1 addition, 1 deletion
examples/php/composer.json
src/php/README.md
+11
-32
11 additions, 32 deletions
src/php/README.md
src/php/composer.json
+3
-1
3 additions, 1 deletion
src/php/composer.json
with
15 additions
and
34 deletions
examples/php/composer.json
+
1
−
1
View file @
79794247
...
@@ -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
"
}
}
}
}
This diff is collapsed.
Click to expand it.
src/php/README.md
+
11
−
32
View file @
79794247
...
@@ -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
$
node
js
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
$
node
js
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
$
node
js
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
...
...
This diff is collapsed.
Click to expand it.
src/php/composer.json
+
3
−
1
View file @
79794247
...
@@ -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"
:
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment