PHPackages                             open-feature/flagd-provider - 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. open-feature/flagd-provider

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

open-feature/flagd-provider
===========================

The Flagd provider package for open-feature

1.1.0(6mo ago)2150.2k↑141%1[1 PRs](https://github.com/open-feature-php/flagd-provider/pulls)1Apache-2.0PHPPHP ^8

Since Nov 3Pushed 6mo ago2 watchersCompare

[ Source](https://github.com/open-feature-php/flagd-provider)[ Packagist](https://packagist.org/packages/open-feature/flagd-provider)[ RSS](/packages/open-feature-flagd-provider/feed)WikiDiscussions main Synced 2d ago

READMEChangelogDependencies (26)Versions (13)Used By (1)

OpenFeature Flagd Provider for PHP
==================================

[](#openfeature-flagd-provider-for-php)

[![a](https://camo.githubusercontent.com/17e144567dd661fcbef070f93dddc42e62807a539ee3165e47d0ddc507bf15f1/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f736c61636b2d253430636e63662532466f70656e666561747572652d627269676874677265656e3f7374796c653d666c6174266c6f676f3d736c61636b)](https://cloud-native.slack.com/archives/C0344AANLA1)[![Latest Stable Version](https://camo.githubusercontent.com/aaa84000b38311bb501dcf1c3f1e1c99aea8e473e5547f336a34c5da47fe66ee/687474703a2f2f706f7365722e707567782e6f72672f6f70656e2d666561747572652f666c6167642d70726f76696465722f76)](https://packagist.org/packages/open-feature/flagd-provider)[![Total Downloads](https://camo.githubusercontent.com/5dc221ebe2a5864803076186c0e70b5224f634ea5001591aac60e337f98f29be/687474703a2f2f706f7365722e707567782e6f72672f6f70656e2d666561747572652f666c6167642d70726f76696465722f646f776e6c6f616473)](https://packagist.org/packages/open-feature/flagd-provider)[![PHP 8.0+](https://camo.githubusercontent.com/36d788d0f2d62c47ef64bc13d6f62e5921218d50977830b654730882e0d0f1cc/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d2533453d382e302d626c75652e737667)](https://camo.githubusercontent.com/36d788d0f2d62c47ef64bc13d6f62e5921218d50977830b654730882e0d0f1cc/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d2533453d382e302d626c75652e737667)[![License](https://camo.githubusercontent.com/57bbaca63e062a4b2a517c800c8e8bd4700a793357ace0246e39738f0fd08d15/687474703a2f2f706f7365722e707567782e6f72672f6f70656e2d666561747572652f666c6167642d70726f76696465722f6c6963656e7365)](https://packagist.org/packages/open-feature/flagd-provider)

Overview
--------

[](#overview)

Flagd is a simple command line tool for fetching and presenting feature flags to services. It is designed to conform to OpenFeature schema for flag definitions. This repository and package provides the client side code for interacting with it via the OpenFeature PHP SDK.

This package also builds on various PSRs (PHP Standards Recommendations) such as the Logger interfaces (PSR-3) and the Basic and Extended Coding Standards (PSR-1 and PSR-12).

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

[](#installation)

```
composer require open-feature/flagd-provider
```

Usage
-----

[](#usage)

The `FlagdProvider` client constructor takes a single optional argument with 3 fields, their default values correspond to the default arguments supplied to the flagd server:

```
/** @var \Psr\Http\Client\ClientInterface $client */
$client;

/** @var Psr\Http\Message\RequestFactoryInterface $requestFactory */
$requestFactory;

/** @var Psr\Http\Message\StreamFactoryInterface $streamFactory */
$streamFactory;

OpenFeatureAPI::setProvider(new FlagdProvider([
    'protocol' => 'http',
    'host' => 'localhost',
    'port' => 8013,
    'secure' => true,
    'http' => [
      'client' => $client,
      'requestFactory' => $requestFactory,
      'streamFactory' => $streamFactory,
    ],
]));
```

- **protocol**: "http" *(defaults to http)*
- **host**: string *(defaults to "localhost")*
- **port**: number *(defaults to 8013)*
- **secure**: true | false *(defaults to false)*
- **http**: An array or `HttpConfig` object, providing implementations for PSR interfaces
    - **client**: a `ClientInterface` implementation
    - **requestFactory**: a `RequestFactoryInterface` implementation
    - **streamFactory**: a `StreamFactoryInterface` implementation

### gRPC vs HTTP

[](#grpc-vs-http)

The Flagd server is gRPC but offers gRPC Web endpoints that can be accessed over HTTP. The latter is used by the current implementation of the Flagd provider, with future development planned to implement a gRPC native provider option. There are certain flexibilities around HTTP with PHP available, whereas gRPC is an opinionated code-generation strategy, but they are both useful and gRPC native may provide better performance over certain sync/async scenarios. An additional goal will be to provide benchmarking of the Flagd provider's protocol for various scenarios so this decision can be made more easily by consumers of the provider.

Development
-----------

[](#development)

### PHP Versioning

[](#php-versioning)

This library targets PHP version and newer. As long as you have any compatible version of PHP on your system you should be able to utilize the OpenFeature SDK.

This package also has a `.tool-versions` file for use with PHP version managers like `asdf`.

### Installation and Dependencies

[](#installation-and-dependencies)

Install dependencies with `composer install`. `composer install` will update the `composer.lock` with the most recent compatible versions.

We value having as few runtime dependencies as possible. The addition of any dependencies requires careful consideration and review.

### Testing

[](#testing)

Run tests with `composer run test`.

###  Health Score

47

—

FairBetter than 93% of packages

Maintenance67

Regular maintenance activity

Popularity38

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 63.6% 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 ~114 days

Recently: every ~240 days

Total

11

Last Release

193d ago

Major Versions

0.8.0 → 1.0.02024-09-04

PHP version history (2 changes)0.0.2PHP ^7.4 || ^8

0.4.0PHP ^8

### Community

Maintainers

![](https://www.gravatar.com/avatar/37b811aae08f6063ce4a6c9111849a2c8c5400b58718072c224c9eb8c46e5f17?d=identicon)[0xc](/maintainers/0xc)

---

Top Contributors

[![tcarrio](https://avatars.githubusercontent.com/u/8659099?v=4)](https://github.com/tcarrio "tcarrio (7 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (2 commits)")[![beeme1mr](https://avatars.githubusercontent.com/u/682996?v=4)](https://github.com/beeme1mr "beeme1mr (1 commits)")[![renovate[bot]](https://avatars.githubusercontent.com/in/2740?v=4)](https://github.com/renovate[bot] "renovate[bot] (1 commits)")

---

Tags

providerfeatureflagsfeatureflaggingopenfeatureflagd

###  Code Quality

Static AnalysisPHPStan, Psalm

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/open-feature-flagd-provider/health.svg)

```
[![Health](https://phpackages.com/badges/open-feature-flagd-provider/health.svg)](https://phpackages.com/packages/open-feature-flagd-provider)
```

###  Alternatives

[tempest/framework

The PHP framework that gets out of your way.

2.2k34.4k15](/packages/tempest-framework)[flow-php/flow

PHP ETL - Extract Transform Load - Data processing framework

85036.3k](/packages/flow-php-flow)[cakephp/cakephp

The CakePHP framework

8.9k19.5M1.8k](/packages/cakephp-cakephp)[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.5k5.9M737](/packages/sylius-sylius)[typo3/cms

TYPO3 CMS is a free open source Content Management Framework initially created by Kasper Skaarhoj and licensed under GNU/GPL.

1.2k1.9M122](/packages/typo3-cms)[mcp/sdk

Model Context Protocol SDK for Client and Server applications in PHP

1.5k1.5M88](/packages/mcp-sdk)

PHPackages © 2026

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