You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openwhisk.apache.org by cs...@apache.org on 2018/07/03 17:11:52 UTC

[incubator-openwhisk] branch master updated: Add support for PHP 7.2 runtime (#3736)

This is an automated email from the ASF dual-hosted git repository.

csantanapr pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk.git


The following commit(s) were added to refs/heads/master by this push:
     new ebf42b2  Add support for PHP 7.2 runtime (#3736)
ebf42b2 is described below

commit ebf42b232f75f75592ed15d6a61afa8bfa14af95
Author: Rob Allen <ro...@akrabat.com>
AuthorDate: Tue Jul 3 18:11:49 2018 +0100

    Add support for PHP 7.2 runtime (#3736)
---
 ansible/files/runtimes.json                          | 12 +++++++++++-
 core/controller/src/main/resources/apiv1swagger.json |  2 ++
 docs/actions-php.md                                  | 11 ++++++-----
 docs/webactions.md                                   |  2 +-
 4 files changed, 20 insertions(+), 7 deletions(-)

diff --git a/ansible/files/runtimes.json b/ansible/files/runtimes.json
index 8b4673d..c73f753 100644
--- a/ansible/files/runtimes.json
+++ b/ansible/files/runtimes.json
@@ -125,13 +125,23 @@
         "php": [
             {
                 "kind": "php:7.1",
-                "default": true,
+                "default": false,
                 "deprecated": false,
                 "image": {
                     "prefix": "openwhisk",
                     "name": "action-php-v7.1",
                     "tag": "latest"
                 }
+            },
+            {
+                "kind": "php:7.2",
+                "default": true,
+                "deprecated": false,
+                "image": {
+                    "prefix": "openwhisk",
+                    "name": "action-php-v7.2",
+                    "tag": "latest"
+                }
             }
         ]
     },
diff --git a/core/controller/src/main/resources/apiv1swagger.json b/core/controller/src/main/resources/apiv1swagger.json
index f19c3e2..bc07b96 100644
--- a/core/controller/src/main/resources/apiv1swagger.json
+++ b/core/controller/src/main/resources/apiv1swagger.json
@@ -1499,6 +1499,8 @@
                         "nodejs:8",
                         "python:2",
                         "python:3",
+                        "php:7.1",
+                        "php:7.2",
                         "swift:3.1.1",
                         "java",
                         "blackbox"
diff --git a/docs/actions-php.md b/docs/actions-php.md
index 7062e0c..343dd2a 100644
--- a/docs/actions-php.md
+++ b/docs/actions-php.md
@@ -23,9 +23,10 @@ The process of creating PHP actions is similar to that of [other actions](action
 The following sections guide you through creating and invoking a single PHP action,
 and demonstrate how to bundle multiple PHP files and third party dependencies.
 
-PHP actions are executed using PHP 7.1.18.
-To use this runtime, specify the `wsk` CLI parameter `--kind php:7.1` when creating or updating an action.
+PHP actions are executed using PHP 7.2.6, with PHP 7.1.18 also available.
+To use the PHP 7.2 runtime, specify the `wsk` CLI parameter `--kind php:7.2` when creating or updating an action.
 This is the default when creating an action with file that has a `.php` extension.
+You can use `-- kind php:7.1 to use the PHP 7.1 runtime.
 
 An action is simply a top-level PHP function. For example, create a file called `hello.php`
 with the following source code:
@@ -52,7 +53,7 @@ wsk action create helloPHP hello.php
 ```
 
 The CLI automatically infers the type of the action from the source file extension.
-For `.php` source files, the action runs using a PHP 7.1 runtime.
+For `.php` source files, the action runs using a PHP 7.2 runtime.
 
 Action invocation is the same for PHP actions as it is for [any other action](actions.md#the-basics).
 
@@ -100,8 +101,8 @@ The PHP runtime will automatically include Composer's autoloader for you, so you
 use the dependencies in your action code. Note that if you don't include your own `vendor` folder,
 then the runtime will include one for you with the following Composer packages:
 
-- guzzlehttp/guzzle       v6.7.3
-- ramsey/uuid             v3.6.3
+- guzzlehttp/guzzle       v6.3.3
+- ramsey/uuid             v3.7.3
 
 ## Built-in PHP extensions
 
diff --git a/docs/webactions.md b/docs/webactions.md
index ea137c6..3e98fe0 100644
--- a/docs/webactions.md
+++ b/docs/webactions.md
@@ -372,7 +372,7 @@ $ wsk update create /guest/demo/hello hello.js --web false
 ### Decoding binary body content from Base64
 
 When using raw HTTP handling, the `__ow_body` content will be encoded in Base64 when the request content-type is binary.
-Below are functions demonstrating how to decode the body content in Node, Python, and Swift. Simply save a method shown
+Below are functions demonstrating how to decode the body content in Node, Python, Swift and PHP. Simply save a method shown
 below to file, create a raw HTTP web action utilizing the saved artifact, and invoke the web action.
 
 #### Node