From 855fdd43552894f9a7623961b1dab7006d65d4cb Mon Sep 17 00:00:00 2001 From: Simon Foster Date: Tue, 5 Aug 2025 10:29:31 +0100 Subject: [PATCH 1/2] fix: allow analytics to use the default api url if one isn't set --- src/Flagsmith.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Flagsmith.php b/src/Flagsmith.php index 97aade5..9703e59 100644 --- a/src/Flagsmith.php +++ b/src/Flagsmith.php @@ -104,7 +104,7 @@ public function __construct( $this->environmentTtl = $environmentTtl ?? $this->environmentTtl; $this->enableLocalEvaluation = !is_null($environmentTtl); $this->retries = $retries ?? new Retry(3); - $this->analyticsProcessor = $enableAnalytics ? new AnalyticsProcessor($apiKey, $host) : null; + $this->analyticsProcessor = $enableAnalytics ? new AnalyticsProcessor($apiKey, $this->host) : null; $this->defaultFlagHandler = $defaultFlagHandler ?? $this->defaultFlagHandler; //We default to using Guzzle for the HTTP client (as this is how it worked in 1.0) @@ -146,7 +146,7 @@ public function withEnvironmentTtl(int $environmentTtl): self /** * Build with enable Analytics. - * @param bool $enableAnalytics + * @param AnalyticsProcessor $enableAnalytics * @return Flagsmith */ public function withAnalytics(AnalyticsProcessor $analytics): self From a91abab60deb9a18c5d6cea3610195dae398e89b Mon Sep 17 00:00:00 2001 From: Simon Foster Date: Tue, 5 Aug 2025 12:10:21 +0100 Subject: [PATCH 2/2] docs: correct parameters name in phpdoc --- src/Flagsmith.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Flagsmith.php b/src/Flagsmith.php index 9703e59..28493af 100644 --- a/src/Flagsmith.php +++ b/src/Flagsmith.php @@ -146,7 +146,7 @@ public function withEnvironmentTtl(int $environmentTtl): self /** * Build with enable Analytics. - * @param AnalyticsProcessor $enableAnalytics + * @param AnalyticsProcessor $analytics * @return Flagsmith */ public function withAnalytics(AnalyticsProcessor $analytics): self