-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
2.2.3 Support arrays in query parameters
- Docker & Composer optimization - Fixed client.php to support query parameter values in an array. - Added test case for testing get query string
- Loading branch information
1 parent
984c783
commit 0d66ba2
Showing
13 changed files
with
334 additions
and
410 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,28 @@ | ||
- 5.4 | ||
- https://github.com/zendframework/zend-diactoros | ||
- https://packagist.org/packages/guzzlehttp/psr7 | ||
# Testing | ||
|
||
https://packagist.org/providers/psr/http-message-implementation | ||
The only thing you need to have for testing is Docker. | ||
|
||
**TODO** Add `ext-mcrypt` to `composer.json` | ||
Use Docker images to test and collect coverage (as it requires composer and xdebug). | ||
|
||
It is more convenient to use included `makefile` scripts: | ||
|
||
```bash | ||
$ make docker-build-7 | ||
$ make docker-login-7 | ||
``` | ||
|
||
And then inside docker console: | ||
|
||
```bash | ||
$ composer update | ||
$ composer install --prefer-dist --no-interaction | ||
$ composer test | ||
$ composer phar # this is only for CI | ||
$ composer coveralls # this is only for CI | ||
``` | ||
|
||
# Links | ||
|
||
- https://github.com/zendframework/zend-diactoros | ||
- https://packagist.org/packages/guzzlehttp/psr7 | ||
- https://packagist.org/providers/psr/http-message-implementation |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
FROM php:5.6-cli | ||
RUN apt-get update && \ | ||
apt-get upgrade -y && \ | ||
apt-get install -y git | ||
RUN pecl install xdebug-2.5.5 && docker-php-ext-enable xdebug | ||
RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" && \ | ||
php -r "if (hash_file('sha384', 'composer-setup.php') === '48e3236262b34d30969dca3c37281b3b4bbe3221bda826ac6a9a62d6444cdb0dcd0615698a5cbe587c3f0fe57a54d8f5') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" && \ | ||
php composer-setup.php && \ | ||
php -r "unlink('composer-setup.php');" && \ | ||
mv composer.phar /usr/local/bin/composer | ||
RUN echo 'phar.readonly = Off' > /usr/local/etc/php/conf.d/phar.ini | ||
WORKDIR /opt/sdk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
FROM php:7.3-cli | ||
RUN apt-get update && \ | ||
apt-get upgrade -y && \ | ||
apt-get install -y git | ||
RUN pecl install xdebug-2.7.2 && docker-php-ext-enable xdebug | ||
RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" && \ | ||
php -r "if (hash_file('sha384', 'composer-setup.php') === '48e3236262b34d30969dca3c37281b3b4bbe3221bda826ac6a9a62d6444cdb0dcd0615698a5cbe587c3f0fe57a54d8f5') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" && \ | ||
php composer-setup.php && \ | ||
php -r "unlink('composer-setup.php');" && \ | ||
mv composer.phar /usr/local/bin/composer | ||
RUN echo 'phar.readonly = Off' > /usr/local/etc/php/conf.d/phar.ini | ||
WORKDIR /opt/sdk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,15 @@ | ||
.PHONY: test | ||
test: | ||
./vendor/bin/phpunit --configuration ./phpunit.xml | ||
.PHONY: docker-build-5 | ||
docker-build-5: | ||
docker build -t ringcentral-php-sdk-5 -f Dockerfile5 . | ||
|
||
.PHONY: phar | ||
phar: | ||
php ./create-phar.php ${args} | ||
# Use "make phar args=develop" to build phar on develop branch | ||
.PHONY: docker-build-7 | ||
docker-build-7: | ||
docker build -t ringcentral-php-sdk-7 -f Dockerfile7 . | ||
|
||
.PHONY: all | ||
all: | ||
make test | ||
make phar | ||
.PHONY: docker-login-5 | ||
docker-login-5: | ||
docker run -v $(shell pwd):/opt/sdk --name ringcentral-php-sdk-5 -i ringcentral-php-sdk-5 /bin/bash | ||
|
||
.PHONY: install | ||
install: | ||
composer update | ||
composer install --prefer-dist --no-interaction | ||
|
||
.PHONY: coveralls | ||
coveralls: | ||
./vendor/bin/coveralls -v | ||
|
||
.PHONY: docker-shell | ||
docker-shell: | ||
eval "$(boot2docker shellinit)" | ||
|
||
.PHONY: docker-login | ||
docker-login: | ||
docker run -t -i -v $(shell pwd):/opt/sdk ringcentral-php-sdk /bin/bash | ||
|
||
.PHONY: docker-build | ||
docker-build: | ||
docker build -t ringcentral-php-sdk . | ||
.PHONY: docker-login-7 | ||
docker-login-7: | ||
docker run -v $(shell pwd):/opt/sdk -i -t ringcentral-php-sdk-7 /bin/bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,33 @@ | ||
{ | ||
"name": "ringcentral/ringcentral-php", | ||
"type": "library", | ||
"scripts": { | ||
"test": "phpunit --configuration ./phpunit.xml", | ||
"coveralls": "php-coveralls -v", | ||
"phar": "php create-phar.php" | ||
}, | ||
"require": { | ||
"ext-curl": "*", | ||
"ext-json": "*", | ||
"php": ">=5.6.0", | ||
"guzzlehttp/psr7": "^1.4.2", | ||
"pubnub/pubnub": "^4.0.0", | ||
"symfony/event-dispatcher": "^2.7|^3.3.2|^4.0", | ||
"guzzlehttp/guzzle": "^6.2.3" | ||
}, | ||
"suggest": { | ||
"ext-openssl": "to decrypt PubNub messages" | ||
}, | ||
"require-dev": { | ||
"phpunit/phpunit": "^5.7.26", | ||
"symfony/event-dispatcher": "^2.7", | ||
"php-coveralls/php-coveralls": "^2.1" | ||
}, | ||
"autoload": { | ||
"psr-4": { | ||
"RingCentral\\SDK\\": "src/" | ||
} | ||
}, | ||
"description": "RingCentral Connect Platform PHP SDK", | ||
"keywords": [ | ||
"php", | ||
|
@@ -21,25 +48,5 @@ | |
"name": "RingCentral, Inc.", | ||
"email": "[email protected]" | ||
} | ||
], | ||
"require": { | ||
"ext-curl": "*", | ||
"php": ">=5.6.0", | ||
"guzzlehttp/psr7": "^1.4.2", | ||
"pubnub/pubnub": "^4.0.0", | ||
"symfony/event-dispatcher": "^2.7|^3.3.2|^4.0", | ||
"guzzlehttp/guzzle": "^6.2.3" | ||
}, | ||
"suggest": { | ||
"ext-openssl": "to decrypt PubNub messages" | ||
}, | ||
"require-dev": { | ||
"phpunit/phpunit": "^5.7.26", | ||
"satooshi/php-coveralls": "^2.1.0" | ||
}, | ||
"autoload": { | ||
"psr-4": { | ||
"RingCentral\\SDK\\": "src/" | ||
} | ||
} | ||
] | ||
} |
Oops, something went wrong.