From a67b910b2289b8d4349675c5d7c6123b60896321 Mon Sep 17 00:00:00 2001 From: Daniel Holmes Date: Thu, 3 Aug 2017 01:08:08 +1000 Subject: [PATCH] Change RequestWrapper to use constant (#609) In the default Google App Engine environment, the phpversion function is disabled and requires fiddling around to get it to work (currently overriding ini config, suhosin config and whitelist env do not work as intended). This change moves to using PHP_VERSION which is a constant available in PHP since 5.2.7 and provides the same information as the implementation of phpversion here. --- RequestWrapper.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RequestWrapper.php b/RequestWrapper.php index 8baf9bf..bd12ee1 100644 --- a/RequestWrapper.php +++ b/RequestWrapper.php @@ -161,7 +161,7 @@ private function applyHeaders(RequestInterface $request) { $headers = [ 'User-Agent' => 'gcloud-php/' . $this->componentVersion, - 'x-goog-api-client' => 'gl-php/' . phpversion() . ' gccl/' . $this->componentVersion, + 'x-goog-api-client' => 'gl-php/' . PHP_VERSION . ' gccl/' . $this->componentVersion, ]; if ($this->shouldSignRequest) {