Download the PHP package launchdarkly/openfeature-server without Composer
On this page you can find all versions of the php package launchdarkly/openfeature-server. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download launchdarkly/openfeature-server
More information about launchdarkly/openfeature-server
Files in launchdarkly/openfeature-server
Package openfeature-server
Short Description An OpenFeature provider for the LaunchDarkly PHP server SDK
License Apache-2.0
Informations about the package openfeature-server
LaunchDarkly OpenFeature provider for the Server-Side SDK for PHP
This provider allows for using LaunchDarkly with the OpenFeature SDK for PHP.
This provider is designed primarily for use in multi-user systems such as web servers and applications. It follows the server-side LaunchDarkly model for multi-user contexts. It is not intended for use in desktop and embedded systems applications.
LaunchDarkly overview
LaunchDarkly is a feature management platform that serves over 100 billion feature flags daily to help teams build better software, faster. Get started using LaunchDarkly today!
Supported PHP versions
This version of the LaunchDarkly provider works with PHP 8.1 and above.
Getting started
Requisites
Example composer dependencies:
Usage
Refer to the SDK reference guide for instructions on getting started with using the SDK.
For information on using the OpenFeature client please refer to the OpenFeature Documentation.
OpenFeature Specific Considerations
LaunchDarkly evaluates contexts, and it can either evaluate a single-context, or a multi-context. When using OpenFeature both single and multi-contexts must be encoded into a single EvaluationContext
. This is accomplished by looking for an attribute named kind
in the EvaluationContext
.
There are 4 different scenarios related to the kind
:
- There is no
kind
attribute. In this case the provider will treat the context as a single context containing a "user" kind. - There is a
kind
attribute, and the value of that attribute is "multi". This will indicate to the provider that the context is a multi-context. - There is a
kind
attribute, and the value of that attribute is a string other than "multi". This will indicate to the provider a single context of the kind specified. - There is a
kind
attribute, and the attribute is not a string. In this case the value of the attribute will be discarded, and the context will be treated as a "user". An error message will be logged.
The kind
attribute should be a string containing only contain ASCII letters, numbers, .
, _
or -
.
The OpenFeature specification allows for an optional targeting key, but LaunchDarkly requires a key for evaluation. A targeting key must be specified for each context being evaluated. It may be specified using either targetingKey
, as it is in the OpenFeature specification, or key
, which is the typical LaunchDarkly identifier for the targeting key. If a targetingKey
and a key
are specified, then the targetingKey
will take precedence.
There are several other attributes which have special functionality within a single or multi-context.
- A key of
privateAttributes
. Must be an array of string values. Equivalent to the 'private' builder method in the SDK. - A key of
anonymous
. Must be a boolean value. Equivalent to the 'anonymous' builder method in the SDK. - A key of
name
. Must be a string. Equivalent to the 'name' builder method in the SDK.
Examples
A single user context
A single context of kind "organization"
A multi-context containing a "user" and an "organization"
Setting private attributes in a single context
Setting private attributes in a multi-context
Learn more
Check out our documentation for in-depth instructions on configuring and using LaunchDarkly. You can also head straight to the complete reference guide for this SDK.
The authoritative description of all properties and methods is in the php documentation.
Contributing
We encourage pull requests and other contributions from the community. Check out our contributing guidelines for instructions on how to contribute to this SDK.
About LaunchDarkly
- LaunchDarkly is a continuous delivery platform that provides feature flags as a service and allows developers to iterate quickly and safely. We allow you to easily flag your features and manage them from the LaunchDarkly dashboard. With LaunchDarkly, you can:
- Roll out a new feature to a subset of your users (like a group of users who opt-in to a beta tester group), gathering feedback and bug reports from real-world use cases.
- Gradually roll out a feature to an increasing percentage of users, and track the effect that the feature has on key metrics (for instance, how likely is a user to complete a purchase if they have feature A versus feature B?).
- Turn off a feature that you realize is causing performance problems in production, without needing to re-deploy, or even restart the application with a changed configuration file.
- Grant access to certain features based on user attributes, like payment plan (eg: users on the ‘gold’ plan get access to more features than users in the ‘silver’ plan). Disable parts of your application to facilitate maintenance, without taking everything offline.
- LaunchDarkly provides feature flag SDKs for a wide variety of languages and technologies. Check out our documentation for a complete list.
- Explore LaunchDarkly
- launchdarkly.com for more information
- docs.launchdarkly.com for our documentation and SDK reference guides
- apidocs.launchdarkly.com for our API documentation
- blog.launchdarkly.com for the latest product updates
All versions of openfeature-server with dependencies
guzzlehttp/guzzle Version ^7
launchdarkly/server-sdk Version ^6.2
myclabs/php-enum Version >1.8
open-feature/sdk Version ^2.0