PHPackages                             aubes/openfeature-flagd-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. aubes/openfeature-flagd-bundle

ActiveSymfony-bundle[Utility &amp; Helpers](/categories/utility)

aubes/openfeature-flagd-bundle
==============================

Symfony bundle for the OpenFeature Flagd provider

v0.2.0(1mo ago)03MITPHPPHP &gt;=8.2CI passing

Since Apr 12Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/aubes/openfeature-flagd-bundle)[ Packagist](https://packagist.org/packages/aubes/openfeature-flagd-bundle)[ RSS](/packages/aubes-openfeature-flagd-bundle/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependencies (11)Versions (4)Used By (0)

OpenFeature Flagd Bundle
========================

[](#openfeature-flagd-bundle)

[![CI](https://github.com/aubes/openfeature-flagd-bundle/actions/workflows/php.yml/badge.svg)](https://github.com/aubes/openfeature-flagd-bundle/actions/workflows/php.yml)[![Latest Version](https://camo.githubusercontent.com/d51e4ec6fa1fb4903be447c3fd6ffe811e8a816ba0f5f486b7a964f06d131131/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f61756265732f6f70656e666561747572652d666c6167642d62756e646c652e737667)](https://packagist.org/packages/aubes/openfeature-flagd-bundle)[![PHP Version](https://camo.githubusercontent.com/744f8821cc27dec8b0013ade48179731a44eadf4f943e0b1d9ffcb93f80177de/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d382e322532422d626c75652e737667)](https://www.php.net)[![Symfony Version](https://camo.githubusercontent.com/3374d1115a53125e6de27a26b6fd40f7d66748bda4f478e82758969c3229c246/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f73796d666f6e792d362e34253230253743253230372e34253230253743253230382e782d677265656e2e737667)](https://symfony.com)

Symfony bundle that registers the [OpenFeature Flagd provider](https://github.com/open-feature/php-sdk-contrib/tree/main/providers/Flagd) as a Symfony service.

[Flagd](https://flagd.dev/) in Symfony, one `composer require` away.

Requirements
------------

[](#requirements)

- PHP 8.2+
- Symfony 6.4, 7.4 or 8.x
- A PSR-18 HTTP client (e.g. `symfony/http-client`, `guzzlehttp/guzzle`) and PSR-17 factories (e.g. `nyholm/psr7`)
- A running [flagd server](https://flagd.dev/quick-start/)

Installation
------------

[](#installation)

```
composer require aubes/openfeature-flagd-bundle symfony/http-client nyholm/psr7
```

> **Note:** Without a Symfony Flex recipe, register the bundle manually in `config/bundles.php`:
>
> ```
> Aubes\OpenFeatureFlagdBundle\OpenFeatureFlagdBundle::class => ['all' => true],
> ```

Configuration
-------------

[](#configuration)

```
# config/packages/open_feature_flagd.yaml
open_feature_flagd:
    host: '%env(FLAGD_HOST)%'    # default: localhost
    port: 8013                    # default: 8013
    protocol: http                # default: http (http or grpc)
    secure: false                 # default: false

    # PSR-18 client service ID (default: Psr\Http\Client\ClientInterface).
    # Use this to wire a scoped or custom HTTP client (base URI, timeouts, retry, logging...).
    http_client: ~
```

### Custom HTTP client

[](#custom-http-client)

By default, the bundle references the autowired `Psr\Http\Client\ClientInterface`. To use a scoped Symfony HTTP client:

```
# config/packages/framework.yaml
framework:
    http_client:
        scoped_clients:
            flagd.client:
                base_uri: '%env(FLAGD_URL)%'
                timeout: 2
                max_duration: 5
```

```
# config/packages/open_feature_flagd.yaml
open_feature_flagd:
    host: flagd
    http_client: flagd.client
```

Usage
-----

[](#usage)

### Inject the provider directly

[](#inject-the-provider-directly)

This bundle registers `FlagdProvider` as a Symfony service. You can inject it directly and use the OpenFeature API:

```
use OpenFeature\OpenFeatureAPI;
use OpenFeature\Providers\Flagd\FlagdProvider;

class MyService
{
    public function __construct(private FlagdProvider $provider)
    {
    }

    public function doSomething(): void
    {
        $client = OpenFeatureAPI::getInstance()
            ->setProvider($this->provider)
            ->getClient();

        if ($client->getBooleanValue('dark_mode', false)) {
            // ...
        }
    }
}
```

### Pair with `aubes/openfeature-bundle` (optional)

[](#pair-with-aubesopenfeature-bundle-optional)

If you want framework-level sugar on top of the OpenFeature SDK (`#[FeatureFlag]` / `#[FeatureGate]` attributes, Twig helpers, request-scoped evaluation context, profiler integration), install [`aubes/openfeature-bundle`](https://packagist.org/packages/aubes/openfeature-bundle) alongside and point it at this provider:

```
# config/packages/open_feature.yaml
open_feature:
    provider: OpenFeature\Providers\Flagd\FlagdProvider
```

It's entirely optional: this bundle works fine on its own with the plain OpenFeature SDK.

License
-------

[](#license)

MIT. See [LICENSE](LICENSE).

###  Health Score

36

—

LowBetter than 79% of packages

Maintenance91

Actively maintained with recent releases

Popularity3

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity38

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~9 days

Total

3

Last Release

41d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/3941035?v=4)[A. Bes](/maintainers/aubes)[@aubes](https://github.com/aubes)

---

Top Contributors

[![aubes](https://avatars.githubusercontent.com/u/3941035?v=4)](https://github.com/aubes "aubes (3 commits)")

---

Tags

feature-flagsflagdopenfeaturephpsymfonysymfony-bundlesymfonyfeature-flagsopenfeatureflagd

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan, Rector

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/aubes-openfeature-flagd-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/aubes-openfeature-flagd-bundle/health.svg)](https://phpackages.com/packages/aubes-openfeature-flagd-bundle)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
