File tree Expand file tree Collapse file tree 2 files changed +6
-10
lines changed Expand file tree Collapse file tree 2 files changed +6
-10
lines changed Original file line number Diff line number Diff line change @@ -29,14 +29,6 @@ public function getConfigTreeBuilder(): TreeBuilder
29
29
->arrayNode ('expression_language ' )
30
30
->scalarPrototype ()->end ()
31
31
->end ()
32
- ->scalarNode ('api_type ' )
33
- ->isRequired ()
34
- ->cannotBeEmpty ()
35
- ->validate ()
36
- ->ifTrue (isExpression ())
37
- ->then (asExpression ())
38
- ->end ()
39
- ->end ()
40
32
->append (node: $ extractor ->getConfigTreeBuilder ()->getRootNode ())
41
33
->append (node: $ loader ->getConfigTreeBuilder ()->getRootNode ())
42
34
->append (node: $ client ->getConfigTreeBuilder ()->getRootNode ())
Original file line number Diff line number Diff line change @@ -89,7 +89,9 @@ public function compile(array $config): Factory\Repository\Extractor|Factory\Rep
89
89
$ extractor = $ extractorFactory ->compile ($ config ['extractor ' ]);
90
90
$ extractorBuilder = $ extractor ->getBuilder ();
91
91
92
- $ clientFactory ->withApiType ($ config ['extractor ' ]['api_type ' ]);
92
+ if (isset ($ config ['extractor ' ]['api_type ' ])) {
93
+ $ config ['client ' ]['api_type ' ] = $ config ['extractor ' ]['api_type ' ];
94
+ }
93
95
$ client = $ clientFactory ->compile ($ config ['client ' ]);
94
96
95
97
$ extractorBuilder ->withClient ($ client ->getBuilder ()->getNode ());
@@ -105,7 +107,9 @@ public function compile(array $config): Factory\Repository\Extractor|Factory\Rep
105
107
$ loader = $ loaderFactory ->compile ($ config ['loader ' ]);
106
108
$ loaderBuilder = $ loader ->getBuilder ();
107
109
108
- $ clientFactory ->withApiType ($ config ['loader ' ]['api_type ' ]);
110
+ if (isset ($ config ['loader ' ]['api_type ' ])) {
111
+ $ config ['client ' ]['api_type ' ] = $ config ['loader ' ]['api_type ' ];
112
+ }
109
113
$ client = $ clientFactory ->compile ($ config ['client ' ]);
110
114
111
115
$ loaderBuilder ->withClient ($ client ->getBuilder ()->getNode ());
You can’t perform that action at this time.
0 commit comments