PHPackages                             aubes/openfeature-configcat-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-configcat-bundle

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

aubes/openfeature-configcat-bundle
==================================

Symfony bundle for the OpenFeature ConfigCat provider

v0.1.0(1mo ago)01MITPHPPHP &gt;=8.2CI passing

Since Apr 14Pushed 1mo agoCompare

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

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

OpenFeature ConfigCat Bundle
============================

[](#openfeature-configcat-bundle)

[![CI](https://github.com/aubes/openfeature-configcat-bundle/actions/workflows/php.yml/badge.svg)](https://github.com/aubes/openfeature-configcat-bundle/actions/workflows/php.yml)[![Latest Version](https://camo.githubusercontent.com/6290b6a808107a709422c26a9431795f85d448dcdd36927b99f03c0cb45c2dc4/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f61756265732f6f70656e666561747572652d636f6e6669676361742d62756e646c652e737667)](https://packagist.org/packages/aubes/openfeature-configcat-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 ConfigCat provider](https://github.com/configcat/openfeature-php) as a Symfony service.

[ConfigCat](https://configcat.com/) in Symfony, one `composer require` away.

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

[](#requirements)

- PHP 8.2+
- Symfony 6.4, 7.4 or 8.x
- [Guzzle](https://github.com/guzzle/guzzle) ^7.0 (required by `configcat/configcat-client` for HTTP requests; see "Using without Guzzle" below to switch)

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

[](#installation)

```
composer require aubes/openfeature-configcat-bundle
```

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

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

[](#configuration)

```
# config/packages/open_feature_configcat.yaml
open_feature_config_cat:
    sdk_key: '%env(CONFIGCAT_SDK_KEY)%'

    # Optional settings
    base_url: ~                    # custom ConfigCat CDN URL
    cache_refresh_interval: ~      # polling interval in seconds
    data_governance: ~             # "global" or "eu_only"
    offline: ~                     # start in offline mode

    # Optional service references (Symfony service IDs)
    logger: ~                      # PSR-3 LoggerInterface
    cache: ~                       # ConfigCat\ConfigCache implementation (mutually exclusive with cache_pool)
    cache_pool: ~                  # PSR-6 CacheItemPoolInterface, e.g. "cache.app" (mutually exclusive with cache)
    fetch_client: ~                # ConfigCat\Http\FetchClientInterface implementation

    # Flag overrides (optional, pick one type)
    flag_overrides:
        type: file                 # "file", "array", or "service"
        behaviour: local_only      # "local_only", "local_over_remote", or "remote_over_local"
        path: ~                    # JSON file path (type: file)
        # values: ~               # inline key/value map (type: array)
        # id: ~                    # service ID of OverrideDataSource (type: service)
```

Usage
-----

[](#usage)

### Inject the provider directly

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

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

```
use ConfigCat\OpenFeature\ConfigCatProvider;
use OpenFeature\OpenFeatureAPI;

class MyService
{
    public function __construct(private ConfigCatProvider $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: ConfigCat\OpenFeature\ConfigCatProvider
```

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

Using without Guzzle
--------------------

[](#using-without-guzzle)

By default, ConfigCat uses Guzzle for HTTP requests. If you prefer `symfony/http-client` (or any PSR-18 client), this bundle ships a `Psr18FetchClient` adapter:

```
# config/services.yaml
services:
    Aubes\OpenFeatureConfigCatBundle\Http\Psr18FetchClient:
        arguments:
            $client: '@psr18.http_client'
            $requestFactory: '@Psr\Http\Message\RequestFactoryInterface'

# config/packages/open_feature_configcat.yaml
open_feature_config_cat:
    sdk_key: '%env(CONFIGCAT_SDK_KEY)%'
    fetch_client: Aubes\OpenFeatureConfigCatBundle\Http\Psr18FetchClient
```

This requires `symfony/http-client` and a PSR-17 implementation (e.g. `nyholm/psr7`).

License
-------

[](#license)

MIT. See [LICENSE](LICENSE).

###  Health Score

35

—

LowBetter than 77% of packages

Maintenance91

Actively maintained with recent releases

Popularity1

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity36

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

Unknown

Total

1

Last Release

57d 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 (2 commits)")

---

Tags

configcatfeature-flagsopenfeaturephpsymfonysymfony-bundlesymfonyfeature-flagsopenfeatureconfigcat

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan, Rector

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

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

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

PHPackages © 2026

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