From 29af2c59fedc19e51b10d00edfe4c6ec93ad6c31 Mon Sep 17 00:00:00 2001 From: Jamie Hannaford Date: Tue, 4 Aug 2015 10:27:49 +0200 Subject: [PATCH 1/2] use correct version in user-agent header --- lib/OpenCloud/Common/Http/Client.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/OpenCloud/Common/Http/Client.php b/lib/OpenCloud/Common/Http/Client.php index 9afbf9a38..a82c5ddeb 100644 --- a/lib/OpenCloud/Common/Http/Client.php +++ b/lib/OpenCloud/Common/Http/Client.php @@ -18,7 +18,7 @@ namespace OpenCloud\Common\Http; use Guzzle\Http\Client as GuzzleClient; -use Guzzle\Http\Curl\CurlVersion; +use OpenCloud\Version; use OpenCloud\Common\Exceptions\UnsupportedVersionError; /** @@ -27,7 +27,6 @@ */ class Client extends GuzzleClient { - const VERSION = '1.9.0'; const MINIMUM_PHP_VERSION = '5.3.0'; public function __construct($baseUrl = '', $config = null) @@ -46,9 +45,10 @@ public function __construct($baseUrl = '', $config = null) public function getDefaultUserAgent() { - return 'OpenCloud/' . self::VERSION - . ' cURL/' . CurlVersion::getInstance()->get('version') - . ' PHP/' . PHP_VERSION; + return 'OpenCloud/' . Version::getVersion() + . ' Guzzle/' . Version::getGuzzleVersion() + . ' cURL/' . Version::getCurlVersion() + . ' PHP/' . PHP_VERSION; } public function getUserAgent() From 69fd07b26fa9d08f023120a25354221a4c856ba7 Mon Sep 17 00:00:00 2001 From: Jamie Hannaford Date: Tue, 4 Aug 2015 10:37:22 +0200 Subject: [PATCH 2/2] syntax for the syntax gods --- lib/OpenCloud/Common/Http/Client.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/OpenCloud/Common/Http/Client.php b/lib/OpenCloud/Common/Http/Client.php index a82c5ddeb..1988eda5e 100644 --- a/lib/OpenCloud/Common/Http/Client.php +++ b/lib/OpenCloud/Common/Http/Client.php @@ -47,7 +47,7 @@ public function getDefaultUserAgent() { return 'OpenCloud/' . Version::getVersion() . ' Guzzle/' . Version::getGuzzleVersion() - . ' cURL/' . Version::getCurlVersion() + . ' cURL/' . Version::getCurlVersion() . ' PHP/' . PHP_VERSION; }