|
16 | 16 | HTTPClientAbstract, HTTPClientInterface, HTTPOptionsTrait, HTTPResponseInterface, TinyCurlClient |
17 | 17 | }; |
18 | 18 | use chillerlan\Logger\{ |
19 | | - Log, LogOptions, LogOptionsTrait, Output\LogOutputAbstract |
| 19 | + Log, LogOptionsTrait, Output\LogOutputAbstract |
20 | 20 | }; |
21 | 21 | use chillerlan\OAuth\{ |
22 | 22 | OAuthOptions, Providers\OAuthInterface, Storage\MemoryTokenStorage, Storage\TokenStorageInterface, Token |
@@ -102,10 +102,7 @@ protected function setUp(){ |
102 | 102 | $this->storage = new MemoryTokenStorage; |
103 | 103 | $this->logger = $this->initLogger($this->options); |
104 | 104 | $this->http = $this->initHttp($this->options); |
105 | | - $this->provider = $this->initProvider($this->http, $this->storage, $this->options); |
106 | | - |
107 | | - /** @noinspection PhpUndefinedMethodInspection */ |
108 | | - $this->provider->setLogger($this->logger); |
| 105 | + $this->provider = $this->initProvider($this->http, $this->storage, $this->options, $this->logger); |
109 | 106 |
|
110 | 107 | $tokenfile = $this->CFGDIR.'/'.$this->provider->serviceName.'.'.$this->TOKEN_EXT; |
111 | 108 |
|
@@ -160,11 +157,12 @@ protected function __log(string $level, string $message, array $context = null): |
160 | 157 | * @param \chillerlan\HTTP\HTTPClientInterface $http |
161 | 158 | * @param \chillerlan\OAuth\Storage\TokenStorageInterface $storage |
162 | 159 | * @param \chillerlan\Traits\ContainerInterface $options |
| 160 | + * @param \Psr\Log\LoggerInterface $logger |
163 | 161 | * |
164 | 162 | * @return \chillerlan\OAuth\Providers\OAuthInterface |
165 | 163 | */ |
166 | | - protected function initProvider(HTTPClientInterface $http, TokenStorageInterface $storage, ContainerInterface $options){ |
167 | | - return new $this->FQCN($http, $storage, $options); |
| 164 | + protected function initProvider(HTTPClientInterface $http, TokenStorageInterface $storage, ContainerInterface $options, LoggerInterface $logger){ |
| 165 | + return new $this->FQCN($http, $storage, $options, $logger); |
168 | 166 | } |
169 | 167 |
|
170 | 168 | /** |
|
0 commit comments