|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
declare(strict_types=1); |
|
4
|
|
|
|
|
5
|
|
|
namespace AtlassianConnectBundle\DependencyInjection; |
|
6
|
|
|
|
|
7
|
|
|
use Symfony\Component\Config\Definition\Builder\TreeBuilder; |
|
8
|
|
|
use Symfony\Component\Config\Definition\ConfigurationInterface; |
|
9
|
|
|
|
|
10
|
|
|
class Configuration implements ConfigurationInterface |
|
11
|
|
|
{ |
|
12
|
|
|
public function getConfigTreeBuilder(): TreeBuilder |
|
13
|
|
|
{ |
|
14
|
|
|
$treeBuilder = new TreeBuilder('atlassian_connect'); |
|
15
|
|
|
$rootNode = $treeBuilder->getRootNode(); |
|
16
|
|
|
|
|
17
|
|
|
$rootNode |
|
18
|
|
|
->children() |
|
19
|
|
|
->variableNode('dev_tenant')->defaultValue(1)->end() |
|
20
|
|
|
->arrayNode('descriptor') |
|
21
|
|
|
->ignoreExtraKeys() |
|
22
|
|
|
->children() |
|
23
|
|
|
->arrayNode('authentication') |
|
24
|
|
|
->addDefaultsIfNotSet() |
|
25
|
|
|
->children() |
|
26
|
|
|
->enumNode('type')->values(['jwt', 'none', 'JWT', 'NONE'])->defaultValue('jwt')->isRequired()->end() |
|
27
|
|
|
->end() |
|
28
|
|
|
->end() |
|
29
|
|
|
->scalarNode('baseUrl')->isRequired()->cannotBeEmpty()->end() |
|
30
|
|
|
->scalarNode('key')->isRequired()->cannotBeEmpty()->end() |
|
31
|
|
|
->integerNode('apiVersion')->end() |
|
32
|
|
|
->scalarNode('name')->end() |
|
33
|
|
|
->scalarNode('description')->end() |
|
34
|
|
|
->booleanNode('enableLicensing')->end() |
|
35
|
|
|
->arrayNode('lifecycle') |
|
36
|
|
|
->children() |
|
37
|
|
|
->scalarNode('installed')->end() |
|
38
|
|
|
->scalarNode('enabled')->end() |
|
39
|
|
|
->scalarNode('disabled')->end() |
|
40
|
|
|
->scalarNode('uninstalled')->end() |
|
41
|
|
|
->end() |
|
42
|
|
|
->end() |
|
43
|
|
|
->arrayNode('vendor') |
|
44
|
|
|
->children() |
|
45
|
|
|
->scalarNode('name')->end() |
|
46
|
|
|
->scalarNode('url')->end() |
|
47
|
|
|
->end() |
|
48
|
|
|
->end() |
|
49
|
|
|
->arrayNode('scopes') |
|
50
|
|
|
->scalarPrototype()->end() |
|
51
|
|
|
->end() |
|
52
|
|
|
->variableNode('links') |
|
53
|
|
|
->end() |
|
54
|
|
|
->variableNode('modules') |
|
55
|
|
|
->end() |
|
56
|
|
|
->arrayNode('translations') |
|
57
|
|
|
->children() |
|
58
|
|
|
->arrayNode('paths') |
|
59
|
|
|
->scalarPrototype()->end() |
|
60
|
|
|
->end() |
|
61
|
|
|
->end() |
|
62
|
|
|
->end() |
|
63
|
|
|
->end() |
|
64
|
|
|
->end() |
|
65
|
|
|
->arrayNode('license_allow_list') |
|
66
|
|
|
->arrayPrototype() |
|
67
|
|
|
->children() |
|
68
|
|
|
->scalarNode('client_key')->end() |
|
69
|
|
|
->scalarNode('valid_till')->end() |
|
70
|
|
|
->end() |
|
71
|
|
|
->end() |
|
72
|
|
|
->end() |
|
73
|
|
|
->end() |
|
74
|
|
|
; |
|
75
|
|
|
|
|
76
|
|
|
return $treeBuilder; |
|
77
|
|
|
} |
|
78
|
|
|
} |
|
79
|
|
|
|