Skip to content

Commit 81974a8

Browse files
committed
do not pass client_name option to PluginClient constructor
1 parent bc3f994 commit 81974a8

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

spec/PluginClientFactorySpec.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,9 @@ function it_returns_a_plugin_client(HttpClient $httpClient)
1818

1919
$client->shouldHaveType('Http\Client\Common\PluginClient');
2020
}
21+
22+
function it_does_not_construct_plugin_client_with_client_name_option(HttpClient $httpClient)
23+
{
24+
$this->createClient($httpClient, [], ['client_name' => 'Default']);
25+
}
2126
}

src/PluginClientFactory.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@ public function createClient($client, array $plugins = [], array $options = [])
5555
return $factory($client, $plugins, $options);
5656
}
5757

58+
unset($options['client_name']);
59+
5860
return new PluginClient($client, $plugins, $options);
5961
}
6062
}

0 commit comments

Comments
 (0)