Unverified Commit 66bae588 authored by Paul Yang's avatar Paul Yang Committed by GitHub

Add document for php development (#6694)

* Add document for php development

* Fix comments
parent 9a0c8481
...@@ -95,3 +95,45 @@ Known Issues ...@@ -95,3 +95,45 @@ Known Issues
* HHVM not tested. * HHVM not tested.
* C extension not tested on windows, mac, php 7.0. * C extension not tested on windows, mac, php 7.0.
* Message name cannot be Empty. * Message name cannot be Empty.
## Development
### Docker Image
We provide a docker image for php development, which is also used in our automatic tests:
```
docker run --security-opt seccomp=unconfined -it protobuftesting/php_8dbe419c6df1a8b3af0ae3a267c112efb436b45c
```
### Test Native PHP
```
# Download protobuf
git clone https://github.com/protocolbuffers/protobuf.git
cd protobuf
# Build protoc
./autogen.sh
./configure
make -j4
# Test native php
cd php
composer install
composer test
```
### Test C Exteinsion
After you have finished testing the native php, you can test the c exteniosn:
```
cd tests
./test.sh 5.6 # The php runtime version.
# We provide 5.5, 5.5-zts, 5.6, 5.6-zts, 7.0, 7.0-zts, 7.1, 7.1-zts, 7.2, 7.2-zts, 7.3 and 7.3-zts
# ls /usr/local for more details
```
If you want to use gdb to debug the c extension, you can do:
```
./gdb_test.sh
```
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment