Skip to content
This repository has been archived by the owner on Aug 23, 2022. It is now read-only.

Add configuration via config file #24

Open
jamesrwilliams opened this issue Feb 4, 2019 · 2 comments
Open

Add configuration via config file #24

jamesrwilliams opened this issue Feb 4, 2019 · 2 comments
Labels
enhancement New feature or request question Further information is requested
Milestone

Comments

@jamesrwilliams
Copy link
Owner

cmjaimet who has written a similar plugin has a wonderful idea of a JSON configuration option for the flags rather than being written in the theme's code. I think we should add this to our plugin also as another method of delcaring feature flags.

This does open up issues around load order and duplicate keys, however. Maybe the JSON file takes presedance over and PHP delcarations with any duplicates erroring as per #22. Thoughts?

@jamesrwilliams jamesrwilliams added enhancement New feature or request question Further information is requested labels Feb 4, 2019
@jamesrwilliams jamesrwilliams modified the milestones: v0.1.3-beta, v1.0.0 Aug 14, 2020
@jamesrwilliams jamesrwilliams changed the title Add configuration via JSON file feature Add configuration via config file Sep 30, 2021
@jamesrwilliams
Copy link
Owner Author

Expanding scope to include YAML or other formats. Maybe a property on a sites composer extra node?

@jenkoian
Copy link
Contributor

We've added yaml support in our base plugin in work if you wanted to see what an implementation might look like https://github.com/boxuk/boxuk-base-wp-plugin/tree/main/src/FeatureFlag

Example flags.yml: https://github.com/boxuk/wp-project-skeleton/blob/main/wp-content/mu-plugins/000-boxuk/flags.yaml

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants