@@ -48,45 +48,41 @@ public function process(ContainerBuilder $container)
48
48
49
49
$ defaultBag = new ParameterBag ($ resolvingBag ->all ());
50
50
$ envTypes = $ resolvingBag ->getProvidedTypes ();
51
- try {
52
- foreach ($ resolvingBag ->getEnvPlaceholders () + $ resolvingBag ->getUnusedEnvPlaceholders () as $ env => $ placeholders ) {
53
- $ values = [];
54
- if (false === $ i = strpos ($ env , ': ' )) {
55
- $ default = $ defaultBag ->has ("env( $ env) " ) ? $ defaultBag ->get ("env( $ env) " ) : self ::TYPE_FIXTURES ['string ' ];
56
- $ defaultType = null !== $ default ? self ::getType ($ default ) : 'string ' ;
57
- $ values [$ defaultType ] = $ default ;
58
- } else {
59
- $ prefix = substr ($ env , 0 , $ i );
60
- foreach ($ envTypes [$ prefix ] ?? ['string ' ] as $ type ) {
61
- $ values [$ type ] = self ::TYPE_FIXTURES [$ type ] ?? null ;
62
- }
63
- }
64
- foreach ($ placeholders as $ placeholder ) {
65
- BaseNode::setPlaceholder ($ placeholder , $ values );
51
+ foreach ($ resolvingBag ->getEnvPlaceholders () + $ resolvingBag ->getUnusedEnvPlaceholders () as $ env => $ placeholders ) {
52
+ $ values = [];
53
+ if (false === $ i = strpos ($ env , ': ' )) {
54
+ $ default = $ defaultBag ->has ("env( $ env) " ) ? $ defaultBag ->get ("env( $ env) " ) : self ::TYPE_FIXTURES ['string ' ];
55
+ $ defaultType = null !== $ default ? self ::getType ($ default ) : 'string ' ;
56
+ $ values [$ defaultType ] = $ default ;
57
+ } else {
58
+ $ prefix = substr ($ env , 0 , $ i );
59
+ foreach ($ envTypes [$ prefix ] ?? ['string ' ] as $ type ) {
60
+ $ values [$ type ] = self ::TYPE_FIXTURES [$ type ] ?? null ;
66
61
}
67
62
}
63
+ foreach ($ placeholders as $ placeholder ) {
64
+ BaseNode::setPlaceholder ($ placeholder , $ values );
65
+ }
66
+ }
68
67
69
- $ processor = new Processor ();
68
+ $ processor = new Processor ();
70
69
71
- foreach ($ extensions as $ name => $ extension ) {
72
- if (!$ extension instanceof ConfigurationExtensionInterface || !$ config = array_filter ($ container ->getExtensionConfig ($ name ))) {
73
- // this extension has no semantic configuration or was not called
74
- continue ;
75
- }
70
+ foreach ($ extensions as $ name => $ extension ) {
71
+ if (!$ extension instanceof ConfigurationExtensionInterface || !$ config = array_filter ($ container ->getExtensionConfig ($ name ))) {
72
+ // this extension has no semantic configuration or was not called
73
+ continue ;
74
+ }
76
75
77
- $ config = $ resolvingBag ->resolveValue ($ config );
76
+ $ config = $ resolvingBag ->resolveValue ($ config );
78
77
79
- if (null === $ configuration = $ extension ->getConfiguration ($ config , $ container )) {
80
- continue ;
81
- }
78
+ if (null === $ configuration = $ extension ->getConfiguration ($ config , $ container )) {
79
+ continue ;
80
+ }
82
81
83
- try {
84
- $ this ->extensionConfig [$ name ] = $ processor ->processConfiguration ($ configuration , $ config );
85
- } catch (TreeWithoutRootNodeException $ e ) {
86
- }
82
+ try {
83
+ $ this ->extensionConfig [$ name ] = $ processor ->processConfiguration ($ configuration , $ config );
84
+ } catch (TreeWithoutRootNodeException $ e ) {
87
85
}
88
- } finally {
89
- BaseNode::resetPlaceholders ();
90
86
}
91
87
92
88
$ resolvingBag ->clearUnusedEnvPlaceholders ();
0 commit comments