File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change 12
12
use Symfony \Component \Config \Definition \Builder \ArrayNodeDefinition ;
13
13
use Symfony \Component \Config \Definition \Builder \TreeBuilder ;
14
14
use Symfony \Component \Config \Definition \ConfigurationInterface ;
15
+ use Symfony \Component \Config \Definition \Exception \InvalidDefinitionException ;
15
16
16
17
final class Configuration implements ConfigurationInterface
17
18
{
@@ -27,6 +28,19 @@ public function getConfigTreeBuilder()
27
28
->isRequired ()
28
29
->info ('The path where Encore is building the assets - i.e. Encore.setOutputPath() ' )
29
30
->end ()
31
+ ->arrayNode ('builds ' )
32
+ ->useAttributeAsKey ('name ' )
33
+ ->scalarPrototype ()
34
+ ->validate ()
35
+ ->always (function ($ values ) {
36
+ if (isset ($ values ['_default ' ])) {
37
+ throw new InvalidDefinitionException ("Key '_default' can't be used as build name. " );
38
+ }
39
+
40
+ return $ values ;
41
+ })
42
+ ->end ()
43
+ ->end ()
30
44
->end ()
31
45
;
32
46
You can’t perform that action at this time.
0 commit comments