Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add feature flags & experiments API #646

Merged
merged 5 commits into from May 16, 2022
Merged

Add feature flags & experiments API #646

merged 5 commits into from May 16, 2022

Conversation

imjoehaines
Copy link
Member

Goal

This PR adds the feature flags & experiments API to Bugsnag PHP. The API exists in the Client, Configuration and Report classes, which implement the new FeatureDataStore interface:

interface FeatureDataStore
{
    public function addFeatureFlag($name, $variant = null);
    public function addFeatureFlags(array $featureFlags);
    public function clearFeatureFlag($name);
    public function clearFeatureFlags();
}

Feature flags are stored on both the Configuration and Report (the Client forwards method calls on to the Configuration), allowing feature flags to be added globally (via Configuration) or to individual reports as required

@imjoehaines imjoehaines requested a review from kattrali May 16, 2022 13:10
@imjoehaines imjoehaines merged commit b57ec60 into next May 16, 2022
@imjoehaines imjoehaines deleted the feature-flags branch May 16, 2022 14:54
@imjoehaines imjoehaines mentioned this pull request May 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants