Skip to content

Commit

Permalink
Merge pull request #22 from hellofresh/fix/PO-2958_silent_client_as_d…
Browse files Browse the repository at this point in the history
…efault

[FIX/PO-2958] silent client as the default client for statsd >v1.4
  • Loading branch information
ehkasper authored Mar 14, 2023
2 parents 697da42 + a6d0ddc commit 076b76e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/Client/StatsD.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
use HelloFresh\Stats\HTTPMetricAlterCallback;
use HelloFresh\Stats\Incrementer;
use HelloFresh\Stats\State;
use HelloFresh\Stats\StatsD\SilentClient as StatsDClient;
use HelloFresh\Stats\Timer;
use League\StatsD\Client as StatsDClient;
use League\StatsD\Exception\ConfigurationException;

class StatsD extends AbstractClient implements Client
Expand Down
6 changes: 3 additions & 3 deletions tests/Client/StatsDTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public function testDefaultClientInstance()
$statsD = new ExposedClientStatsD($dns);
$instantiatedClient = $statsD->getClient();

$this->assertInstanceOf(Client::class, $instantiatedClient);
$this->assertInstanceOf(Stats\StatsD\SilentClient::class, $instantiatedClient);
}

/**
Expand All @@ -62,10 +62,10 @@ public function testDefaultClientInstance()
public function testOptionalClientInstance()
{
$dns = 'statsd://stats.local:1234/prefix.ns?timeout=2.5&error=0';
$statsD = new ExposedClientStatsD($dns, Stats\StatsD\SilentClient::class);
$statsD = new ExposedClientStatsD($dns, Client::class);
$instantiatedClient = $statsD->getClient();

$this->assertInstanceOf(Stats\StatsD\SilentClient::class, $instantiatedClient);
$this->assertInstanceOf(Client::class, $instantiatedClient);
}

public function testInstances()
Expand Down

0 comments on commit 076b76e

Please sign in to comment.