-
Notifications
You must be signed in to change notification settings - Fork 2
/
FeatureTogglesConfiguration.php
32 lines (28 loc) · 1.05 KB
/
FeatureTogglesConfiguration.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<?php
namespace Trompette\FeatureToggles\Bundle;
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
use Symfony\Component\Config\Definition\ConfigurationInterface;
final class FeatureTogglesConfiguration implements ConfigurationInterface
{
public function getConfigTreeBuilder(): TreeBuilder
{
$treeBuilder = new TreeBuilder('feature_toggles');
$treeBuilder
->getRootNode()
->children()
->scalarNode('doctrine_dbal_connection')->defaultValue('doctrine.dbal.default_connection')->end()
->arrayNode('declared_features')
->useAttributeAsKey('name')
->arrayPrototype()
->children()
->scalarNode('description')->isRequired()->cannotBeEmpty()->end()
->scalarNode('strategy')->isRequired()->cannotBeEmpty()->end()
->end()
->end()
->end()
->end()
->end()
;
return $treeBuilder;
}
}