From a5f886d97d3e5eab514a3a4c9fcf752474633e33 Mon Sep 17 00:00:00 2001 From: Thomas Steur Date: Sat, 2 Aug 2014 09:01:45 +0200 Subject: [PATCH] now that the bug in the php github api is resolved we can remove this workaround --- src/helpers/CachedGithubClient.php | 43 ------------------------------ src/helpers/GithubImporter.php | 3 ++- 2 files changed, 2 insertions(+), 44 deletions(-) delete mode 100644 src/helpers/CachedGithubClient.php diff --git a/src/helpers/CachedGithubClient.php b/src/helpers/CachedGithubClient.php deleted file mode 100644 index b3768d5..0000000 --- a/src/helpers/CachedGithubClient.php +++ /dev/null @@ -1,43 +0,0 @@ -actualLastResponse = parent::request($path, $body, $httpMethod, $headers, $options); - - return $this->actualLastResponse; - } - - /** - * @return Response - */ - public function getLastResponse() - { - return $this->actualLastResponse; - } - -} diff --git a/src/helpers/GithubImporter.php b/src/helpers/GithubImporter.php index 974b84f..8434f51 100755 --- a/src/helpers/GithubImporter.php +++ b/src/helpers/GithubImporter.php @@ -9,6 +9,7 @@ namespace helpers; use Github\Client; +use Github\HttpClient\CachedHttpClient; use Github\ResultPager; class GithubImporter { @@ -37,7 +38,7 @@ class GithubImporter { public static function buildClient($clientId, $clientSecret) { - $httpClient = new CachedGithubClient(array('cache_dir' => realpath('../tmp/github_api_cache'))); + $httpClient = new CachedHttpClient(array('cache_dir' => realpath('../tmp/github_api_cache'))); $client = new Client($httpClient); if (!empty($clientId) && !empty($clientSecret)) {