diff --git a/src/ApplicationDefaultCredentials.php b/src/ApplicationDefaultCredentials.php index 8f0af6660..5474effc5 100644 --- a/src/ApplicationDefaultCredentials.php +++ b/src/ApplicationDefaultCredentials.php @@ -150,7 +150,8 @@ public static function getMiddleware( * user-defined scopes exist, expressed either as an Array or as a * space-delimited string. * @param string $universeDomain Specifies a universe domain to use for the - * calling client library + * calling client library. + * @param null|false|LoggerInterface $logger A PSR3 compliant LoggerInterface. * * @return FetchAuthTokenInterface * @throws DomainException if no implementation can be obtained. @@ -162,7 +163,8 @@ public static function getCredentials( CacheItemPoolInterface $cache = null, $quotaProject = null, $defaultScope = null, - string $universeDomain = null + string $universeDomain = null, + null|false|LoggerInterface $logger = null, ) { $creds = null; $jsonKey = CredentialsLoader::fromEnv() @@ -175,7 +177,7 @@ public static function getCredentials( HttpClientCache::setHttpClient($client); } - $httpHandler = HttpHandlerFactory::build($client); + $httpHandler = HttpHandlerFactory::build($client, $logger); } if (is_null($quotaProject)) {