Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
[//]: # (Link to the issue corresponding to this chunk of work)
:tickets: Fixes __issue__
:scroll: Design Doc: __link if applicable__

## Motivation and Context
[//]: # (Why is this change required? What problem does it solve?)

## Description
[//]: # (Describe your changes in detail)

## How has this been documented?
[//]: # (Please describe how you documented the developer impact of your changes; link to PRs or issues or explan why no documentation changes are required)

## How has this been tested?
[//]: # (Please describe in detail how you tested your changes)

14 changes: 14 additions & 0 deletions src/EppoClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -573,6 +573,20 @@ private function checkExpectedType(
($expectedVariationType == VariationType::JSON)); // JSON type check un-necessary here.
}

/**
* @throws EppoClientException
*/
public function fetchAndActivateConfiguration(): void
{
try {
$this->configurationLoader->reloadConfiguration();
} catch (HttpRequestException|InvalidApiKeyException|InvalidConfigurationException $e) {
if ($this->isGracefulMode) {
error_log('[Eppo SDK] Error fetching configuration ' . $e->getMessage());
}
throw EppoClientException::from($e);
}
}

public function startPolling(): void
{
Expand Down
9 changes: 3 additions & 6 deletions tests/EppoClientTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -325,12 +325,9 @@ public function testInitWithPollingOptions(): void
$client = EppoClient::init(
$apiKey,
"fake address",
null,
null,
$httpClient,
null,
false,
$pollingOptions
httpClient: $httpClient,
isGracefulMode: false,
pollingOptions: $pollingOptions
);

$this->assertEquals(
Expand Down