Skip to content

Commit 42bb678

Browse files
committed
Fix for Laravel 5.6
1 parent 31a824f commit 42bb678

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

src/OpenIdVerificator.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
namespace Stackkit\LaravelGoogleCloudTasksQueue;
44

5+
use Carbon\Carbon;
56
use Firebase\JWT\JWT;
67
use Firebase\JWT\SignatureInvalidException;
78
use GuzzleHttp\Client;
@@ -53,7 +54,7 @@ public function getPublicKey($kid = null)
5354
$v3Certs = Cache::get(self::V3_CERTS);
5455
} else {
5556
$v3Certs = $this->getv3Certs();
56-
Cache::put(self::V3_CERTS, $v3Certs, $this->maxAge[self::URL_OPENID_CONFIG]);
57+
Cache::put(self::V3_CERTS, $v3Certs, Carbon::now()->addSeconds($this->maxAge[self::URL_OPENID_CONFIG]));
5758
}
5859

5960
$cert = $kid ? collect($v3Certs)->firstWhere('kid', '=', $kid) : $v3Certs[0];

tests/TestCase.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
namespace Tests;
44

5+
use Illuminate\Support\Facades\Artisan;
6+
57
class TestCase extends \Orchestra\Testbench\TestCase
68
{
79
/**
@@ -29,6 +31,11 @@ protected function getPackageProviders($app)
2931
*/
3032
protected function getEnvironmentSetUp($app)
3133
{
34+
foreach (glob(storage_path('framework/cache/data/*/*/*')) as $file) {
35+
unlink($file);
36+
}
37+
38+
$app['config']->set('cache.default', 'file');
3239
$app['config']->set('queue.default', 'cloudtasks');
3340
$app['config']->set('queue.connections.cloudtasks', [
3441
'driver' => 'cloudtasks',

0 commit comments

Comments
 (0)