Skip to content
Open
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
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Changed

- The `API` service is now an isolated `OpenFeatureAPI` instance created by the container (SDK 2.3.0 isolated instances) instead of the `OpenFeatureAPI::getInstance()` global singleton. Provider, hooks, and evaluation context are no longer shared with other kernels running in the same PHP process.
- `open-feature/sdk` requirement raised from `^2.2` to `^2.3` (the bundle relies on the public `OpenFeatureAPI` constructor introduced in SDK 2.3.0).

### Upgrade notes

- Run `composer update open-feature/sdk` if your lock file pins a version below 2.3.0.
- Code calling `OpenFeatureAPI::getInstance()` directly now gets an instance distinct from the bundle's `API` service (different provider, hooks, and evaluation context). Inject the `API` or `Client` service instead.

## [0.3.0] - 2026-06-15

### Added
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
},
"require": {
"php": ">=8.2",
"open-feature/sdk": "^2.2",
"open-feature/sdk": "^2.3",
"symfony/config": "^6.4|^7.4|^8.0",
"symfony/dependency-injection": "^6.4|^7.4|^8.0",
"symfony/http-kernel": "^6.4|^7.4|^8.0"
Expand Down
4 changes: 2 additions & 2 deletions src/Resources/config/services.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
return static function (ContainerConfigurator $container): void {
$services = $container->services();

$services->set(API::class, OpenFeatureAPI::class)
->factory([OpenFeatureAPI::class, 'getInstance']);
// Isolated instance (SDK >= 2.3): no state shared with the global singleton or other kernels
$services->set(API::class, OpenFeatureAPI::class);

$services->set(Client::class)
->factory([service(API::class), 'getClient'])
Expand Down
Loading