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

[Add] Memory activator #43

Open
migo315 opened this issue Sep 28, 2018 · 1 comment
Open

[Add] Memory activator #43

migo315 opened this issue Sep 28, 2018 · 1 comment
Assignees
Milestone

Comments

@migo315
Copy link
Contributor

migo315 commented Sep 28, 2018

For some it is confusing that some activators (eg cookie, environment) share the "features" tree while others (eg database, contentful) are independent of it.

Therefore, it makes sense to pack the activators that share the same config together. Example:

# config.yml

flagception:   
    features: // moved under "memory"

    activators:    
        memory:
            enable: true
            strategy: all
            features:
                feature_foobar:
                    roles: USER_ROLE
                    cookie: true
                    strategy: all
                feature_bazz:
                    default: true
        database:
            // ...
        contentful:
            // ...
        prismic:
            // ...

The new MemoryActivator is an additional activator to prevent a BC. But in the long term, it should replace the old ArrayActivator, EnvironmentActivator, ConstraintActivator, and CookieActivator.

@migo315 migo315 added this to the 3.2 milestone Sep 28, 2018
@migo315 migo315 self-assigned this Sep 28, 2018
@migo315
Copy link
Contributor Author

migo315 commented May 6, 2019

The new Flagception Bundle 4.0 will work without the shared "features" tree. Each activator has his own feature tree (if needed) or work without them.

The new "MemoryActivator" will replace the old ArrayActivator and ConstraintActivator. You can define a boolean value or a constraint string (expression language).

# config.yml

flagception:   
    activators:    
        memory:
            enable: true
            features:
                feature_foobar: true
                feature_bazz: 'date("H") > 8 and date("H") < 18'
        database:
            // ...
        contentful:
            // ...
        cookie:
            // ...

@migo315 migo315 changed the title Memory activator [Add] Memory activator May 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant