Open martinbean opened 1 year ago
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.
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:
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.