From 115b60ee321e3b293422698ce336ef383933893c Mon Sep 17 00:00:00 2001 From: Sean O'Brien <60306702+stobrien89@users.noreply.github.com> Date: Mon, 13 Nov 2023 14:57:41 -0500 Subject: [PATCH] remove function imports (#2820) --- src/Credentials/InstanceProfileProvider.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/Credentials/InstanceProfileProvider.php b/src/Credentials/InstanceProfileProvider.php index 67a65bc4a9..3ae8c20987 100644 --- a/src/Credentials/InstanceProfileProvider.php +++ b/src/Credentials/InstanceProfileProvider.php @@ -10,8 +10,6 @@ use GuzzleHttp\Psr7\Request; use GuzzleHttp\Promise\PromiseInterface; use Psr\Http\Message\ResponseInterface; -use function Aws\boolean_value; -use function Aws\default_http_handler; /** * Credential provider that provides credentials from the EC2 metadata service. @@ -66,7 +64,7 @@ public function __construct(array $config = []) $this->timeout = (float) getenv(self::ENV_TIMEOUT) ?: ($config['timeout'] ?? self::DEFAULT_TIMEOUT); $this->profile = $config['profile'] ?? null; $this->retries = (int) getenv(self::ENV_RETRIES) ?: ($config['retries'] ?? self::DEFAULT_RETRIES); - $this->client = $config['client'] ?? default_http_handler(); + $this->client = $config['client'] ?? \Aws\default_http_handler(); $this->ec2MetadataV1Disabled = $config[self::CFG_EC2_METADATA_V1_DISABLED] ?? null; } @@ -317,8 +315,8 @@ private function decodeResult($response) * @return bool */ private function shouldFallbackToIMDSv1(): bool { - $isImdsV1Disabled = boolean_value($this->ec2MetadataV1Disabled) - ?? boolean_value( + $isImdsV1Disabled = \Aws\boolean_value($this->ec2MetadataV1Disabled) + ?? \Aws\boolean_value( ConfigurationResolver::resolve( self::CFG_EC2_METADATA_V1_DISABLED, self::DEFAULT_AWS_EC2_METADATA_V1_DISABLED,