From 1b2e675a15121520bdd67e8e4256e0f7eb0fe65d Mon Sep 17 00:00:00 2001 From: Dan Richelson Date: Fri, 22 Jul 2016 11:19:55 -0700 Subject: [PATCH 01/13] Update Guzzle, change http client cache --- composer.json | 8 +- composer.lock | 377 +++++++++----------- src/LaunchDarkly/GuzzleFeatureRequester.php | 15 +- src/LaunchDarkly/LDClient.php | 1 - 4 files changed, 184 insertions(+), 217 deletions(-) diff --git a/composer.json b/composer.json index 4f4d8af27..4c7336196 100644 --- a/composer.json +++ b/composer.json @@ -20,14 +20,14 @@ "phpunit/phpunit": "4.8.26", "phpdocumentor/phpdocumentor": "2.*", "predis/predis": "1.0.*", - "guzzlehttp/guzzle": "5.*", - "guzzlehttp/cache-subscriber": "0.1.*", + "guzzlehttp/guzzle": "6.2.1", + "kevinrob/guzzle-cache-middleware": "1.4.1", "zendframework/zend-serializer": "2.7.*" }, "suggested": { "predis/predis": "1.0.*", - "guzzlehttp/guzzle": "5.*", - "guzzlehttp/cache-subscriber": "0.1.*" + "guzzlehttp/guzzle": "6.2.1", + "kevinrob/guzzle-cache-middleware": "1.4.1" }, "autoload": { "psr-4": { diff --git a/composer.lock b/composer.lock index e0b727b02..6c8573a58 100644 --- a/composer.lock +++ b/composer.lock @@ -4,8 +4,8 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "0871703de19487d877517617eb99d4bd", - "content-hash": "b83833be7e74086c2399be31c969a806", + "hash": "debb1b5eecfb098fb376ae687fbfc780", + "content-hash": "8864ddd9f30426e5308dbd6fc2c94f1c", "packages": [], "packages-dev": [ { @@ -221,76 +221,6 @@ ], "time": "2015-08-31 12:32:49" }, - { - "name": "doctrine/cache", - "version": "v1.6.0", - "source": { - "type": "git", - "url": "https://github.com/doctrine/cache.git", - "reference": "f8af318d14bdb0eff0336795b428b547bd39ccb6" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/cache/zipball/f8af318d14bdb0eff0336795b428b547bd39ccb6", - "reference": "f8af318d14bdb0eff0336795b428b547bd39ccb6", - "shasum": "" - }, - "require": { - "php": "~5.5|~7.0" - }, - "conflict": { - "doctrine/common": ">2.2,<2.4" - }, - "require-dev": { - "phpunit/phpunit": "~4.8|~5.0", - "predis/predis": "~1.0", - "satooshi/php-coveralls": "~0.6" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.6.x-dev" - } - }, - "autoload": { - "psr-4": { - "Doctrine\\Common\\Cache\\": "lib/Doctrine/Common/Cache" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de" - }, - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" - } - ], - "description": "Caching library offering an object-oriented API for many cache backends", - "homepage": "http://www.doctrine-project.org", - "keywords": [ - "cache", - "caching" - ], - "time": "2015-12-31 16:37:02" - }, { "name": "doctrine/instantiator", "version": "1.0.5", @@ -438,75 +368,24 @@ ], "time": "2015-10-04 16:44:32" }, - { - "name": "guzzlehttp/cache-subscriber", - "version": "0.1.0", - "source": { - "type": "git", - "url": "https://github.com/guzzle/cache-subscriber.git", - "reference": "ecb903f6e11b5ca9f2cdbc460e2e68deea9e8858" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/guzzle/cache-subscriber/zipball/ecb903f6e11b5ca9f2cdbc460e2e68deea9e8858", - "reference": "ecb903f6e11b5ca9f2cdbc460e2e68deea9e8858", - "shasum": "" - }, - "require": { - "doctrine/cache": "~1.3", - "guzzlehttp/guzzle": "~5.0", - "php": ">=5.4.0" - }, - "require-dev": { - "phpunit/phpunit": "~4.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "0.1-dev" - } - }, - "autoload": { - "psr-4": { - "GuzzleHttp\\Subscriber\\Cache\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - } - ], - "description": "Guzzle HTTP cache subscriber", - "homepage": "http://guzzlephp.org/", - "keywords": [ - "Guzzle", - "cache" - ], - "time": "2014-10-29 21:06:25" - }, { "name": "guzzlehttp/guzzle", - "version": "5.3.0", + "version": "6.2.1", "source": { "type": "git", "url": "https://github.com/guzzle/guzzle.git", - "reference": "f3c8c22471cb55475105c14769644a49c3262b93" + "reference": "3f808fba627f2c5b69e2501217bf31af349c1427" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/f3c8c22471cb55475105c14769644a49c3262b93", - "reference": "f3c8c22471cb55475105c14769644a49c3262b93", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/3f808fba627f2c5b69e2501217bf31af349c1427", + "reference": "3f808fba627f2c5b69e2501217bf31af349c1427", "shasum": "" }, "require": { - "guzzlehttp/ringphp": "^1.1", - "php": ">=5.4.0" + "guzzlehttp/promises": "^1.0", + "guzzlehttp/psr7": "^1.3.1", + "php": ">=5.5" }, "require-dev": { "ext-curl": "*", @@ -516,10 +395,13 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "5.0-dev" + "dev-master": "6.2-dev" } }, "autoload": { + "files": [ + "src/functions_include.php" + ], "psr-4": { "GuzzleHttp\\": "src/" } @@ -535,7 +417,7 @@ "homepage": "https://github.com/mtdowling" } ], - "description": "Guzzle is a PHP HTTP client library and framework for building RESTful web service clients", + "description": "Guzzle is a PHP HTTP client library", "homepage": "http://guzzlephp.org/", "keywords": [ "client", @@ -546,44 +428,41 @@ "rest", "web service" ], - "time": "2015-05-20 03:47:55" + "time": "2016-07-15 17:22:37" }, { - "name": "guzzlehttp/ringphp", - "version": "1.1.0", + "name": "guzzlehttp/promises", + "version": "1.2.0", "source": { "type": "git", - "url": "https://github.com/guzzle/RingPHP.git", - "reference": "dbbb91d7f6c191e5e405e900e3102ac7f261bc0b" + "url": "https://github.com/guzzle/promises.git", + "reference": "c10d860e2a9595f8883527fa0021c7da9e65f579" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/RingPHP/zipball/dbbb91d7f6c191e5e405e900e3102ac7f261bc0b", - "reference": "dbbb91d7f6c191e5e405e900e3102ac7f261bc0b", + "url": "https://api.github.com/repos/guzzle/promises/zipball/c10d860e2a9595f8883527fa0021c7da9e65f579", + "reference": "c10d860e2a9595f8883527fa0021c7da9e65f579", "shasum": "" }, "require": { - "guzzlehttp/streams": "~3.0", - "php": ">=5.4.0", - "react/promise": "~2.0" + "php": ">=5.5.0" }, "require-dev": { - "ext-curl": "*", "phpunit/phpunit": "~4.0" }, - "suggest": { - "ext-curl": "Guzzle will use specific adapters if cURL is present" - }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.1-dev" + "dev-master": "1.0-dev" } }, "autoload": { "psr-4": { - "GuzzleHttp\\Ring\\": "src/" - } + "GuzzleHttp\\Promise\\": "src/" + }, + "files": [ + "src/functions_include.php" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -596,25 +475,32 @@ "homepage": "https://github.com/mtdowling" } ], - "description": "Provides a simple API and specification that abstracts away the details of HTTP into a single PHP function.", - "time": "2015-05-20 03:37:09" + "description": "Guzzle promises library", + "keywords": [ + "promise" + ], + "time": "2016-05-18 16:56:05" }, { - "name": "guzzlehttp/streams", - "version": "3.0.0", + "name": "guzzlehttp/psr7", + "version": "1.3.1", "source": { "type": "git", - "url": "https://github.com/guzzle/streams.git", - "reference": "47aaa48e27dae43d39fc1cea0ccf0d84ac1a2ba5" + "url": "https://github.com/guzzle/psr7.git", + "reference": "5c6447c9df362e8f8093bda8f5d8873fe5c7f65b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/streams/zipball/47aaa48e27dae43d39fc1cea0ccf0d84ac1a2ba5", - "reference": "47aaa48e27dae43d39fc1cea0ccf0d84ac1a2ba5", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/5c6447c9df362e8f8093bda8f5d8873fe5c7f65b", + "reference": "5c6447c9df362e8f8093bda8f5d8873fe5c7f65b", "shasum": "" }, "require": { - "php": ">=5.4.0" + "php": ">=5.4.0", + "psr/http-message": "~1.0" + }, + "provide": { + "psr/http-message-implementation": "1.0" }, "require-dev": { "phpunit/phpunit": "~4.0" @@ -622,13 +508,16 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "1.4-dev" } }, "autoload": { "psr-4": { - "GuzzleHttp\\Stream\\": "src/" - } + "GuzzleHttp\\Psr7\\": "src/" + }, + "files": [ + "src/functions_include.php" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -641,13 +530,14 @@ "homepage": "https://github.com/mtdowling" } ], - "description": "Provides a simple abstraction over streams of data", - "homepage": "http://guzzlephp.org/", + "description": "PSR-7 message implementation", "keywords": [ - "Guzzle", - "stream" + "http", + "message", + "stream", + "uri" ], - "time": "2014-10-12 19:18:40" + "time": "2016-06-24 23:00:38" }, { "name": "herrera-io/json", @@ -992,6 +882,84 @@ ], "time": "2016-01-25 15:43:01" }, + { + "name": "kevinrob/guzzle-cache-middleware", + "version": "v1.4.1", + "source": { + "type": "git", + "url": "https://github.com/Kevinrob/guzzle-cache-middleware.git", + "reference": "f30ded404c296d50820670489d718a04634b6789" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Kevinrob/guzzle-cache-middleware/zipball/f30ded404c296d50820670489d718a04634b6789", + "reference": "f30ded404c296d50820670489d718a04634b6789", + "shasum": "" + }, + "require": { + "php": ">=5.5.0" + }, + "require-dev": { + "cache/array-adapter": "^0.4", + "doctrine/cache": "^1.0", + "guzzlehttp/guzzle": "^6.0", + "illuminate/cache": "^5.0", + "league/flysystem": "^1.0", + "phpunit/phpunit": "^4.0 || ^5.0", + "psr/cache": "^1.0" + }, + "suggest": { + "doctrine/cache": "This library have a lot of ready-to-use cache storage (to be use with Kevinrob\\GuzzleCache\\Storage\\DoctrineCacheStorage)", + "guzzlehttp/guzzle": "For using this library. It was created for Guzzle6. (but you can use it with any PSR-7 HTTP Client)", + "laravel/framework": "To be use with Kevinrob\\GuzzleCache\\Storage\\LaravelCacheStorage", + "league/flysystem": "To be use with Kevinrob\\GuzzleCache\\Storage\\FlysystemStorage", + "psr/cache": "To be use with Kevinrob\\GuzzleCache\\Storage\\Psr6CacheStorage" + }, + "type": "library", + "autoload": { + "psr-4": { + "Kevinrob\\GuzzleCache\\": [ + "src/", + "tests/" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Kevin Robatel", + "email": "kevinrob2@gmail.com", + "homepage": "https://github.com/Kevinrob" + } + ], + "description": "A HTTP/1.1 Cache for Guzzle 6. It's a simple Middleware to be added in the HandlerStack. (RFC 7234)", + "homepage": "https://github.com/Kevinrob/guzzle-cache-middleware", + "keywords": [ + "Etag", + "Flysystem", + "Guzzle", + "cache", + "cache-control", + "doctrine", + "expiration", + "guzzle6", + "handler", + "http", + "http 1.1", + "middleware", + "performance", + "php", + "promise", + "psr6", + "psr7", + "rfc7234", + "validation" + ], + "time": "2016-06-17 08:34:36" + }, { "name": "kherge/version", "version": "1.0.1", @@ -2063,23 +2031,31 @@ "time": "2016-05-30 15:25:52" }, { - "name": "psr/log", - "version": "1.0.0", + "name": "psr/http-message", + "version": "1.0", "source": { "type": "git", - "url": "https://github.com/php-fig/log.git", - "reference": "fe0936ee26643249e916849d48e3a51d5f5e278b" + "url": "https://github.com/php-fig/http-message.git", + "reference": "85d63699f0dbedb190bbd4b0d2b9dc707ea4c298" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/fe0936ee26643249e916849d48e3a51d5f5e278b", - "reference": "fe0936ee26643249e916849d48e3a51d5f5e278b", + "url": "https://api.github.com/repos/php-fig/http-message/zipball/85d63699f0dbedb190bbd4b0d2b9dc707ea4c298", + "reference": "85d63699f0dbedb190bbd4b0d2b9dc707ea4c298", "shasum": "" }, + "require": { + "php": ">=5.3.0" + }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, "autoload": { - "psr-0": { - "Psr\\Log\\": "" + "psr-4": { + "Psr\\Http\\Message\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -2092,44 +2068,36 @@ "homepage": "http://www.php-fig.org/" } ], - "description": "Common interface for logging libraries", + "description": "Common interface for HTTP messages", "keywords": [ - "log", + "http", + "http-message", "psr", - "psr-3" + "psr-7", + "request", + "response" ], - "time": "2012-12-21 11:40:51" + "time": "2015-05-04 20:22:00" }, { - "name": "react/promise", - "version": "v2.4.1", + "name": "psr/log", + "version": "1.0.0", "source": { "type": "git", - "url": "https://github.com/reactphp/promise.git", - "reference": "8025426794f1944de806618671d4fa476dc7626f" + "url": "https://github.com/php-fig/log.git", + "reference": "fe0936ee26643249e916849d48e3a51d5f5e278b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/reactphp/promise/zipball/8025426794f1944de806618671d4fa476dc7626f", - "reference": "8025426794f1944de806618671d4fa476dc7626f", + "url": "https://api.github.com/repos/php-fig/log/zipball/fe0936ee26643249e916849d48e3a51d5f5e278b", + "reference": "fe0936ee26643249e916849d48e3a51d5f5e278b", "shasum": "" }, - "require": { - "php": ">=5.4.0" - }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, "autoload": { - "psr-4": { - "React\\Promise\\": "src/" - }, - "files": [ - "src/functions_include.php" - ] + "psr-0": { + "Psr\\Log\\": "" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -2137,12 +2105,17 @@ ], "authors": [ { - "name": "Jan Sorgalla", - "email": "jsorgalla@gmail.com" + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" } ], - "description": "A lightweight implementation of CommonJS Promises/A for PHP", - "time": "2016-05-03 17:50:52" + "description": "Common interface for logging libraries", + "keywords": [ + "log", + "psr", + "psr-3" + ], + "time": "2012-12-21 11:40:51" }, { "name": "sebastian/comparator", diff --git a/src/LaunchDarkly/GuzzleFeatureRequester.php b/src/LaunchDarkly/GuzzleFeatureRequester.php index b8a144afe..de605e4b2 100644 --- a/src/LaunchDarkly/GuzzleFeatureRequester.php +++ b/src/LaunchDarkly/GuzzleFeatureRequester.php @@ -3,15 +3,19 @@ use GuzzleHttp\Client; use \GuzzleHttp\Exception\BadResponseException; -use \GuzzleHttp\Subscriber\Cache\CacheSubscriber; +use GuzzleHttp\HandlerStack; +use Kevinrob\GuzzleCache\CacheMiddleware; class GuzzleFeatureRequester implements FeatureRequester { private $_client; function __construct($baseUri, $apiKey, $options) { + $stack = HandlerStack::create(); + $stack->push(new CacheMiddleware(), 'cache'); $this->_client = new Client(array( 'base_url' => $baseUri, + 'handler' => $stack, 'defaults' => array( 'headers' => array( 'Authorization' => "api_key {$apiKey}", @@ -23,15 +27,6 @@ function __construct($baseUri, $apiKey, $options) { 'connect_timeout' => $options['connect_timeout'] ) )); - - if (!isset($options['cache_storage'])) { - $csOptions = array('validate' => false); - } - else { - $csOptions = array('storage' => $options['cache_storage'], 'validate' => false); - } - - CacheSubscriber::attach($this->_client, $csOptions); } diff --git a/src/LaunchDarkly/LDClient.php b/src/LaunchDarkly/LDClient.php index d93491361..c03c6bae9 100644 --- a/src/LaunchDarkly/LDClient.php +++ b/src/LaunchDarkly/LDClient.php @@ -29,7 +29,6 @@ class LDClient { * - base_uri: Base URI of the LaunchDarkly API. Defaults to `DEFAULT_BASE_URI` * - timeout: Float describing the maximum length of a request in seconds. Defaults to 3 * - connect_timeout: Float describing the number of seconds to wait while trying to connect to a server. Defaults to 3 - * - cache_storage: An optional GuzzleHttp\Subscriber\Cache\CacheStorageInterface. Defaults to an in-memory cache. */ public function __construct($apiKey, $options = array()) { $this->_apiKey = $apiKey; From c967b316300a5c4ec45a7414d138b65c20a8d19c Mon Sep 17 00:00:00 2001 From: Dan Richelson Date: Fri, 22 Jul 2016 12:19:42 -0700 Subject: [PATCH 02/13] wip --- composer.json | 1 + composer.lock | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 4c7336196..9a983bc51 100644 --- a/composer.json +++ b/composer.json @@ -1,5 +1,6 @@ { "name": "launchdarkly/launchdarkly-php", + "version": "dev", "description": "Official LaunchDarkly SDK for PHP", "keywords": [ "launchdarkly", diff --git a/composer.lock b/composer.lock index 6c8573a58..7f22d0d12 100644 --- a/composer.lock +++ b/composer.lock @@ -4,8 +4,8 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "debb1b5eecfb098fb376ae687fbfc780", - "content-hash": "8864ddd9f30426e5308dbd6fc2c94f1c", + "hash": "cdc57b7146b3596bffddfbf0158834bf", + "content-hash": "a4a7f410e26085652dfeed1aba37bf45", "packages": [], "packages-dev": [ { From 4ad38ed01585f9a5ff164332a6f1d1785ee101d7 Mon Sep 17 00:00:00 2001 From: Dan Richelson Date: Sat, 23 Jul 2016 10:43:31 -0700 Subject: [PATCH 03/13] FeatureRequester works with Guzzle 6, but no caching yet --- src/LaunchDarkly/GuzzleFeatureRequester.php | 55 ++++++++++++--------- 1 file changed, 32 insertions(+), 23 deletions(-) diff --git a/src/LaunchDarkly/GuzzleFeatureRequester.php b/src/LaunchDarkly/GuzzleFeatureRequester.php index de605e4b2..9907b003b 100644 --- a/src/LaunchDarkly/GuzzleFeatureRequester.php +++ b/src/LaunchDarkly/GuzzleFeatureRequester.php @@ -1,32 +1,36 @@ push(new CacheMiddleware(), 'cache'); - $this->_client = new Client(array( - 'base_url' => $baseUri, - 'handler' => $stack, - 'defaults' => array( - 'headers' => array( - 'Authorization' => "api_key {$apiKey}", - 'Content-Type' => 'application/json', - 'User-Agent' => 'PHPClient/' . LDClient::VERSION - ), - 'debug' => false, - 'timeout' => $options['timeout'], - 'connect_timeout' => $options['connect_timeout'] - ) - )); + function __construct($baseUri, $apiKey, $options) + { + $this->_baseUri = $baseUri; + error_log("uri: $baseUri"); +// $stack = HandlerStack::create(); +// $stack->push(new CacheMiddleware(), 'cache'); + + $this->_defaults = array( + 'headers' => array( + 'Authorization' => "api_key {$apiKey}", + 'Content-Type' => 'application/json', + 'User-Agent' => 'PHPClient/' . LDClient::VERSION + ), + 'timeout' => $options['timeout'], + 'connect_timeout' => $options['connect_timeout'] + ); + + $this->_client = new Client(); } @@ -36,10 +40,15 @@ function __construct($baseUri, $apiKey, $options) { * @param $key string feature key * @return array|null The decoded JSON feature data, or null if missing */ - public function get($key) { + public function get($key) + { try { - $response = $this->_client->get("/api/eval/features/$key"); - return $response->json(); + $uri = $this->_baseUri . "/api/eval/features/$key"; + error_log($uri); + $response = $this->_client->get($uri, $this->_defaults); + $body = $response->getBody(); + error_log($body); + return json_decode($body, true); } catch (BadResponseException $e) { $code = $e->getResponse()->getStatusCode(); error_log("GuzzleFeatureRetriever::get received an unexpected HTTP status code $code"); From 1f3576010f3853f1fefd6e695032554b624294c6 Mon Sep 17 00:00:00 2001 From: Dan Richelson Date: Sat, 23 Jul 2016 11:38:25 -0700 Subject: [PATCH 04/13] [wip] add cache --- src/LaunchDarkly/GuzzleFeatureRequester.php | 8 +++----- src/LaunchDarkly/LDClient.php | 1 + 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/LaunchDarkly/GuzzleFeatureRequester.php b/src/LaunchDarkly/GuzzleFeatureRequester.php index 9907b003b..e412db11f 100644 --- a/src/LaunchDarkly/GuzzleFeatureRequester.php +++ b/src/LaunchDarkly/GuzzleFeatureRequester.php @@ -8,7 +8,6 @@ class GuzzleFeatureRequester implements FeatureRequester { - private $_client; private $_baseUri; private $_defaults; @@ -17,8 +16,8 @@ function __construct($baseUri, $apiKey, $options) { $this->_baseUri = $baseUri; error_log("uri: $baseUri"); -// $stack = HandlerStack::create(); -// $stack->push(new CacheMiddleware(), 'cache'); + $stack = HandlerStack::create(); + $stack->push(new CacheMiddleware(isset($options['cache_strategy']) ? $options['cache_strategy'] : null, 'cache')); $this->_defaults = array( 'headers' => array( @@ -30,7 +29,7 @@ function __construct($baseUri, $apiKey, $options) 'connect_timeout' => $options['connect_timeout'] ); - $this->_client = new Client(); + $this->_client = new Client(['handler' => $stack, 'debug' => true]); } @@ -44,7 +43,6 @@ public function get($key) { try { $uri = $this->_baseUri . "/api/eval/features/$key"; - error_log($uri); $response = $this->_client->get($uri, $this->_defaults); $body = $response->getBody(); error_log($body); diff --git a/src/LaunchDarkly/LDClient.php b/src/LaunchDarkly/LDClient.php index c03c6bae9..45a772292 100644 --- a/src/LaunchDarkly/LDClient.php +++ b/src/LaunchDarkly/LDClient.php @@ -29,6 +29,7 @@ class LDClient { * - base_uri: Base URI of the LaunchDarkly API. Defaults to `DEFAULT_BASE_URI` * - timeout: Float describing the maximum length of a request in seconds. Defaults to 3 * - connect_timeout: Float describing the number of seconds to wait while trying to connect to a server. Defaults to 3 + * - cache_strategy: An optional Kevinrob\GuzzleCache\Strategy\CacheStrategyInterface. Defaults to an in-memory cache. */ public function __construct($apiKey, $options = array()) { $this->_apiKey = $apiKey; From 826a5fac2bc8fe3dcb05ee5279b2bb85f9d734af Mon Sep 17 00:00:00 2001 From: Dan Richelson Date: Sat, 23 Jul 2016 12:19:26 -0700 Subject: [PATCH 05/13] New http client caching works. --- src/LaunchDarkly/GuzzleFeatureRequester.php | 13 ++++++------- src/LaunchDarkly/LDClient.php | 2 +- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/LaunchDarkly/GuzzleFeatureRequester.php b/src/LaunchDarkly/GuzzleFeatureRequester.php index e412db11f..a53385e67 100644 --- a/src/LaunchDarkly/GuzzleFeatureRequester.php +++ b/src/LaunchDarkly/GuzzleFeatureRequester.php @@ -1,10 +1,11 @@ _baseUri = $baseUri; error_log("uri: $baseUri"); $stack = HandlerStack::create(); - $stack->push(new CacheMiddleware(isset($options['cache_strategy']) ? $options['cache_strategy'] : null, 'cache')); + $stack->push(new CacheMiddleware(new PublicCacheStrategy(isset($options['cache']) ? $options['cache'] : null), 'cache')); $this->_defaults = array( 'headers' => array( @@ -28,8 +29,7 @@ function __construct($baseUri, $apiKey, $options) 'timeout' => $options['timeout'], 'connect_timeout' => $options['connect_timeout'] ); - - $this->_client = new Client(['handler' => $stack, 'debug' => true]); + $this->_client = new Client(['handler' => $stack, 'debug' => false]); } @@ -45,7 +45,6 @@ public function get($key) $uri = $this->_baseUri . "/api/eval/features/$key"; $response = $this->_client->get($uri, $this->_defaults); $body = $response->getBody(); - error_log($body); return json_decode($body, true); } catch (BadResponseException $e) { $code = $e->getResponse()->getStatusCode(); diff --git a/src/LaunchDarkly/LDClient.php b/src/LaunchDarkly/LDClient.php index 45a772292..0ae568258 100644 --- a/src/LaunchDarkly/LDClient.php +++ b/src/LaunchDarkly/LDClient.php @@ -29,7 +29,7 @@ class LDClient { * - base_uri: Base URI of the LaunchDarkly API. Defaults to `DEFAULT_BASE_URI` * - timeout: Float describing the maximum length of a request in seconds. Defaults to 3 * - connect_timeout: Float describing the number of seconds to wait while trying to connect to a server. Defaults to 3 - * - cache_strategy: An optional Kevinrob\GuzzleCache\Strategy\CacheStrategyInterface. Defaults to an in-memory cache. + * - cache: An optional Kevinrob\GuzzleCache\Strategy\CacheStorageInterface. Defaults to an in-memory cache. */ public function __construct($apiKey, $options = array()) { $this->_apiKey = $apiKey; From a15a47d658495c52f6cf0bf9dc9f0faa2730d091 Mon Sep 17 00:00:00 2001 From: Dan Richelson Date: Sat, 23 Jul 2016 12:21:23 -0700 Subject: [PATCH 06/13] remove dev version --- composer.json | 1 - 1 file changed, 1 deletion(-) diff --git a/composer.json b/composer.json index 9a983bc51..4c7336196 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,5 @@ { "name": "launchdarkly/launchdarkly-php", - "version": "dev", "description": "Official LaunchDarkly SDK for PHP", "keywords": [ "launchdarkly", From 8912139b8fa7ab0dafa6f44144eb46ffb605ab20 Mon Sep 17 00:00:00 2001 From: Dan Richelson Date: Sat, 23 Jul 2016 12:39:29 -0700 Subject: [PATCH 07/13] Update version --- src/LaunchDarkly/LDClient.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/LaunchDarkly/LDClient.php b/src/LaunchDarkly/LDClient.php index 0ae568258..6b38f25f6 100644 --- a/src/LaunchDarkly/LDClient.php +++ b/src/LaunchDarkly/LDClient.php @@ -8,7 +8,7 @@ */ class LDClient { const DEFAULT_BASE_URI = 'https://app.launchdarkly.com'; - const VERSION = '0.7.0'; + const VERSION = '1.0.0'; protected $_apiKey; protected $_baseUri; From 10a60c83c47a0d88bf745da7fe6a476ebc345931 Mon Sep 17 00:00:00 2001 From: Dan Richelson Date: Sat, 23 Jul 2016 12:40:30 -0700 Subject: [PATCH 08/13] Update version in other place --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index bcaffe19b..afaf360d3 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.7.0 \ No newline at end of file +1.0.0 \ No newline at end of file From 428e36c6e82369ca0531fba5be9c2c17721ac1e8 Mon Sep 17 00:00:00 2001 From: Dan Richelson Date: Sat, 23 Jul 2016 13:27:48 -0700 Subject: [PATCH 09/13] maybe a no-op. --- composer.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.lock b/composer.lock index 7f22d0d12..6c8573a58 100644 --- a/composer.lock +++ b/composer.lock @@ -4,8 +4,8 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "cdc57b7146b3596bffddfbf0158834bf", - "content-hash": "a4a7f410e26085652dfeed1aba37bf45", + "hash": "debb1b5eecfb098fb376ae687fbfc780", + "content-hash": "8864ddd9f30426e5308dbd6fc2c94f1c", "packages": [], "packages-dev": [ { From 1f34437cb099461bacc57020f14ab441a329757d Mon Sep 17 00:00:00 2001 From: Dan Richelson Date: Sat, 23 Jul 2016 13:30:36 -0700 Subject: [PATCH 10/13] make guzzle required --- composer.json | 10 +- composer.lock | 709 +++++++++++++++++++++++++------------------------- 2 files changed, 359 insertions(+), 360 deletions(-) diff --git a/composer.json b/composer.json index 4c7336196..074b0844d 100644 --- a/composer.json +++ b/composer.json @@ -14,20 +14,18 @@ } ], "require": { - "php": ">=5.5" + "php": ">=5.5", + "guzzlehttp/guzzle": "6.2.1", + "kevinrob/guzzle-cache-middleware": "1.4.1" }, "require-dev": { "phpunit/phpunit": "4.8.26", "phpdocumentor/phpdocumentor": "2.*", "predis/predis": "1.0.*", - "guzzlehttp/guzzle": "6.2.1", - "kevinrob/guzzle-cache-middleware": "1.4.1", "zendframework/zend-serializer": "2.7.*" }, "suggested": { - "predis/predis": "1.0.*", - "guzzlehttp/guzzle": "6.2.1", - "kevinrob/guzzle-cache-middleware": "1.4.1" + "predis/predis": "1.0.*" }, "autoload": { "psr-4": { diff --git a/composer.lock b/composer.lock index 6c8573a58..5d5a59033 100644 --- a/composer.lock +++ b/composer.lock @@ -4,9 +4,308 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "debb1b5eecfb098fb376ae687fbfc780", - "content-hash": "8864ddd9f30426e5308dbd6fc2c94f1c", - "packages": [], + "hash": "5eedb482e4771e6654320cd7e4eeba75", + "content-hash": "a86b9bdc4496a0675fcc918a7f92b585", + "packages": [ + { + "name": "guzzlehttp/guzzle", + "version": "6.2.1", + "source": { + "type": "git", + "url": "https://github.com/guzzle/guzzle.git", + "reference": "3f808fba627f2c5b69e2501217bf31af349c1427" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/3f808fba627f2c5b69e2501217bf31af349c1427", + "reference": "3f808fba627f2c5b69e2501217bf31af349c1427", + "shasum": "" + }, + "require": { + "guzzlehttp/promises": "^1.0", + "guzzlehttp/psr7": "^1.3.1", + "php": ">=5.5" + }, + "require-dev": { + "ext-curl": "*", + "phpunit/phpunit": "^4.0", + "psr/log": "^1.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "6.2-dev" + } + }, + "autoload": { + "files": [ + "src/functions_include.php" + ], + "psr-4": { + "GuzzleHttp\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + } + ], + "description": "Guzzle is a PHP HTTP client library", + "homepage": "http://guzzlephp.org/", + "keywords": [ + "client", + "curl", + "framework", + "http", + "http client", + "rest", + "web service" + ], + "time": "2016-07-15 17:22:37" + }, + { + "name": "guzzlehttp/promises", + "version": "1.2.0", + "source": { + "type": "git", + "url": "https://github.com/guzzle/promises.git", + "reference": "c10d860e2a9595f8883527fa0021c7da9e65f579" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/promises/zipball/c10d860e2a9595f8883527fa0021c7da9e65f579", + "reference": "c10d860e2a9595f8883527fa0021c7da9e65f579", + "shasum": "" + }, + "require": { + "php": ">=5.5.0" + }, + "require-dev": { + "phpunit/phpunit": "~4.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "psr-4": { + "GuzzleHttp\\Promise\\": "src/" + }, + "files": [ + "src/functions_include.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + } + ], + "description": "Guzzle promises library", + "keywords": [ + "promise" + ], + "time": "2016-05-18 16:56:05" + }, + { + "name": "guzzlehttp/psr7", + "version": "1.3.1", + "source": { + "type": "git", + "url": "https://github.com/guzzle/psr7.git", + "reference": "5c6447c9df362e8f8093bda8f5d8873fe5c7f65b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/5c6447c9df362e8f8093bda8f5d8873fe5c7f65b", + "reference": "5c6447c9df362e8f8093bda8f5d8873fe5c7f65b", + "shasum": "" + }, + "require": { + "php": ">=5.4.0", + "psr/http-message": "~1.0" + }, + "provide": { + "psr/http-message-implementation": "1.0" + }, + "require-dev": { + "phpunit/phpunit": "~4.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4-dev" + } + }, + "autoload": { + "psr-4": { + "GuzzleHttp\\Psr7\\": "src/" + }, + "files": [ + "src/functions_include.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + } + ], + "description": "PSR-7 message implementation", + "keywords": [ + "http", + "message", + "stream", + "uri" + ], + "time": "2016-06-24 23:00:38" + }, + { + "name": "kevinrob/guzzle-cache-middleware", + "version": "v1.4.1", + "source": { + "type": "git", + "url": "https://github.com/Kevinrob/guzzle-cache-middleware.git", + "reference": "f30ded404c296d50820670489d718a04634b6789" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Kevinrob/guzzle-cache-middleware/zipball/f30ded404c296d50820670489d718a04634b6789", + "reference": "f30ded404c296d50820670489d718a04634b6789", + "shasum": "" + }, + "require": { + "php": ">=5.5.0" + }, + "require-dev": { + "cache/array-adapter": "^0.4", + "doctrine/cache": "^1.0", + "guzzlehttp/guzzle": "^6.0", + "illuminate/cache": "^5.0", + "league/flysystem": "^1.0", + "phpunit/phpunit": "^4.0 || ^5.0", + "psr/cache": "^1.0" + }, + "suggest": { + "doctrine/cache": "This library have a lot of ready-to-use cache storage (to be use with Kevinrob\\GuzzleCache\\Storage\\DoctrineCacheStorage)", + "guzzlehttp/guzzle": "For using this library. It was created for Guzzle6. (but you can use it with any PSR-7 HTTP Client)", + "laravel/framework": "To be use with Kevinrob\\GuzzleCache\\Storage\\LaravelCacheStorage", + "league/flysystem": "To be use with Kevinrob\\GuzzleCache\\Storage\\FlysystemStorage", + "psr/cache": "To be use with Kevinrob\\GuzzleCache\\Storage\\Psr6CacheStorage" + }, + "type": "library", + "autoload": { + "psr-4": { + "Kevinrob\\GuzzleCache\\": [ + "src/", + "tests/" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Kevin Robatel", + "email": "kevinrob2@gmail.com", + "homepage": "https://github.com/Kevinrob" + } + ], + "description": "A HTTP/1.1 Cache for Guzzle 6. It's a simple Middleware to be added in the HandlerStack. (RFC 7234)", + "homepage": "https://github.com/Kevinrob/guzzle-cache-middleware", + "keywords": [ + "Etag", + "Flysystem", + "Guzzle", + "cache", + "cache-control", + "doctrine", + "expiration", + "guzzle6", + "handler", + "http", + "http 1.1", + "middleware", + "performance", + "php", + "promise", + "psr6", + "psr7", + "rfc7234", + "validation" + ], + "time": "2016-06-17 08:34:36" + }, + { + "name": "psr/http-message", + "version": "1.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-message.git", + "reference": "85d63699f0dbedb190bbd4b0d2b9dc707ea4c298" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-message/zipball/85d63699f0dbedb190bbd4b0d2b9dc707ea4c298", + "reference": "85d63699f0dbedb190bbd4b0d2b9dc707ea4c298", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Message\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for HTTP messages", + "keywords": [ + "http", + "http-message", + "psr", + "psr-7", + "request", + "response" + ], + "time": "2015-05-04 20:22:00" + } + ], "packages-dev": [ { "name": "cilex/cilex", @@ -248,162 +547,12 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com", - "homepage": "http://ocramius.github.com/" - } - ], - "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", - "homepage": "https://github.com/doctrine/instantiator", - "keywords": [ - "constructor", - "instantiate" - ], - "time": "2015-06-14 21:17:01" - }, - { - "name": "doctrine/lexer", - "version": "v1.0.1", - "source": { - "type": "git", - "url": "https://github.com/doctrine/lexer.git", - "reference": "83893c552fd2045dd78aef794c31e694c37c0b8c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/lexer/zipball/83893c552fd2045dd78aef794c31e694c37c0b8c", - "reference": "83893c552fd2045dd78aef794c31e694c37c0b8c", - "shasum": "" - }, - "require": { - "php": ">=5.3.2" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-0": { - "Doctrine\\Common\\Lexer\\": "lib/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" - } - ], - "description": "Base library for a lexer that can be used in Top-Down, Recursive Descent Parsers.", - "homepage": "http://www.doctrine-project.org", - "keywords": [ - "lexer", - "parser" - ], - "time": "2014-09-09 13:34:57" - }, - { - "name": "erusev/parsedown", - "version": "1.6.0", - "source": { - "type": "git", - "url": "https://github.com/erusev/parsedown.git", - "reference": "3ebbd730b5c2cf5ce78bc1bf64071407fc6674b7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/erusev/parsedown/zipball/3ebbd730b5c2cf5ce78bc1bf64071407fc6674b7", - "reference": "3ebbd730b5c2cf5ce78bc1bf64071407fc6674b7", - "shasum": "" - }, - "type": "library", - "autoload": { - "psr-0": { - "Parsedown": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Emanuil Rusev", - "email": "hello@erusev.com", - "homepage": "http://erusev.com" - } - ], - "description": "Parser for Markdown.", - "homepage": "http://parsedown.org", - "keywords": [ - "markdown", - "parser" - ], - "time": "2015-10-04 16:44:32" - }, - { - "name": "guzzlehttp/guzzle", - "version": "6.2.1", - "source": { - "type": "git", - "url": "https://github.com/guzzle/guzzle.git", - "reference": "3f808fba627f2c5b69e2501217bf31af349c1427" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/3f808fba627f2c5b69e2501217bf31af349c1427", - "reference": "3f808fba627f2c5b69e2501217bf31af349c1427", - "shasum": "" - }, - "require": { - "guzzlehttp/promises": "^1.0", - "guzzlehttp/psr7": "^1.3.1", - "php": ">=5.5" - }, - "require-dev": { - "ext-curl": "*", - "phpunit/phpunit": "^4.0", - "psr/log": "^1.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "6.2-dev" + "dev-master": "1.0.x-dev" } }, "autoload": { - "files": [ - "src/functions_include.php" - ], "psr-4": { - "GuzzleHttp\\": "src/" + "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" } }, "notification-url": "https://packagist.org/downloads/", @@ -412,57 +561,46 @@ ], "authors": [ { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" + "name": "Marco Pivetta", + "email": "ocramius@gmail.com", + "homepage": "http://ocramius.github.com/" } ], - "description": "Guzzle is a PHP HTTP client library", - "homepage": "http://guzzlephp.org/", + "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", + "homepage": "https://github.com/doctrine/instantiator", "keywords": [ - "client", - "curl", - "framework", - "http", - "http client", - "rest", - "web service" + "constructor", + "instantiate" ], - "time": "2016-07-15 17:22:37" + "time": "2015-06-14 21:17:01" }, { - "name": "guzzlehttp/promises", - "version": "1.2.0", + "name": "doctrine/lexer", + "version": "v1.0.1", "source": { "type": "git", - "url": "https://github.com/guzzle/promises.git", - "reference": "c10d860e2a9595f8883527fa0021c7da9e65f579" + "url": "https://github.com/doctrine/lexer.git", + "reference": "83893c552fd2045dd78aef794c31e694c37c0b8c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/promises/zipball/c10d860e2a9595f8883527fa0021c7da9e65f579", - "reference": "c10d860e2a9595f8883527fa0021c7da9e65f579", + "url": "https://api.github.com/repos/doctrine/lexer/zipball/83893c552fd2045dd78aef794c31e694c37c0b8c", + "reference": "83893c552fd2045dd78aef794c31e694c37c0b8c", "shasum": "" }, "require": { - "php": ">=5.5.0" - }, - "require-dev": { - "phpunit/phpunit": "~4.0" + "php": ">=5.3.2" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0-dev" + "dev-master": "1.0.x-dev" } }, "autoload": { - "psr-4": { - "GuzzleHttp\\Promise\\": "src/" - }, - "files": [ - "src/functions_include.php" - ] + "psr-0": { + "Doctrine\\Common\\Lexer\\": "lib/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -470,54 +608,45 @@ ], "authors": [ { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" } ], - "description": "Guzzle promises library", + "description": "Base library for a lexer that can be used in Top-Down, Recursive Descent Parsers.", + "homepage": "http://www.doctrine-project.org", "keywords": [ - "promise" + "lexer", + "parser" ], - "time": "2016-05-18 16:56:05" + "time": "2014-09-09 13:34:57" }, { - "name": "guzzlehttp/psr7", - "version": "1.3.1", + "name": "erusev/parsedown", + "version": "1.6.0", "source": { "type": "git", - "url": "https://github.com/guzzle/psr7.git", - "reference": "5c6447c9df362e8f8093bda8f5d8873fe5c7f65b" + "url": "https://github.com/erusev/parsedown.git", + "reference": "3ebbd730b5c2cf5ce78bc1bf64071407fc6674b7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/5c6447c9df362e8f8093bda8f5d8873fe5c7f65b", - "reference": "5c6447c9df362e8f8093bda8f5d8873fe5c7f65b", + "url": "https://api.github.com/repos/erusev/parsedown/zipball/3ebbd730b5c2cf5ce78bc1bf64071407fc6674b7", + "reference": "3ebbd730b5c2cf5ce78bc1bf64071407fc6674b7", "shasum": "" }, - "require": { - "php": ">=5.4.0", - "psr/http-message": "~1.0" - }, - "provide": { - "psr/http-message-implementation": "1.0" - }, - "require-dev": { - "phpunit/phpunit": "~4.0" - }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.4-dev" - } - }, "autoload": { - "psr-4": { - "GuzzleHttp\\Psr7\\": "src/" - }, - "files": [ - "src/functions_include.php" - ] + "psr-0": { + "Parsedown": "" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -525,19 +654,18 @@ ], "authors": [ { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" + "name": "Emanuil Rusev", + "email": "hello@erusev.com", + "homepage": "http://erusev.com" } ], - "description": "PSR-7 message implementation", + "description": "Parser for Markdown.", + "homepage": "http://parsedown.org", "keywords": [ - "http", - "message", - "stream", - "uri" + "markdown", + "parser" ], - "time": "2016-06-24 23:00:38" + "time": "2015-10-04 16:44:32" }, { "name": "herrera-io/json", @@ -882,84 +1010,6 @@ ], "time": "2016-01-25 15:43:01" }, - { - "name": "kevinrob/guzzle-cache-middleware", - "version": "v1.4.1", - "source": { - "type": "git", - "url": "https://github.com/Kevinrob/guzzle-cache-middleware.git", - "reference": "f30ded404c296d50820670489d718a04634b6789" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Kevinrob/guzzle-cache-middleware/zipball/f30ded404c296d50820670489d718a04634b6789", - "reference": "f30ded404c296d50820670489d718a04634b6789", - "shasum": "" - }, - "require": { - "php": ">=5.5.0" - }, - "require-dev": { - "cache/array-adapter": "^0.4", - "doctrine/cache": "^1.0", - "guzzlehttp/guzzle": "^6.0", - "illuminate/cache": "^5.0", - "league/flysystem": "^1.0", - "phpunit/phpunit": "^4.0 || ^5.0", - "psr/cache": "^1.0" - }, - "suggest": { - "doctrine/cache": "This library have a lot of ready-to-use cache storage (to be use with Kevinrob\\GuzzleCache\\Storage\\DoctrineCacheStorage)", - "guzzlehttp/guzzle": "For using this library. It was created for Guzzle6. (but you can use it with any PSR-7 HTTP Client)", - "laravel/framework": "To be use with Kevinrob\\GuzzleCache\\Storage\\LaravelCacheStorage", - "league/flysystem": "To be use with Kevinrob\\GuzzleCache\\Storage\\FlysystemStorage", - "psr/cache": "To be use with Kevinrob\\GuzzleCache\\Storage\\Psr6CacheStorage" - }, - "type": "library", - "autoload": { - "psr-4": { - "Kevinrob\\GuzzleCache\\": [ - "src/", - "tests/" - ] - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Kevin Robatel", - "email": "kevinrob2@gmail.com", - "homepage": "https://github.com/Kevinrob" - } - ], - "description": "A HTTP/1.1 Cache for Guzzle 6. It's a simple Middleware to be added in the HandlerStack. (RFC 7234)", - "homepage": "https://github.com/Kevinrob/guzzle-cache-middleware", - "keywords": [ - "Etag", - "Flysystem", - "Guzzle", - "cache", - "cache-control", - "doctrine", - "expiration", - "guzzle6", - "handler", - "http", - "http 1.1", - "middleware", - "performance", - "php", - "promise", - "psr6", - "psr7", - "rfc7234", - "validation" - ], - "time": "2016-06-17 08:34:36" - }, { "name": "kherge/version", "version": "1.0.1", @@ -2030,55 +2080,6 @@ ], "time": "2016-05-30 15:25:52" }, - { - "name": "psr/http-message", - "version": "1.0", - "source": { - "type": "git", - "url": "https://github.com/php-fig/http-message.git", - "reference": "85d63699f0dbedb190bbd4b0d2b9dc707ea4c298" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-message/zipball/85d63699f0dbedb190bbd4b0d2b9dc707ea4c298", - "reference": "85d63699f0dbedb190bbd4b0d2b9dc707ea4c298", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Http\\Message\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Common interface for HTTP messages", - "keywords": [ - "http", - "http-message", - "psr", - "psr-7", - "request", - "response" - ], - "time": "2015-05-04 20:22:00" - }, { "name": "psr/log", "version": "1.0.0", From 132453ac800bee07da9a327a7c93a7ca47bd2d89 Mon Sep 17 00:00:00 2001 From: Dan Richelson Date: Sat, 23 Jul 2016 13:56:00 -0700 Subject: [PATCH 11/13] Make guzzle optional. Update README. --- README.md | 8 +- composer.json | 6 +- composer.lock | 305 +------------------------------------------------- 3 files changed, 10 insertions(+), 309 deletions(-) diff --git a/README.md b/README.md index aec68a969..325158603 100644 --- a/README.md +++ b/README.md @@ -11,8 +11,8 @@ Quick setup 0. Install the PHP SDK with [Composer](https://getcomposer.org/) php composer.phar require launchdarkly/launchdarkly-php - php composer.phar require "guzzlehttp/guzzle:5.*" - php composer.phar require "guzzlehttp/cache-subscriber:0.1.*" + php composer.phar require "guzzlehttp/guzzle:6.2.1" + php composer.phar require "kevinrob/guzzle-cache-middleware": "1.4.1" 1. After installing, require Composer's autoloader: @@ -49,8 +49,8 @@ Using Guzzle To use Guzzle it must be required as a dependency: - php composer.phar require "guzzlehttp/guzzle:5.*" - php composer.phar require "guzzlehttp/cache-subscriber:0.1.*" + php composer.phar require "guzzlehttp/guzzle:6.2.1" + php composer.phar require "kevinrob/guzzle-cache-middleware": "1.4.1" It will then be used as the default way of fetching flags. diff --git a/composer.json b/composer.json index 074b0844d..17682be3c 100644 --- a/composer.json +++ b/composer.json @@ -14,9 +14,7 @@ } ], "require": { - "php": ">=5.5", - "guzzlehttp/guzzle": "6.2.1", - "kevinrob/guzzle-cache-middleware": "1.4.1" + "php": ">=5.5" }, "require-dev": { "phpunit/phpunit": "4.8.26", @@ -25,6 +23,8 @@ "zendframework/zend-serializer": "2.7.*" }, "suggested": { + "guzzlehttp/guzzle": "6.2.1", + "kevinrob/guzzle-cache-middleware": "1.4.1", "predis/predis": "1.0.*" }, "autoload": { diff --git a/composer.lock b/composer.lock index 5d5a59033..f6e81cf7e 100644 --- a/composer.lock +++ b/composer.lock @@ -4,308 +4,9 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "5eedb482e4771e6654320cd7e4eeba75", - "content-hash": "a86b9bdc4496a0675fcc918a7f92b585", - "packages": [ - { - "name": "guzzlehttp/guzzle", - "version": "6.2.1", - "source": { - "type": "git", - "url": "https://github.com/guzzle/guzzle.git", - "reference": "3f808fba627f2c5b69e2501217bf31af349c1427" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/3f808fba627f2c5b69e2501217bf31af349c1427", - "reference": "3f808fba627f2c5b69e2501217bf31af349c1427", - "shasum": "" - }, - "require": { - "guzzlehttp/promises": "^1.0", - "guzzlehttp/psr7": "^1.3.1", - "php": ">=5.5" - }, - "require-dev": { - "ext-curl": "*", - "phpunit/phpunit": "^4.0", - "psr/log": "^1.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "6.2-dev" - } - }, - "autoload": { - "files": [ - "src/functions_include.php" - ], - "psr-4": { - "GuzzleHttp\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - } - ], - "description": "Guzzle is a PHP HTTP client library", - "homepage": "http://guzzlephp.org/", - "keywords": [ - "client", - "curl", - "framework", - "http", - "http client", - "rest", - "web service" - ], - "time": "2016-07-15 17:22:37" - }, - { - "name": "guzzlehttp/promises", - "version": "1.2.0", - "source": { - "type": "git", - "url": "https://github.com/guzzle/promises.git", - "reference": "c10d860e2a9595f8883527fa0021c7da9e65f579" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/guzzle/promises/zipball/c10d860e2a9595f8883527fa0021c7da9e65f579", - "reference": "c10d860e2a9595f8883527fa0021c7da9e65f579", - "shasum": "" - }, - "require": { - "php": ">=5.5.0" - }, - "require-dev": { - "phpunit/phpunit": "~4.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "psr-4": { - "GuzzleHttp\\Promise\\": "src/" - }, - "files": [ - "src/functions_include.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - } - ], - "description": "Guzzle promises library", - "keywords": [ - "promise" - ], - "time": "2016-05-18 16:56:05" - }, - { - "name": "guzzlehttp/psr7", - "version": "1.3.1", - "source": { - "type": "git", - "url": "https://github.com/guzzle/psr7.git", - "reference": "5c6447c9df362e8f8093bda8f5d8873fe5c7f65b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/5c6447c9df362e8f8093bda8f5d8873fe5c7f65b", - "reference": "5c6447c9df362e8f8093bda8f5d8873fe5c7f65b", - "shasum": "" - }, - "require": { - "php": ">=5.4.0", - "psr/http-message": "~1.0" - }, - "provide": { - "psr/http-message-implementation": "1.0" - }, - "require-dev": { - "phpunit/phpunit": "~4.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.4-dev" - } - }, - "autoload": { - "psr-4": { - "GuzzleHttp\\Psr7\\": "src/" - }, - "files": [ - "src/functions_include.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - } - ], - "description": "PSR-7 message implementation", - "keywords": [ - "http", - "message", - "stream", - "uri" - ], - "time": "2016-06-24 23:00:38" - }, - { - "name": "kevinrob/guzzle-cache-middleware", - "version": "v1.4.1", - "source": { - "type": "git", - "url": "https://github.com/Kevinrob/guzzle-cache-middleware.git", - "reference": "f30ded404c296d50820670489d718a04634b6789" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Kevinrob/guzzle-cache-middleware/zipball/f30ded404c296d50820670489d718a04634b6789", - "reference": "f30ded404c296d50820670489d718a04634b6789", - "shasum": "" - }, - "require": { - "php": ">=5.5.0" - }, - "require-dev": { - "cache/array-adapter": "^0.4", - "doctrine/cache": "^1.0", - "guzzlehttp/guzzle": "^6.0", - "illuminate/cache": "^5.0", - "league/flysystem": "^1.0", - "phpunit/phpunit": "^4.0 || ^5.0", - "psr/cache": "^1.0" - }, - "suggest": { - "doctrine/cache": "This library have a lot of ready-to-use cache storage (to be use with Kevinrob\\GuzzleCache\\Storage\\DoctrineCacheStorage)", - "guzzlehttp/guzzle": "For using this library. It was created for Guzzle6. (but you can use it with any PSR-7 HTTP Client)", - "laravel/framework": "To be use with Kevinrob\\GuzzleCache\\Storage\\LaravelCacheStorage", - "league/flysystem": "To be use with Kevinrob\\GuzzleCache\\Storage\\FlysystemStorage", - "psr/cache": "To be use with Kevinrob\\GuzzleCache\\Storage\\Psr6CacheStorage" - }, - "type": "library", - "autoload": { - "psr-4": { - "Kevinrob\\GuzzleCache\\": [ - "src/", - "tests/" - ] - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Kevin Robatel", - "email": "kevinrob2@gmail.com", - "homepage": "https://github.com/Kevinrob" - } - ], - "description": "A HTTP/1.1 Cache for Guzzle 6. It's a simple Middleware to be added in the HandlerStack. (RFC 7234)", - "homepage": "https://github.com/Kevinrob/guzzle-cache-middleware", - "keywords": [ - "Etag", - "Flysystem", - "Guzzle", - "cache", - "cache-control", - "doctrine", - "expiration", - "guzzle6", - "handler", - "http", - "http 1.1", - "middleware", - "performance", - "php", - "promise", - "psr6", - "psr7", - "rfc7234", - "validation" - ], - "time": "2016-06-17 08:34:36" - }, - { - "name": "psr/http-message", - "version": "1.0", - "source": { - "type": "git", - "url": "https://github.com/php-fig/http-message.git", - "reference": "85d63699f0dbedb190bbd4b0d2b9dc707ea4c298" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-message/zipball/85d63699f0dbedb190bbd4b0d2b9dc707ea4c298", - "reference": "85d63699f0dbedb190bbd4b0d2b9dc707ea4c298", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Http\\Message\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Common interface for HTTP messages", - "keywords": [ - "http", - "http-message", - "psr", - "psr-7", - "request", - "response" - ], - "time": "2015-05-04 20:22:00" - } - ], + "hash": "81f0f2d66e4ac270e2d713a8e40e372c", + "content-hash": "a8e4c5c74e80e417f21fefadd2b259e8", + "packages": [], "packages-dev": [ { "name": "cilex/cilex", From 5cfbc9c250a181d6aa85c899776e56e5779b27bb Mon Sep 17 00:00:00 2001 From: Dan Richelson Date: Sat, 23 Jul 2016 13:58:10 -0700 Subject: [PATCH 12/13] Add dev requirements --- composer.json | 2 ++ 1 file changed, 2 insertions(+) diff --git a/composer.json b/composer.json index 17682be3c..0329dee7e 100644 --- a/composer.json +++ b/composer.json @@ -17,6 +17,8 @@ "php": ">=5.5" }, "require-dev": { + "guzzlehttp/guzzle": "6.2.1", + "kevinrob/guzzle-cache-middleware": "1.4.1", "phpunit/phpunit": "4.8.26", "phpdocumentor/phpdocumentor": "2.*", "predis/predis": "1.0.*", From a903193745927a6b0411d6824d3218336c8e2ad6 Mon Sep 17 00:00:00 2001 From: Dan Richelson Date: Sat, 23 Jul 2016 14:03:33 -0700 Subject: [PATCH 13/13] composer update --- composer.lock | 302 +++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 300 insertions(+), 2 deletions(-) diff --git a/composer.lock b/composer.lock index f6e81cf7e..87ffb3aaf 100644 --- a/composer.lock +++ b/composer.lock @@ -4,8 +4,8 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "81f0f2d66e4ac270e2d713a8e40e372c", - "content-hash": "a8e4c5c74e80e417f21fefadd2b259e8", + "hash": "cf5c4602f9f9aff086005edc75728d0f", + "content-hash": "f09e942238b22b8ef39b297cd1808ee6", "packages": [], "packages-dev": [ { @@ -368,6 +368,177 @@ ], "time": "2015-10-04 16:44:32" }, + { + "name": "guzzlehttp/guzzle", + "version": "6.2.1", + "source": { + "type": "git", + "url": "https://github.com/guzzle/guzzle.git", + "reference": "3f808fba627f2c5b69e2501217bf31af349c1427" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/3f808fba627f2c5b69e2501217bf31af349c1427", + "reference": "3f808fba627f2c5b69e2501217bf31af349c1427", + "shasum": "" + }, + "require": { + "guzzlehttp/promises": "^1.0", + "guzzlehttp/psr7": "^1.3.1", + "php": ">=5.5" + }, + "require-dev": { + "ext-curl": "*", + "phpunit/phpunit": "^4.0", + "psr/log": "^1.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "6.2-dev" + } + }, + "autoload": { + "files": [ + "src/functions_include.php" + ], + "psr-4": { + "GuzzleHttp\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + } + ], + "description": "Guzzle is a PHP HTTP client library", + "homepage": "http://guzzlephp.org/", + "keywords": [ + "client", + "curl", + "framework", + "http", + "http client", + "rest", + "web service" + ], + "time": "2016-07-15 17:22:37" + }, + { + "name": "guzzlehttp/promises", + "version": "1.2.0", + "source": { + "type": "git", + "url": "https://github.com/guzzle/promises.git", + "reference": "c10d860e2a9595f8883527fa0021c7da9e65f579" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/promises/zipball/c10d860e2a9595f8883527fa0021c7da9e65f579", + "reference": "c10d860e2a9595f8883527fa0021c7da9e65f579", + "shasum": "" + }, + "require": { + "php": ">=5.5.0" + }, + "require-dev": { + "phpunit/phpunit": "~4.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "psr-4": { + "GuzzleHttp\\Promise\\": "src/" + }, + "files": [ + "src/functions_include.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + } + ], + "description": "Guzzle promises library", + "keywords": [ + "promise" + ], + "time": "2016-05-18 16:56:05" + }, + { + "name": "guzzlehttp/psr7", + "version": "1.3.1", + "source": { + "type": "git", + "url": "https://github.com/guzzle/psr7.git", + "reference": "5c6447c9df362e8f8093bda8f5d8873fe5c7f65b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/5c6447c9df362e8f8093bda8f5d8873fe5c7f65b", + "reference": "5c6447c9df362e8f8093bda8f5d8873fe5c7f65b", + "shasum": "" + }, + "require": { + "php": ">=5.4.0", + "psr/http-message": "~1.0" + }, + "provide": { + "psr/http-message-implementation": "1.0" + }, + "require-dev": { + "phpunit/phpunit": "~4.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4-dev" + } + }, + "autoload": { + "psr-4": { + "GuzzleHttp\\Psr7\\": "src/" + }, + "files": [ + "src/functions_include.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + } + ], + "description": "PSR-7 message implementation", + "keywords": [ + "http", + "message", + "stream", + "uri" + ], + "time": "2016-06-24 23:00:38" + }, { "name": "herrera-io/json", "version": "1.0.3", @@ -711,6 +882,84 @@ ], "time": "2016-01-25 15:43:01" }, + { + "name": "kevinrob/guzzle-cache-middleware", + "version": "v1.4.1", + "source": { + "type": "git", + "url": "https://github.com/Kevinrob/guzzle-cache-middleware.git", + "reference": "f30ded404c296d50820670489d718a04634b6789" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Kevinrob/guzzle-cache-middleware/zipball/f30ded404c296d50820670489d718a04634b6789", + "reference": "f30ded404c296d50820670489d718a04634b6789", + "shasum": "" + }, + "require": { + "php": ">=5.5.0" + }, + "require-dev": { + "cache/array-adapter": "^0.4", + "doctrine/cache": "^1.0", + "guzzlehttp/guzzle": "^6.0", + "illuminate/cache": "^5.0", + "league/flysystem": "^1.0", + "phpunit/phpunit": "^4.0 || ^5.0", + "psr/cache": "^1.0" + }, + "suggest": { + "doctrine/cache": "This library have a lot of ready-to-use cache storage (to be use with Kevinrob\\GuzzleCache\\Storage\\DoctrineCacheStorage)", + "guzzlehttp/guzzle": "For using this library. It was created for Guzzle6. (but you can use it with any PSR-7 HTTP Client)", + "laravel/framework": "To be use with Kevinrob\\GuzzleCache\\Storage\\LaravelCacheStorage", + "league/flysystem": "To be use with Kevinrob\\GuzzleCache\\Storage\\FlysystemStorage", + "psr/cache": "To be use with Kevinrob\\GuzzleCache\\Storage\\Psr6CacheStorage" + }, + "type": "library", + "autoload": { + "psr-4": { + "Kevinrob\\GuzzleCache\\": [ + "src/", + "tests/" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Kevin Robatel", + "email": "kevinrob2@gmail.com", + "homepage": "https://github.com/Kevinrob" + } + ], + "description": "A HTTP/1.1 Cache for Guzzle 6. It's a simple Middleware to be added in the HandlerStack. (RFC 7234)", + "homepage": "https://github.com/Kevinrob/guzzle-cache-middleware", + "keywords": [ + "Etag", + "Flysystem", + "Guzzle", + "cache", + "cache-control", + "doctrine", + "expiration", + "guzzle6", + "handler", + "http", + "http 1.1", + "middleware", + "performance", + "php", + "promise", + "psr6", + "psr7", + "rfc7234", + "validation" + ], + "time": "2016-06-17 08:34:36" + }, { "name": "kherge/version", "version": "1.0.1", @@ -1781,6 +2030,55 @@ ], "time": "2016-05-30 15:25:52" }, + { + "name": "psr/http-message", + "version": "1.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-message.git", + "reference": "85d63699f0dbedb190bbd4b0d2b9dc707ea4c298" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-message/zipball/85d63699f0dbedb190bbd4b0d2b9dc707ea4c298", + "reference": "85d63699f0dbedb190bbd4b0d2b9dc707ea4c298", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Message\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for HTTP messages", + "keywords": [ + "http", + "http-message", + "psr", + "psr-7", + "request", + "response" + ], + "time": "2015-05-04 20:22:00" + }, { "name": "psr/log", "version": "1.0.0",