Skip to content

Commit 597dbbc

Browse files
authored
chore: Set wrapper name and version on wrapped LDClient (#15)
1 parent 924a9c1 commit 597dbbc

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"require": {
2323
"php": ">=8.0",
2424
"guzzlehttp/guzzle": "^7",
25-
"launchdarkly/server-sdk": "^5.1",
25+
"launchdarkly/server-sdk": "^6.2",
2626
"myclabs/php-enum": ">1.8",
2727
"open-feature/sdk": "^2.0"
2828
},

release-please-config.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
"include-v-in-tag": false,
88
"include-component-in-tag": false,
99
"extra-files": [
10-
".github/actions/build-docs/action.yml"
10+
".github/actions/build-docs/action.yml",
11+
"src/Provider.php",
1112
]
1213
}
1314
}

src/Provider.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ class Provider implements OpenFeatureProvider
2727
private EvaluationContextConverter $contextConverter;
2828
private ResolutionDetailsConverter $detailsConverter;
2929

30+
const VERSION = '0.1.0'; // x-release-please-version
31+
3032
/**
3133
* Instantiate a new instance of this provider, backed by the provided LDClient instance.
3234
*
@@ -36,6 +38,9 @@ class Provider implements OpenFeatureProvider
3638
*/
3739
public function __construct(string $sdkKey, array $options = [])
3840
{
41+
$options['wrapper_name'] = 'open-feature-php-server';
42+
$options['wrapper_version'] = self::VERSION;
43+
3944
$this->client = new LDClient($sdkKey, $options);
4045
$this->contextConverter = new EvaluationContextConverter($options['logger'] ?? new NullLogger());
4146
$this->detailsConverter = new ResolutionDetailsConverter();

0 commit comments

Comments
 (0)