Skip to content
This repository was archived by the owner on Dec 22, 2025. It is now read-only.

Commit a6d0ddc

Browse files
author
Eduardo Kasper
committed
[FIX/PO-2958] silent client as the default client for statsd >v1.4
1 parent 697da42 commit a6d0ddc

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/Client/StatsD.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
use HelloFresh\Stats\HTTPMetricAlterCallback;
66
use HelloFresh\Stats\Incrementer;
77
use HelloFresh\Stats\State;
8+
use HelloFresh\Stats\StatsD\SilentClient as StatsDClient;
89
use HelloFresh\Stats\Timer;
9-
use League\StatsD\Client as StatsDClient;
1010
use League\StatsD\Exception\ConfigurationException;
1111

1212
class StatsD extends AbstractClient implements Client

tests/Client/StatsDTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public function testDefaultClientInstance()
5353
$statsD = new ExposedClientStatsD($dns);
5454
$instantiatedClient = $statsD->getClient();
5555

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

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

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

7171
public function testInstances()

0 commit comments

Comments
 (0)