From c4351aa64c5ec0639d03653172531bde61e871ac Mon Sep 17 00:00:00 2001 From: Nadav Ivgi Date: Thu, 16 Nov 2017 04:22:23 +0200 Subject: [PATCH] Switch back to upstream php-restclient The bug it has can be avoided by not using `format`,, which is already automatically detected by the response's Content-Type. --- client.php | 2 +- composer.json | 6 +----- composer.lock | 37 ++++++++++++++++--------------------- 3 files changed, 18 insertions(+), 27 deletions(-) diff --git a/client.php b/client.php index 7fb79e1..7b73e2b 100644 --- a/client.php +++ b/client.php @@ -7,7 +7,7 @@ class LightningStrikeClient { protected $api; public function __construct($url) { - $this->api = new RestClient([ 'base_url' => rtrim($url, '/'), 'format' => 'json' ]); + $this->api = new RestClient([ 'base_url' => rtrim($url, '/') ]); } /** diff --git a/composer.json b/composer.json index 523c64b..096ae13 100644 --- a/composer.json +++ b/composer.json @@ -2,12 +2,8 @@ "name": "elementsproject/lightning-strike-client-php", "description": "PHP client for the Lightning Strike REST API", "license": "MIT", - "repositories": [{ - "type": "vcs", - "url": "https://github.com/shesek/php-restclient.git" - }], "require": { - "tcdent/php-restclient": "dev-master" + "tcdent/php-restclient": "^0.1" }, "require-dev": { "phpunit/phpunit": "^6.4", diff --git a/composer.lock b/composer.lock index d13e8fa..fd5a644 100644 --- a/composer.lock +++ b/composer.lock @@ -4,21 +4,21 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "c5c8fc20964237d1fc5fc178bed4bbf2", - "content-hash": "8a17a4bb4b1002e7d516684253d9a85e", + "hash": "079a0a23f6f23e11b3d2954fad9b2663", + "content-hash": "fee32fe008ed2ec05c2447b14b98960a", "packages": [ { "name": "tcdent/php-restclient", - "version": "dev-master", + "version": "0.1.7", "source": { "type": "git", - "url": "https://github.com/shesek/php-restclient.git", - "reference": "e31fb44b068e16f327a29c58013bc676cf1f6d0a" + "url": "https://github.com/tcdent/php-restclient.git", + "reference": "4522e8518eaef770d715977fcb45f187f8ad7499" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/shesek/php-restclient/zipball/e31fb44b068e16f327a29c58013bc676cf1f6d0a", - "reference": "e31fb44b068e16f327a29c58013bc676cf1f6d0a", + "url": "https://api.github.com/repos/tcdent/php-restclient/zipball/4522e8518eaef770d715977fcb45f187f8ad7499", + "reference": "4522e8518eaef770d715977fcb45f187f8ad7499", "shasum": "" }, "require": { @@ -36,31 +36,28 @@ "restclient.php" ] }, + "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ { "name": "Travis Dent", - "role": "Developer", - "email": "tcdent@gmail.com" + "email": "tcdent@gmail.com", + "role": "Developer" } ], "description": "A generic REST API client for PHP", "homepage": "http://github.com/tcdent/php-restclient", "keywords": [ - "JSON", - "REST", - "XML", "api", "client", - "curl" + "curl", + "json", + "rest", + "xml" ], - "support": { - "issues": "http://github.com/tcdent/php-restclient/issues", - "source": "https://github.com/shesek/php-restclient/tree/dev-fixes" - }, - "time": "2017-11-14 04:55:41" + "time": "2017-09-07 20:44:36" } ], "packages-dev": [ @@ -2454,9 +2451,7 @@ ], "aliases": [], "minimum-stability": "stable", - "stability-flags": { - "tcdent/php-restclient": 20 - }, + "stability-flags": [], "prefer-stable": false, "prefer-lowest": false, "platform": [],