-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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 plugin w/ config implementation and example feature #22221
Conversation
07bbb1e
to
dce6b57
Compare
dce6b57
to
b7df48b
Compare
@caddoo You may need to add the new plugin here to ensure it's always active: matomo/core/Plugin/Manager.php Lines 75 to 95 in 9a3ef94
|
78a6a9f
to
733e9ab
Compare
f4a6c45
to
13de0ca
Compare
f329d30
to
9384845
Compare
89ca991
to
00fea33
Compare
Co-authored-by: Michal Kleiner <michal@innocraft.com>
5e76587
to
3e1684c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a final screenshot update as the order of "always activated plugins" has changed after the latest changes.
Description:
This contains the following:
To Test:
Add the following to your config:
Then go to the main dashboard, look at the source code and look for the content:
<!-- Feature flag example enabled -->
Then play around with the value, of the config:
disabled
/ remove it completely.In the console you can enable/disable/delete using the following:
You can try this if you want, by adding a new feature flag class to another plugin that implements the
FeatureFlagInterface
.Then test if you can enable that feature flag as well.
Once the featureflag plugin is installed/activated, the DI will be available and can be used by just injecting
FeatureFlagManager
into the constructor of a class that needs it.Review