Skip to content

Commit

Permalink
Merge pull request #145 from stof/fix_compat
Browse files Browse the repository at this point in the history
Fix the client when used with guzzle 7.9
  • Loading branch information
michalpierog authored Aug 26, 2024
2 parents 7a89c1b + 8d869d4 commit 755f7c1
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/Client/KeenIOClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,20 @@ public static function factory($config = array())

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

$guzzleClientConfig = $config;
unset(
$guzzleClientConfig['masterKey'],
$guzzleClientConfig['writeKey'],
$guzzleClientConfig['readKey'],
$guzzleClientConfig['projectId'],
$guzzleClientConfig['organizationKey'],
$guzzleClientConfig['organizationId'],
$guzzleClientConfig['version']
);

// Create the new Keen IO Client with our Configuration
return new self(
new Client($config),
new Client($guzzleClientConfig),
new Description(include __DIR__ . "/Resources/{$file}"),
null,
function ($arg) {
Expand Down

0 comments on commit 755f7c1

Please sign in to comment.