26 if (defined(
'\GuzzleHttp\ClientInterface::MAJOR_VERSION')) {
27 $clientVersion = (string) constant(ClientInterface::class .
'::MAJOR_VERSION');
29 $clientVersion = (string) constant(ClientInterface::class .
'::VERSION');
32 $userAgent = self::USER_AGENT . $this->getPackageVersion();
34 $userAgent .=
' (GuzzleHttp/' . $clientVersion;
35 if (extension_loaded(
'curl') && function_exists(
'curl_version')) {
36 $userAgent .=
'; curl/' . (string) \curl_version()[
'version'];
38 $userAgent .=
') PHP/' . PHP_VERSION;
39 if (!is_null($suffix)) {
40 $userAgent .=
' ' . $suffix;
42 $this->userAgent = $userAgent;