Skip to content

Commit f27d34c

Browse files
authored
Use service container to instantiate adapter
This allows you to specify how the adapter should be instantiated. You could, for example, use a different adapter in tests, to mock requests.
1 parent f79c7af commit f27d34c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/ProviderAndDumperAggregator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ protected function getArguments(array $arguments, string $provider) : array
265265
if ($this->requiresReader($provider)) {
266266
$adapter = new $adapter($this->getReader());
267267
} else {
268-
$adapter = new $adapter;
268+
$adapter = app($adapter);
269269
}
270270

271271
array_unshift($arguments, $adapter);

0 commit comments

Comments
 (0)