|
19 | 19 | use Google\Cloud\Storage\StorageClient; |
20 | 20 | use GuzzleHttp\Client; |
21 | 21 | use GuzzleHttp\HandlerStack; |
22 | | -use GuzzleHttp\MessageFormatter; |
23 | 22 | use GuzzleHttp\Psr7\HttpFactory; |
24 | 23 | use GuzzleHttp\Psr7\Utils as GuzzleUtils; |
25 | 24 | use Kreait\Firebase\AppCheck\AppCheckTokenGenerator; |
|
48 | 47 | use Psr\Cache\CacheItemPoolInterface; |
49 | 48 | use Psr\Clock\ClockInterface; |
50 | 49 | use Psr\Http\Message\UriInterface; |
51 | | -use Psr\Log\LoggerInterface; |
52 | | -use Psr\Log\LogLevel; |
53 | 50 | use Throwable; |
54 | 51 |
|
55 | 52 | use function array_filter; |
@@ -294,60 +291,6 @@ public function withHttpClientOptions(HttpClientOptions $options): self |
294 | 291 | return $factory; |
295 | 292 | } |
296 | 293 |
|
297 | | - /** |
298 | | - * @deprecated 7.25.0 Create the log middleware outside the factory and use `HttpClientOptions::withGuzzleMiddleware()` and `withClientOptions()` instead |
299 | | - * |
300 | | - * @see withHttpClientOptions() |
301 | | - * @see HttpClientOptions::withGuzzleMiddleware() |
302 | | - * |
303 | | - * @param non-empty-string|null $logLevel |
304 | | - * @param non-empty-string|null $errorLogLevel |
305 | | - */ |
306 | | - public function withHttpLogger(LoggerInterface $logger, ?MessageFormatter $formatter = null, ?string $logLevel = null, ?string $errorLogLevel = null): self |
307 | | - { |
308 | | - $clientOptions = $this->httpClientOptions->withGuzzleMiddleware( |
309 | | - middleware: Middleware::log( |
310 | | - $logger, |
311 | | - $formatter ?? new MessageFormatter(), |
312 | | - $logLevel ?? LogLevel::INFO, |
313 | | - $errorLogLevel ?? LogLevel::NOTICE, |
314 | | - ), |
315 | | - name: 'http_logs' |
316 | | - ); |
317 | | - |
318 | | - $factory = clone $this; |
319 | | - $factory->httpClientOptions = $clientOptions; |
320 | | - |
321 | | - return $factory; |
322 | | - } |
323 | | - |
324 | | - /** |
325 | | - * @deprecated 7.25.0 Create the log middleware outside the factory and use `HttpClientOptions::withGuzzleMiddleware()` and `withClientOptions()` instead |
326 | | - * |
327 | | - * @see withHttpClientOptions() |
328 | | - * @see HttpClientOptions::withGuzzleMiddleware() |
329 | | - * |
330 | | - * @param non-empty-string|null $logLevel |
331 | | - * @param non-empty-string|null $errorLogLevel |
332 | | - */ |
333 | | - public function withHttpDebugLogger(LoggerInterface $logger, ?MessageFormatter $formatter = null, ?string $logLevel = null, ?string $errorLogLevel = null): self |
334 | | - { |
335 | | - $clientOptions = $this->httpClientOptions->withGuzzleMiddleware( |
336 | | - middleware: Middleware::log( |
337 | | - $logger, |
338 | | - $formatter ?? new MessageFormatter(MessageFormatter::DEBUG), |
339 | | - $logLevel ?? LogLevel::INFO, |
340 | | - $errorLogLevel ?? LogLevel::NOTICE, |
341 | | - ), |
342 | | - name: 'http_debug_logs' |
343 | | - ); |
344 | | - |
345 | | - $factory = clone $this; |
346 | | - $factory->httpClientOptions = $clientOptions; |
347 | | - |
348 | | - return $factory; |
349 | | - } |
350 | | - |
351 | 294 | public function withClock(object $clock): self |
352 | 295 | { |
353 | 296 | if (!$clock instanceof ClockInterface) { |
|
0 commit comments