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

Integrate with Pennant feature flags #526

Open
martinbean opened this issue Feb 22, 2023 · 1 comment
Open

Integrate with Pennant feature flags #526

martinbean opened this issue Feb 22, 2023 · 1 comment
Labels
backlog We hope to fix this feature/bug in the future feature request Request for a new feature

Comments

@martinbean
Copy link

Laravel launched Pennant, a feature flag package, alongside version 10.x of the framework.

Pennant raises events when resolving a known feature, so the Bugsnag package could hook in to this event and automatically declare a feature flag, as documented here: https://docs.bugsnag.com/platforms/php/laravel/features-experiments/

Code would look something like this:

$events->listen('Laravel\Pennant\Events\FeatureResolved', function ($event) {
    $this->app->bugsnag->addFeatureFlag($event->feature, $event->value);
});

It should probably be wrapped in a conditional so that developers can choose to enable or disable this automatically capturing of feature flag values, though. Maybe an environment variable-backed configuration value like BUGSNAG_CAPTURE_PENNANT_FEATURES or something.

Happy to code this up and open a PR if it’s something that would be welcomed in the package.

@johnkiely1
Copy link
Member

johnkiely1 commented Feb 28, 2023

Hi @martinbean, Thanks for the suggestion, we agree it sounds like a good idea. A little bit of internal discussion suggests this may end up a being more complex to implement than what you are suggesting along with requiring end to end testing. While we appreciate the offer of the PR, on this occasion it may be best for us to do it in house. To that end we have added a task to the backlog and we will post here as soon as we have updates to share.

@johnkiely1 johnkiely1 added feature request Request for a new feature backlog We hope to fix this feature/bug in the future labels Feb 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backlog We hope to fix this feature/bug in the future feature request Request for a new feature
Projects
None yet
Development

No branches or pull requests

2 participants