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
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"require": {
"php": ">=8.0",
"guzzlehttp/guzzle": "^7",
"launchdarkly/server-sdk": "^5.1",
"launchdarkly/server-sdk": "^6.2",
"myclabs/php-enum": ">1.8",
"open-feature/sdk": "^2.0"
},
Expand Down
3 changes: 2 additions & 1 deletion release-please-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"include-v-in-tag": false,
"include-component-in-tag": false,
"extra-files": [
".github/actions/build-docs/action.yml"
".github/actions/build-docs/action.yml",
"src/Provider.php",
]
}
}
Expand Down
5 changes: 5 additions & 0 deletions src/Provider.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ class Provider implements OpenFeatureProvider
private EvaluationContextConverter $contextConverter;
private ResolutionDetailsConverter $detailsConverter;

const VERSION = '0.1.0'; // x-release-please-version

/**
* Instantiate a new instance of this provider, backed by the provided LDClient instance.
*
Expand All @@ -36,6 +38,9 @@ class Provider implements OpenFeatureProvider
*/
public function __construct(string $sdkKey, array $options = [])
{
$options['wrapper_name'] = 'open-feature-php-server';
$options['wrapper_version'] = self::VERSION;

$this->client = new LDClient($sdkKey, $options);
$this->contextConverter = new EvaluationContextConverter($options['logger'] ?? new NullLogger());
$this->detailsConverter = new ResolutionDetailsConverter();
Expand Down