Skip to content

Commit 755f7c1

Browse files
authored
Merge pull request #145 from stof/fix_compat
Fix the client when used with guzzle 7.9
2 parents 7a89c1b + 8d869d4 commit 755f7c1

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

src/Client/KeenIOClient.php

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,20 @@ public static function factory($config = array())
7272

7373
$file = 'keen-io-' . str_replace('.', '_', $config['version']) . '.php';
7474

75+
$guzzleClientConfig = $config;
76+
unset(
77+
$guzzleClientConfig['masterKey'],
78+
$guzzleClientConfig['writeKey'],
79+
$guzzleClientConfig['readKey'],
80+
$guzzleClientConfig['projectId'],
81+
$guzzleClientConfig['organizationKey'],
82+
$guzzleClientConfig['organizationId'],
83+
$guzzleClientConfig['version']
84+
);
85+
7586
// Create the new Keen IO Client with our Configuration
7687
return new self(
77-
new Client($config),
88+
new Client($guzzleClientConfig),
7889
new Description(include __DIR__ . "/Resources/{$file}"),
7990
null,
8091
function ($arg) {

0 commit comments

Comments
 (0)