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
2929 ->arrayNode ('expression_language ' )
3030 ->scalarPrototype ()->end ()
3131 ->end ()
32- ->scalarNode ('api_type ' )
33- ->isRequired ()
34- ->cannotBeEmpty ()
35- ->validate ()
36- ->ifTrue (isExpression ())
37- ->then (asExpression ())
38- ->end ()
39- ->end ()
4032 ->append (node: $ extractor ->getConfigTreeBuilder ()->getRootNode ())
4133 ->append (node: $ loader ->getConfigTreeBuilder ()->getRootNode ())
4234 ->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
8989 $ extractor = $ extractorFactory ->compile ($ config ['extractor ' ]);
9090 $ extractorBuilder = $ extractor ->getBuilder ();
9191
92- $ clientFactory ->withApiType ($ config ['extractor ' ]['api_type ' ]);
92+ if (isset ($ config ['extractor ' ]['api_type ' ])) {
93+ $ config ['client ' ]['api_type ' ] = $ config ['extractor ' ]['api_type ' ];
94+ }
9395 $ client = $ clientFactory ->compile ($ config ['client ' ]);
9496
9597 $ extractorBuilder ->withClient ($ client ->getBuilder ()->getNode ());
@@ -105,7 +107,9 @@ public function compile(array $config): Factory\Repository\Extractor|Factory\Rep
105107 $ loader = $ loaderFactory ->compile ($ config ['loader ' ]);
106108 $ loaderBuilder = $ loader ->getBuilder ();
107109
108- $ clientFactory ->withApiType ($ config ['loader ' ]['api_type ' ]);
110+ if (isset ($ config ['loader ' ]['api_type ' ])) {
111+ $ config ['client ' ]['api_type ' ] = $ config ['loader ' ]['api_type ' ];
112+ }
109113 $ client = $ clientFactory ->compile ($ config ['client ' ]);
110114
111115 $ loaderBuilder ->withClient ($ client ->getBuilder ()->getNode ());
You can’t perform that action at this time.
0 commit comments