Skip to content

Commit e64cc87

Browse files
Merge branch 'master' into patch-2
2 parents ae106ea + 1d23310 commit e64cc87

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

README.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -265,14 +265,21 @@ $response = $httpClient->get('https://www.googleapis.com/plus/v1/people/me');
265265
It is recommended to use another caching library to improve performance. This can be done by passing a [PSR-6](http://www.php-fig.org/psr/psr-6/) compatible library to the client:
266266

267267
```php
268-
$cache = new Stash\Pool(new Stash\Driver\FileSystem);
268+
use League\Flysystem\Adapter\Local;
269+
use League\Flysystem\Filesystem;
270+
use Cache\Adapter\Filesystem\FilesystemCachePool;
271+
272+
$filesystemAdapter = new Local(__DIR__.'/');
273+
$filesystem = new Filesystem($filesystemAdapter);
274+
275+
$cache = new FilesystemCachePool($filesystem);
269276
$client->setCache($cache);
270277
```
271278

272-
In this example we use [StashPHP](http://www.stashphp.com/). Add this to your project with composer:
279+
In this example we use [PHP Cache](http://www.php-cache.com/). Add this to your project with composer:
273280

274281
```
275-
composer require tedivm/stash
282+
composer require cache/filesystem-adapter
276283
```
277284

278285
### Updating Tokens ###

src/Google/AccessToken/Verify.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,8 +211,8 @@ private function getJwtService()
211211
$jwtClass = 'Firebase\JWT\JWT';
212212
}
213213

214-
if (property_exists($jwtClass, 'leeway')) {
215-
// adds 1 second to JWT leeway
214+
if (property_exists($jwtClass, 'leeway') && $jwtClass::$leeway < 1) {
215+
// Ensures JWT leeway is at least 1
216216
// @see https://github.com/google/google-api-php-client/issues/827
217217
$jwtClass::$leeway = 1;
218218
}

0 commit comments

Comments
 (0)