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

Commit

Permalink
#26 Add feature name advice
Browse files Browse the repository at this point in the history
  • Loading branch information
migo315 committed Apr 10, 2018
1 parent b198249 commit f864f6e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
@@ -1,3 +1,10 @@
## Unreleased
### Fix
- \#27 Fix route xml in documentation @migo315

### Added
- \#26 Add feature name advice in documentation @migo315

## [3.0.1]
### Fix
- Add service alias for `Flagception\Manager\FeatureManagerInterface` for fixing autowiring @hanishsingla
Expand Down
6 changes: 6 additions & 0 deletions docs/usage.md
Expand Up @@ -116,6 +116,12 @@ If you request an action with inactive feature flag, you will get a `NotFoundHtt

Take a look to the detail documentation for [Twig](twig.md), [Route](route.md) or [Annotation](annotation.md) usage.

##### Feature names
You can name your features as you like. But we recommend using [snake case](https://en.wikipedia.org/wiki/Snake_case).
Especially because Symfony normalizes values from your YML or XML into snake case (see [here](http://symfony.com/doc/current/components/config/definition.html#normalization)).
Your feature "flag-a" becomes "flag_a". So you have to check for "flag_a" everywhere in your code, even if you've
actually maintained "flag-a" in your YML / XML. Consider this with your feature naming.

Constraint usage
-------------------------
In some cases will you need more instead of a simple true / false. So you can define constraints to enable or disable a feature.
Expand Down

0 comments on commit f864f6e

Please sign in to comment.