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/12/17 17:46:17 UTC

[incubator-openwhisk] branch master updated: Add PHP 7.3 runtime (#4182)

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 053bd9a  Add PHP 7.3 runtime (#4182)
053bd9a is described below

commit 053bd9aefe75033d1e6c09e341d34c4e116bf7d4
Author: Rob Allen <ro...@akrabat.com>
AuthorDate: Mon Dec 17 17:46:11 2018 +0000

    Add PHP 7.3 runtime (#4182)
---
 ansible/files/runtimes.json                        | 16 ++++++++++++++-
 .../src/main/resources/apiv1swagger.json           |  1 +
 docs/actions-new.md                                |  2 +-
 docs/actions-php.md                                | 23 +++++++++++++++-------
 tests/dat/actions/unicode.tests/php-7.3.txt        |  9 +++++++++
 5 files changed, 42 insertions(+), 9 deletions(-)

diff --git a/ansible/files/runtimes.json b/ansible/files/runtimes.json
index 6a47db3..fad64a3 100644
--- a/ansible/files/runtimes.json
+++ b/ansible/files/runtimes.json
@@ -194,7 +194,7 @@
             },
             {
                 "kind": "php:7.2",
-                "default": true,
+                "default": false,
                 "deprecated": false,
                 "image": {
                     "prefix": "openwhisk",
@@ -205,6 +205,20 @@
                     "attachmentName": "codefile",
                     "attachmentType": "text/plain"
                 }
+            },
+            {
+                "kind": "php:7.3",
+                "default": true,
+                "deprecated": false,
+                "image": {
+                    "prefix": "openwhisk",
+                    "name": "action-php-v7.3",
+                    "tag": "latest"
+                },
+                "attached": {
+                    "attachmentName": "codefile",
+                    "attachmentType": "text/plain"
+                }
             }
         ],
         "ruby": [
diff --git a/core/controller/src/main/resources/apiv1swagger.json b/core/controller/src/main/resources/apiv1swagger.json
index 9596867..c61cbf3 100644
--- a/core/controller/src/main/resources/apiv1swagger.json
+++ b/core/controller/src/main/resources/apiv1swagger.json
@@ -1895,6 +1895,7 @@
                         "nodejs:default",
                         "php:7.1",
                         "php:7.2",
+                        "php:7.3",
                         "python:2",
                         "python:3",
                         "python:default",
diff --git a/docs/actions-new.md b/docs/actions-new.md
index b51e483..afbf13c 100644
--- a/docs/actions-new.md
+++ b/docs/actions-new.md
@@ -64,7 +64,7 @@ additional rqeuirements and best practices:
 Actions when created specify the desired runtime for the function via a property called "kind".
 When using the `wsk` CLI, this is specified as `--kind <runtime-kind>`. The value is a typically
 a string describing the language (e.g., `nodejs`) followed by a colon and the version for the runtime
-as in `nodejs:8` or `php:7.2`.
+as in `nodejs:8` or `php:7.3`.
 
 The manifest is a map of runtime family names to an array of specific kinds. The details of the
 schema are found in the [Exec Manifest](../common/scala/src/main/scala/org/apache/openwhisk/core/entity/ExecManifest.scala).
diff --git a/docs/actions-php.md b/docs/actions-php.md
index 343dd2a..b5a2fbb 100644
--- a/docs/actions-php.md
+++ b/docs/actions-php.md
@@ -23,10 +23,15 @@ 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.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.
+PHP actions are executed using PHP 7.3. PHP 7.2 & PHP 7.1 are also available. The specific
+version of PHP is listed in the CHANGELOG files in the [PHP runtime repository](https://github.com/apache/incubator-openwhisk-runtime-php).
+
+To use a PHP runtime, specify the `wsk` CLI parameter `--kind` when creating or
+updating an action. The available PHP kinds are:
+
+* PHP 7.3: `--kind php:7.3`
+* PHP 7.2: `--kind php:7.2`
+* PHP 7.1: `--kind php:7.1`
 
 An action is simply a top-level PHP function. For example, create a file called `hello.php`
 with the following source code:
@@ -53,7 +58,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.2 runtime.
+For `.php` source files, the action runs using a PHP 7.3 runtime.
 
 Action invocation is the same for PHP actions as it is for [any other action](actions.md#the-basics).
 
@@ -101,8 +106,12 @@ 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.3.3
-- ramsey/uuid             v3.7.3
+- guzzlehttp/guzzle
+- ramsey/uuid
+
+The specific versions of these packages depends on the PHP runtime in use and is listed in the
+CHANGELOG files in the [PHP runtime repository](https://github.com/apache/incubator-openwhisk-runtime-php).
+
 
 ## Built-in PHP extensions
 
diff --git a/tests/dat/actions/unicode.tests/php-7.3.txt b/tests/dat/actions/unicode.tests/php-7.3.txt
new file mode 100644
index 0000000..bdd88cb
--- /dev/null
+++ b/tests/dat/actions/unicode.tests/php-7.3.txt
@@ -0,0 +1,9 @@
+<?php
+// Licensed to the Apache Software Foundation (ASF) under one or more contributor
+// license agreements; and to You under the Apache License, Version 2.0.
+
+function main(array $args) : array {
+    $str = $args['delimiter'] . " ☃ " . $args['delimiter'];
+    echo $str . "\n";
+    return  ["winter" => $str];
+}