From 609ef991867cf7fbff6fcfbaaf923e2fe46af39f Mon Sep 17 00:00:00 2001 From: rsonghuster Date: Mon, 17 Sep 2018 16:48:57 +0800 Subject: [PATCH] replace php7 runtime with php7.2 --- README.md | 2 +- test/client_test.php | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 11e2276..eb5cee8 100644 --- a/README.md +++ b/README.md @@ -73,7 +73,7 @@ $fcClient->createFunction( array( 'functionName' => $functionName, 'handler' => 'index.handler', - 'runtime' => 'php7', + 'runtime' => 'php7.2', 'memorySize' => 128, 'code' => array( 'zipFile' => base64_encode(file_get_contents(__DIR__ . '/main.zip')), diff --git a/test/client_test.php b/test/client_test.php index 413ce4a..9234de8 100644 --- a/test/client_test.php +++ b/test/client_test.php @@ -245,7 +245,7 @@ private function subTestListServices() { $this->assertEquals($services[0]['serviceName'], $prefix . 'abd'); } - private function checkFunction($function, $functionName, $desc, $runtime = 'php7', $handler = 'index.handler', $envs = ['TestKey' => 'TestValue']) { + private function checkFunction($function, $functionName, $desc, $runtime = 'php7.2', $handler = 'index.handler', $envs = ['TestKey' => 'TestValue']) { $etag = $function['headers']['Etag'][0]; $this->assertTrue($etag != ''); $function = $function['data']; @@ -296,7 +296,7 @@ public function testFunctionCRUDInvoke() { array( 'functionName' => $functionName, 'handler' => 'index.handler', - 'runtime' => 'php7', + 'runtime' => 'php7.2', 'memorySize' => 128, 'code' => array( 'zipFile' => base64_encode(file_get_contents(__DIR__ . '/index.zip')), @@ -305,7 +305,7 @@ public function testFunctionCRUDInvoke() { 'environmentVariables' => ['TestKey' => 'TestValue'], ) ); - $this->checkFunction($ret, $functionName, 'test function', $runtime = 'php7'); + $this->checkFunction($ret, $functionName, 'test function', $runtime = 'php7.2'); $invkRet = $this->fcClient->invokeFunction($serviceName, $functionName, $payload = "hello world"); $this->assertEquals($invkRet['data'], 'hello world'); @@ -356,7 +356,7 @@ private function subTestListFunctions($serviceName) { array( 'functionName' => $functionName, 'handler' => 'index.handler', - 'runtime' => 'php7', + 'runtime' => 'php7.2', 'code' => array( 'zipFile' => base64_encode(file_get_contents(__DIR__ . '/index.zip')), ), @@ -420,7 +420,7 @@ public function testTriggerCRUD() { array( 'functionName' => $functionName, 'handler' => 'index.handler', - 'runtime' => 'php7', + 'runtime' => 'php7.2', 'memorySize' => 128, 'code' => array( 'zipFile' => base64_encode(file_get_contents(__DIR__ . '/index.zip')), @@ -434,7 +434,7 @@ public function testTriggerCRUD() { array( 'functionName' => $httpFunctionName, 'handler' => 'index_http.handler', - 'runtime' => 'php7', + 'runtime' => 'php7.2', 'memorySize' => 128, 'code' => array( 'zipFile' => base64_encode(file_get_contents(__DIR__ . '/index_http.zip')),