From 212203f7c77153b5d8d0ee033cd65b7976c14d2b Mon Sep 17 00:00:00 2001 From: Jaanus Sellin Date: Mon, 16 Sep 2024 14:29:03 +0300 Subject: [PATCH] chore: PHP SDK example fix (#8146) --- frontend/src/component/onboarding/sdkSnippets.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/frontend/src/component/onboarding/sdkSnippets.ts b/frontend/src/component/onboarding/sdkSnippets.ts index 4002023c6da2..90984720f92a 100644 --- a/frontend/src/component/onboarding/sdkSnippets.ts +++ b/frontend/src/component/onboarding/sdkSnippets.ts @@ -62,11 +62,14 @@ end`, use Unleash\\Client\\UnleashBuilder; +require 'vendor/autoload.php'; + $unleash = UnleashBuilder::create() ->withAppName('unleash-onboarding-php') ->withAppUrl('') ->withHeader('Authorization', '') ->withInstanceId('unleash-onboarding-instance') + ->withMetricsInterval(5000) ->build();`, Rust: `let client = client::ClientBuilder::default() .interval(500) @@ -203,7 +206,11 @@ export const checkFlagCodeSnippets: Record = { }, 1000); `, Ruby: ``, - PHP: ``, + PHP: `while (true) { + echo 'Feature flag is: ' . $unleash->isEnabled('') . PHP_EOL; + sleep(1); +} +`, Rust: ``, '.NET': ``, Java: ``,